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, butonly after trying 9600 + 19200bps

On 29/02/16 23:35, Johan Ström wrote:
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 down, it tries to switch back to 9600 by sending a break command. On the next startup, we normally start to scan with 9600bps and sees it immediately. Same thing with DS2480b device type, it always tries with 9600 and works. What happens here is that the switch-back-on-shutdown silently fails. When starting with --link, it will try with 9600, fail, and then try 19200, and it works. But for DS2480b device type, it will only try 9600, thus fail.

Test sequence:
owserver --link ftdi:i:0x0403:0x6001 --debug --traffic
owserver -d 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, butonly after trying 9600 + 19200bps


Platforms which I've have no issues with this on:
FreeBSD 10.2
Ubuntu 14.04.4 via VirtualBox on Mac OS X  (Macbook pro laptop)

Platforms which have issues:
Mac OS X (Same laptop as running VirtualBox)
Stefano's ARMv7l device, running Linux 4.1.17

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 be fixed, my solution is to disable the 9600->19200 transition, unless explicitly asked for via the baud rate setting.

If anyone else has tested, please let us know!

Thanks
Johan


On 16/02/16 09:52, Johan Ström wrote:
On 15/02/16 23:45, Stefano Miccoli wrote:
For me the bug is still present:

owserver —link ftdi:s:0x0403:0x6001:xxxxxx —debug
^C
owserver -d ftdi:s:0x0403:0x6001:xxxxxx --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 bus master.
  DEBUG: ow_ds9097U.c:(643) wrong response (E7 not 00)
DEBUG: ow_ds9097U.c:(660) Failed first attempt at resetting baud rate of bus master ftdi:s:0x0403:0x6001:xxx
  DEBUG: ow_ds9097U.c:(643) wrong response (E7 not 00)
DEBUG: ow_ds9097U.c:(665) Failed second attempt at resetting baud rate of bus master ftdi:s:0x0403:0x6001:xxx
  DEBUG: ow_ds9097U.c:(643) wrong response (E7 not 00)
DEBUG: ow_ds9097U.c:(660) Failed first attempt at resetting baud rate of bus master ftdi:s:0x0403:0x6001:xxx
  DEBUG: ow_ds9097U.c:(643) wrong response (E7 not 00)
DEBUG: ow_ds9097U.c:(665) Failed second attempt at resetting baud rate of bus master ftdi:s:0x0403:0x6001:xxx
  DEBUG: ow_ds9097U.c:(627) wrong response (F7 not 44)
  DEBUG: ow_ds9097U.c:(565) Send the initial reset to the bus master.

and here its starts over again…

If I now retry with —link I get

DEFAULT: ow_link.c:(364) LINK detection error, trying powercycle
DEFAULT: ow_link.c:(373) LINK detection error, giving up

but then everything seems OK.

At this point the only way out for using the -d driver is to unplug and replug the LinkUSB.

Can you please post (gist) full debug log output, start without adapter plugged in and then do what you describe?

Thanks


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140


_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140


_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to