Re: [Owfs-developers] libftdi support: take 2

2016-03-12 Thread Johan Ström
On 04/03/16 19:37, Jan Kandziora wrote: > Am 04.03.2016 um 19:00 schrieb Johan Ström: >> Anyone objecting to a merge? >> > You're testing better than anyone else I think, so let's finally have this. Most likely! Now it is merged, lets hope others benefits from this in the future :) Thanks for you

Re: [Owfs-developers] libftdi support: take 2

2016-03-04 Thread Jan Kandziora
Am 04.03.2016 um 19:00 schrieb Johan Ström: > > Anyone objecting to a merge? > You're testing better than anyone else I think, so let's finally have this. Kind regards Jan -- ___

Re: [Owfs-developers] libftdi support: take 2

2016-03-04 Thread Johan Ström
Great to hear! So, lets sum up the current status: --link and --device tested with FTDI backend on Linux (Ubuntu, Archlinux ARM), OS X, FreeBSD, and all seems to work fine. Long-time tests (years) have been done onF reeBSD. owusbprobe tool has been implemented and finds a bunch of USB devices,

Re: [Owfs-developers] libftdi support: take 2

2016-03-04 Thread Stefano Miccoli
kudos! everything is OK on my side (archlinux ARM on rPi). Stefano > On 01 Mar 2016, at 22:43, Johan Ström wrote: > > Bingo! I think. > > Adding a short sleep right *before* turning on the break seems to have solved > it. My guess, the 'b' was still pending in the FTDI chip's buffer, and when

Re: [Owfs-developers] libftdi support: take 2

2016-03-01 Thread Johan Ström
Bingo! I think. Adding a short sleep right *before* turning on the break seems to have solved it. My guess, the 'b' was still pending in the FTDI chip's buffer, and when sending the break too early, it never had a chance to reach the Link chip. Stefano: patch commited in ftdi branch, can you

Re: [Owfs-developers] libftdi support: take 2

2016-03-01 Thread Johan Ström
On 01/03/16 14:11, Stefano Miccoli wrote: Really weird, since it should just use semi-low-level USB messages to tell the device to send a Break; the OS should not interfere? Further weirdness. I just noticed that my main network (FreeBSD, same version, with LinkUSB v1.5) suffers from the re

Re: [Owfs-developers] libftdi support: take 2

2016-03-01 Thread Stefano Miccoli
> On 29 Feb 2016, at 23:35, Johan Ström wrote: > > Stefano's ARMv7l device, running Linux 4.1.17 It’s a RaspberryPi I have for testing. > Really weird, since it should just use semi-low-level USB messages to tell > the device to send a Break; the OS should not interfere? > > If this cannot b

Re: [Owfs-developers] libftdi support: take 2

2016-02-29 Thread Johan Ström
Corrected test sequence (failure is on first -d): owserver --link ftdi:i:0x0403:0x6001 --debug --traffic owserver -d ftdi:i:0x0403:0x6001 --debug --traffic # This one fails, only tries 9600 and gets read errors owserver --link ftdi:i:0x0403:0x6001 --debug --traffic # This one takes works, buton

Re: [Owfs-developers] libftdi support: take 2

2016-02-29 Thread Johan Ström
Hi, a little update on this. I have not found any fix for Stefanos issue, but I have been able to reproduce it, partially. What happens is this: when OWFS scans for Link devices it does so using 9600bps initially. When it successfully detects a LinkUSB, it switches to 19200bps. When it shuts

Re: [Owfs-developers] libftdi support: take 2

2016-02-16 Thread Johan Ström
On 15/02/16 23:45, Stefano Miccoli wrote: > For me the bug is still present: > > owserver —link ftdi:s:0x0403:0x6001:xx —debug > ^C > owserver -d ftdi:s:0x0403:0x6001:xx --debug > > remains stuck in an endless loop: > > DEBUG: ow_ds9097U.c:(471) Attempt 0 of 3 to initialize the DS9097U >

Re: [Owfs-developers] libftdi support: take 2

2016-02-15 Thread Stefano Miccoli
For me the bug is still present: owserver —link ftdi:s:0x0403:0x6001:xx —debug ^C owserver -d ftdi:s:0x0403:0x6001:xx --debug remains stuck in an endless loop: DEBUG: ow_ds9097U.c:(471) Attempt 0 of 3 to initialize the DS9097U DEBUG: ow_ds9097U.c:(565) Send the initial reset to the b

Re: [Owfs-developers] libftdi support: take 2

2016-02-15 Thread Johan Ström
On 11/02/16 23:25, Johan Ström wrote: > On 04/02/16 23:26, Jan Kandziora wrote: > >>> I've had another idea. We are asking user to unplug device to get a >>> baseline, and then reconnect the device and scan, to discover the one >>> new device. We could scan /dev/ for new tty/cua/acm devices in th

Re: [Owfs-developers] libftdi support: take 2

2016-02-15 Thread Johan Ström
On 10/02/16 08:25, Stefano Miccoli wrote: On 10 Feb 2016, at 07:55, Johan Ström > wrote: Basic functionality seems OK, but there is a sequence that breaks the server. $ owserver --link ftdi:i:0x0403:0x6001 --foreground ^C $ owserver -d ftdi:i:0x0403:0x6001 --debu

Re: [Owfs-developers] libftdi support: take 2

2016-02-11 Thread Johan Ström
On 04/02/16 23:26, Jan Kandziora wrote: > Am 04.02.2016 um 23:11 schrieb Johan Ström: >> vid =0x0B6A, pid = 0x5A03 >> "This device is identified as a DS18E17 / DS9481P-300 USB adapter. >> To use this, you need to use the DS2480B device, and point it to >> the appropriate /dev/ttyACMx device" >> >

Re: [Owfs-developers] libftdi support: take 2

2016-02-09 Thread Stefano Miccoli
> On 10 Feb 2016, at 07:55, Johan Ström wrote: > >> >> Basic functionality seems OK, but there is a sequence that breaks the server. >> >> $ owserver --link ftdi:i:0x0403:0x6001 --foreground >> ^C >> $ owserver -d ftdi:i:0x0403:0x6001 --debug >> > > Interesting. When you shut down owsserver

Re: [Owfs-developers] libftdi support: take 2

2016-02-09 Thread Johan Ström
On 10/02/16 00:21, Stefano Miccoli wrote: > Hi, I was able to perform some very preliminary testing with a > raspberry pi 2, a LinkUSB and a single MS-TH. > > Here my environment: > > LSB Version:1.4 > Distributor ID:Arch > Description:Arch Linux > Release:rolling > Codename:n/a > > Linux 4.1.17-1

Re: [Owfs-developers] libftdi support: take 2

2016-02-09 Thread Stefano Miccoli
Hi, I was able to perform some very preliminary testing with a raspberry pi 2, a LinkUSB and a single MS-TH. Here my environment: LSB Version:1.4 Distributor ID: Arch Description:Arch Linux Release:rolling Codename: n/a Linux 4.1.17-1-ARCH #1 SMP Mon Feb 1 18:55:49 MST 201

Re: [Owfs-developers] libftdi support: take 2

2016-02-05 Thread Stefano Miccoli
Sorry: I’m decomissioning a computer room, were the LinkUSB is installed plus a couple of sensors. I will have the LinkUSB available next week, I hope, when all servers are off. S. > On 04 Feb 2016, at 20:33, Johan Ström wrote: > > > On 27/01/16 18:40, Stefano Miccoli wrote: >> Good news. >

Re: [Owfs-developers] libftdi support: take 2

2016-02-04 Thread Jan Kandziora
Am 04.02.2016 um 23:11 schrieb Johan Ström: > > vid =0x0B6A, pid = 0x5A03 > "This device is identified as a DS18E17 / DS9481P-300 USB adapter. > To use this, you need to use the DS2480B device, and point it to > the appropriate /dev/ttyACMx device" > Skip the DS28E17 part, as the adapter is part

Re: [Owfs-developers] libftdi support: take 2

2016-02-04 Thread Johan Ström
On 29/01/16 15:02, Jan Kandziora wrote: > Am 29.01.2016 um 08:28 schrieb Johan Ström: > > >> As for the DS9481, it seems to be based on the Prolific PL-2303HXD chip, >> a generic adapter chip similar to the FTDI. Behind that, it emulates a >> DS2480B (owfs source code doesn't even mention this ada

Re: [Owfs-developers] libftdi support: take 2

2016-02-04 Thread Johan Ström
On 29/01/16 16:54, Matthias Urlichs wrote: > Hi, > > On 27.01.2016 23:45, Stefano Miccoli wrote: >> #ifdef HAVE_SYS_TYPES_H >> #ifdef __FreeBSD__ >> #include > Umm, why doesn't this code use HAVE_SYS_PARAM_H ?? > No idea, was not introduced in the ftdi branch. I've commited a fix there now thoug

Re: [Owfs-developers] libftdi support: take 2

2016-02-04 Thread Johan Ström
On 27/01/16 18:40, Stefano Miccoli wrote: Good news. In a few days I will have an old LinkUSB available for testing, although with a limited number of sensors only: I will try-out your implementation. Stefano, did you get any chance to give my ftdi code a spin? Regards Johan ---

Re: [Owfs-developers] libftdi support: take 2

2016-01-29 Thread Jan Kandziora
Am 29.01.2016 um 15:17 schrieb Johan Ström: > > Would that be the one based on the device iteration order? Can > someone elaborate on how that digit is computed? From my quick look, > it seems to be a number incrementing for every single USB device > seen, regardless if it matched or not (might

Re: [Owfs-developers] libftdi support: take 2

2016-01-29 Thread Matthias Urlichs
Hi, On 27.01.2016 23:45, Stefano Miccoli wrote: > #ifdef HAVE_SYS_TYPES_H > #ifdef __FreeBSD__ > #include Umm, why doesn't this code use HAVE_SYS_PARAM_H ?? -- -- Matthias Urlichs -- Site24x7 APM Insight: Get Deep Vi

Re: [Owfs-developers] libftdi support: take 2

2016-01-29 Thread Johan Ström
On 29/01/16 15:02, Jan Kandziora wrote: > Am 29.01.2016 um 08:28 schrieb Johan Ström: >> On 28/01/16 23:58, Jan Kandziora wrote: >>> Am 28.01.2016 um 23:38 schrieb Johan Ström: What do you think? >>> Sounds reasonable. But if you name it owusbprobe, it should be able to >>> detect DS949

Re: [Owfs-developers] libftdi support: take 2

2016-01-29 Thread Jan Kandziora
Am 29.01.2016 um 08:28 schrieb Johan Ström: > > On 28/01/16 23:58, Jan Kandziora wrote: >> Am 28.01.2016 um 23:38 schrieb Johan Ström: >>> What do you think? >>> >> Sounds reasonable. But if you name it owusbprobe, it should be able to >> detect DS9490 and DS9481, too. >> > Actually, I think DS949

Re: [Owfs-developers] libftdi support: take 2

2016-01-28 Thread Johan Ström
On 29/01/16 08:28, Johan Ström wrote: > > Also, since we don't have any Prolific layer (yet), we must use the > systems regular COM port emulation. This presents a new issue: doing so > cross-platform. > Ehr, the issue is mapping the USB device to the correct /dev/ttyXX name cross-platform, to sho

Re: [Owfs-developers] libftdi support: take 2

2016-01-28 Thread Johan Ström
On 28/01/16 23:58, Jan Kandziora wrote: > Am 28.01.2016 um 23:38 schrieb Johan Ström: >> What do you think? >> > Sounds reasonable. But if you name it owusbprobe, it should be able to > detect DS9490 and DS9481, too. > Actually, I think DS9490 is based on the DS2490 chip, so that is implicitly sup

Re: [Owfs-developers] libftdi support: take 2

2016-01-28 Thread Jan Kandziora
Am 28.01.2016 um 23:38 schrieb Johan Ström: > > What do you think? > Sounds reasonable. But if you name it owusbprobe, it should be able to detect DS9490 and DS9481, too. Kind regards Jan -- Site24x7 APM Insight

Re: [Owfs-developers] libftdi support: take 2

2016-01-28 Thread Johan Ström
On 28/01/16 08:16, Johan Ström wrote: > On 27/01/16 23:42, Jan Kandziora wrote: >> Am 27.01.2016 um 23:09 schrieb Johan Ström: >> >> >> I'm against putting the listing/probing code into owserver. We have >> small tools for everything and shouldn't start overloading tools with >> functions now. Pl

Re: [Owfs-developers] libftdi support: take 2

2016-01-27 Thread Johan Ström
On 27/01/16 23:45, Stefano Miccoli wrote: > Minor glitch on module/owlib/src/c/ow_ftdi.c: > > here you use MIN and MAX macros, which are defined in . > Don’t ask me why, but this file is not included in linux: > > — form ow.h: > > #ifdef HAVE_SYS_TYPES_H > #ifdef __FreeBSD__ > #include > #endif

Re: [Owfs-developers] libftdi support: take 2

2016-01-27 Thread Johan Ström
On 27/01/16 23:42, Jan Kandziora wrote: > Am 27.01.2016 um 23:09 schrieb Johan Ström: >> (libftdi *does* have a ftdi_usb_find_all but "list all" only works on >> libftdi >= 1.x. And it only lists devices with *known* FTDI vid/pid's. >> Let's say a third party device uses a FTDI chip but has obtaine

Re: [Owfs-developers] libftdi support: take 2

2016-01-27 Thread Stefano Miccoli
Minor glitch on module/owlib/src/c/ow_ftdi.c:here you use MIN and MAX macros, which are defined in . Don’t ask me why, but this file is not included in linux:— form ow.h:#ifdef HAVE_SYS_TYPES_H#ifdef __FreeBSD__#include #endif /* __FreeBSD__ */#include                   /* for stat */#endif       

Re: [Owfs-developers] libftdi support: take 2

2016-01-27 Thread Jan Kandziora
Am 27.01.2016 um 23:09 schrieb Johan Ström: > > (libftdi *does* have a ftdi_usb_find_all but "list all" only works on > libftdi >= 1.x. And it only lists devices with *known* FTDI vid/pid's. > Let's say a third party device uses a FTDI chip but has obtained it's > own PID (available for free from

Re: [Owfs-developers] libftdi support: take 2

2016-01-27 Thread Johan Ström
On 27/01/16 23:09, Johan Ström wrote: Hi, thanks for your input! On 27/01/16 18:40, Stefano Miccoli wrote: Good news. In a few days I will have an old LinkUSB available for testing, although with a limited number of sensors only: I will try-out your implementation. Great! I've been runni

Re: [Owfs-developers] libftdi support: take 2

2016-01-27 Thread Johan Ström
Hi, thanks for your input! On 27/01/16 18:40, Stefano Miccoli wrote: Good news. In a few days I will have an old LinkUSB available for testing, although with a limited number of sensors only: I will try-out your implementation. Great! I've been running one LinkUSB and one DS2480B, FTDI-dong

Re: [Owfs-developers] libftdi support: take 2

2016-01-27 Thread Stefano Miccoli
Good news. In a few days I will have an old LinkUSB available for testing, although with a limited number of sensors only: I will try-out your implementation. Let me just add a few remarks. Auto-detection (or plug and play). I’m an old Unix guy and configuration and tuning is just part of the

[Owfs-developers] libftdi support: take 2

2016-01-25 Thread Johan Ström
Hi, some of you may remember my earlier attempts to add a libftdi based LinkUSB interface into master. For reference: http://sourceforge.net/p/owfs/mailman/message/32492037/ In short, the client-timings are generally cut about 2.5 times, depending on operation. A temp sensor is read in ~50ms i