Hi all,
 
Gesendet: Dienstag, 08. August 2017 um 21:29 Uhr
Von: "Martin Patzak (GMX)" <martin.pat...@gmx.de>
An: "OWFS (One-wire file system) discussion and help" <owfs-developers@lists.sourceforge.net>
Betreff: Re: [Owfs-developers] problems starting owserver on a LinkUSB with option link
 
On 07.08.2017 21:43, Johan Ström wrote:

...
 
Great that you got it working :) But man page could perhaps be improved then. If you have any suggestions, please feel free to provide them through a patch or on mailing list. Source is at https://sourceforge.net/p/owfs/code/ci/master/tree/src/man/man1/device.1so
yes, I have to check, why I did not understand the meaning of the words in the manual;) - however I understood your words very clearly:

    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.

maybe something like this should be in the manual... I might be able to contribute once I fully understand - someday soon hopefully :)

 
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 ;)
Did the owserver process stay alive after this? I usually run testing with flags --foreground --fatal_debug to have all debug output on stdout, and not daemonize.
There should be an util named owusbprobe which can help you to scan devices and give some hints on how to address it.
No, the owserver process when using flags --debug (and debug implies foreground, thus preventing daemonization) dies without debug message - but entry in syslog is there:

    ow_arg.c:(85) FTDI support not included in compilation.

your flags --foreground --fatal_debug also yield the same result.

Unrelated: do not run owserver with sudo. In this particular case (ftdi), it might be an easy workaround for fixing the device permissions. Besides that, there is no reason at all to run as root, and is never recommended.
Don't remember from the top of my head, but you will need to chown/chgrp some node in /dev/usb/something for that particular user. Not sure if that was ever documented properly..
Yes, thank you for pointing that out, I have some issues with that and the ftdi command, but I will write this in a separate message to the board.
 

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.
Just to be clear, which parameters are you using when it is not working (and is this with latest version as well? or dependent on compile options?)?
 
the serial mode with link=/dev/ttyUSB0 does NOT work in either the pre-built debian package 3.1p5 nor in my self-built owserver from git-source 3.2p1.
When started with your suggested flags --fatal_debug --foreground the message is
   
    DEFAULT: owlib.c:(52) No valid 1-wire buses found

As before-mentioned the ftdi mode with link=ftdi:XXX does NOT work with the pre-built debian package, because the option ftdi was disabled. And it works as expected when enabling it and building from git-source 3.2p1.

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
 
 
try the attached small patch. For me it did the trick to get back the linkUSB (and linkOEM) support. It is copied from an old (I forgot which) version of owfs.
 
Cheers,
Hans-Frieder
--- a/module/owlib/src/c/ow_link.c	2016-03-16 11:46:14.000000000 +0100
+++ b/module/owlib/src/c/ow_link.c	2017-01-17 22:37:18.224591922 +0100
@@ -258,6 +258,24 @@ GOOD_OR_BAD LINK_detect(struct port_in *
 			
 
 		case ct_serial:
+			pin->baud = B9600 ;
+
+			pin->flow = flow_first ;
+			RETURN_GOOD_IF_GOOD( LINK_detect_serial(in) ) ;
+
+			LEVEL_DEBUG("Second attempt at serial LINK setup");
+			pin->flow = flow_second ;
+			RETURN_GOOD_IF_GOOD( LINK_detect_serial(in) ) ;
+
+			LEVEL_DEBUG("Third attempt at serial LINK setup");
+			pin->flow = flow_first ;
+			RETURN_GOOD_IF_GOOD( LINK_detect_serial(in) ) ;
+
+			LEVEL_DEBUG("Fourth attempt at serial LINK setup");
+			pin->flow = flow_second ;
+			RETURN_GOOD_IF_GOOD( LINK_detect_serial(in) ) ;
+			break ;
+
 		case ct_ftdi:
 		{
 			/* The LINK (both regular and USB) can run in different baud modes.
------------------------------------------------------------------------------
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

Reply via email to