Re: [Owfs-developers] problems starting owserver on a LinkUSB with option link

2017-08-06 Thread Martin Patzak (GMX)



On 04.08.2017 11:09, Johan Ström wrote:





Main reason for using the --link option would be the increased 
performance by factor 2!


Not 100% correct. LinkUSB can be used through regular serial device 
just fine without libftdi & libusb. However, if owfs is built with 
libftdi and it is used instead of using a serial tty, the performance 
is improved as Martin writes.


With "--link=/dev/ttyUSB0" it would access it as serial device (no 
ftdi required).
With "--link=ftdi:XXX (XXX as per man page) it would use libftdi for 
direct communication.
Ok, thanks Johan, for clearing this one up, which in turn got me 
building from source and solving the issue.
This difference in accessing it in two separate modes was not understood 
by me from reading the man-page.


You could also try "--device=/dev/ttyUSB0" to use in "emulated 
DS2408B-mode"

yes this works fine.


I had owfs 3.1p5 installed from a debian package.
So, when I tried to access the LinkUSB with option "i" using the USB 
vendor and device number of the LinkUSB V1.7


sudo owserver --link=ftdi:i:0x0403:0x6001 --debug

I got no debug output at all. But an entry in syslog was found, that the 
debian package had been build without ftdi option - well thats 
unfortunate ;)


After *building the newest owserver* from git source 3.2p1 *with the 
ftdi option enabled it works as expected* with LinkUSB V1.7 as well as 
V1.4 (so far it runs - I did not have time to do performance tests)
here is the excerpt from the debug (note: the command is 
owserver_LinkUSB because I built it with that name to keep the debian 
packaged version separate)


/sudo owserver_LinkUSB --link=ftdi:i:0x0403:0x6001 --debug
DEBUG MODE
libow version:
3.2p1
  DEBUG: ow_daemon.c:(170) main thread id = 140604669374976
  DEBUG: ow_inotify.c:(80) No configuration files to monitor
CONNECT: ow_dnssd.c:(81) Zeroconf/Bonjour is disabled since dnssd 
library isn't found

   CALL: ow_parsename.c:(104) path=[]
  DEBUG: owlib.c:(77) Global temp limit 0C to 100C (for fake and mock 
adapters)

  DEBUG: ow_com.c:(47) Auto initialization of ftdi:i:0x0403:0x6001
  DEBUG: ow_ftdi.c:(202) Sending FTDI break..
  DEBUG: ow_link.c:(328) Detecting ftdi LINK using 9600 bps
  DEBUG: ow_ftdi.c:(202) Sending FTDI break..
  DEBUG: ow_link.c:(360) Slurp in initial bytes
  DEBUG: ow_ftdi.c:(484) ftdi_write: 1 = actual 1
  DEBUG: ow_link.c:(431) Checking LINK version
  DEBUG: ow_ftdi.c:(402) attempt 1 bytes Time: 1.00 seconds
  DEBUG: ow_ftdi.c:(463) ftdi_read: 1 - 0 = 1 (3 retries)
...
  DEBUG: ow_link.c:(218) Link version is unrecognized: LinkUSB V1.7 
(but that's ok).

  DEBUG: ow_link.c:(278) Reconfiguring found LinkUSB to 19200bps
  DEBUG: ow_link.c:(500) LINK set baud to 19200
  DEBUG: ow_link.c:(525) LINK change baud string <,>
  DEBUG: ow_ftdi.c:(484) ftdi_write: 1 = actual 1
  DEBUG: ow_ftdi.c:(484) ftdi_write: 1 = actual 1
  DEBUG: ow_link.c:(431) Checking LINK version
  DEBUG: ow_ftdi.c:(402) attempt 1 bytes Time: 1.00 seconds
  DEBUG: ow_ftdi.c:(463) ftdi_read: 1 - 0 = 1 (2 retries)
...
  DEBUG: ow_link.c:(218) Link version is unrecognized: LinkUSB V1.7 
(but that's ok).

  DEBUG: ow_net_server.c:(76) ServerAddr: [0.0.0.0] [4304]
/

So, again, thank you Johan for pointing out the detail with the ftdi 
addressing scheme, which got me building from source which solved the 
problem for me.


Of course, it does not explain why the access as serial device without 
ftdi fails.
But maybe thats a moot point, since you might as well access it in 
emulated DS2408B-mode, which works fine.


Martin
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Resetting/reinitialize a DS2450

2017-08-06 Thread Jan Kandziora
Am 06.08.2017 um 18:52 schrieb Michael Hughes:
> 
> I am using the ow C API to read all of my Dallas 1-Wire devices.
> I do a OW_init("/dev/cuao0").  I then go in to a loop and use
> OW_get to read each device.  I use the following line to read the 
> voltages:
> 
> OW_get( "/uncached/1F.49D1/main/20.EDCD/volt.all", 
> ,  );
> 
Please give me some time to prepare such a setup of a DS2450 behind a
DS2409 myself.

Could you test if you had the same problem when the DS2450 is directly
connected to the host adaptor?

Kind regards

Jan

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Resetting/reinitialize a DS2450

2017-08-06 Thread Michael Hughes
On Wed, 2 Aug 2017 02:48:09 +0200
Jan Kandziora  wrote:

> Am 02.08.2017 um 01:17 schrieb Michael Hughes:
> > 
> > If for some reason the leg that a DS2450 is on drops off line and
> > then comes back online, the values that are retrieved don't make
> > any sense. If I restart my program it will work again.  Is there
> > anyway to reset/reinitialize the DS2450?  I'm reading the values
> > from it with a get
> > of /uncached/1F.49D1/main/20.EDCD/volt.all. 
> Which version of owfs are you using? If not v3.2p1, I suggest to
> update first.
> 
> $ /opt/owfs/bin/owserver --version
> 
> Kind regards
> 
>   Jan

Jan,
I have done the update, but if the line that has the DS2450 drops
offline and then comes back online I still get values that don't make
sense.

/usr/local/bin/owserver version:
3.2p1
libow version:
3.2p1

Values from the DS2450 before taking the line off line:
 4.25  2.25  4.46  4.52

Values from the DS2450 after putting the line back on line.
 0.00  4.44  0.00  0.00

I am using the ow C API to read all of my Dallas 1-Wire devices.  I do
a OW_init("/dev/cuao0").  I then go in to a loop and use OW_get to read
each device.  I use the following line to read the voltages:

OW_get( "/uncached/1F.49D1/main/20.EDCD/volt.all", ,
 );


-- 
Michael D Hughes 


pgpf74p4eiooE.pgp
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers