FTDI problem on pi

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

FTDI problem on pi

Colin Law
Running a LinkUSB on a pi zero (Raspbian Jessie), with owserver
3.1p4-1 from jessie testing, I very occasionally (every few weeks) see
in syslog

Mar  1 22:10:50 pi004 kernel: [194834.694657] ftdi_sio ttyUSB0: failed
to get modem status: -110
Mar  1 22:11:00 pi004 kernel: [194844.694679] ftdi_sio ttyUSB0: failed
to get modem status: -110
Mar  1 22:11:06 pi004 kernel: [194850.694734] ftdi_sio ttyUSB0:
ftdi_set_termios FAILED to set databits/stopbits/parity
Mar  1 22:11:07 pi004 kernel: [194851.694724] ftdi_sio ttyUSB0:
ftdi_set_termios urb failed to set baudrate
Mar  1 22:11:12 pi004 kernel: [194856.694771] ftdi_sio ttyUSB0: urb
failed to clear flow control
Mar  1 22:11:22 pi004 kernel: [194866.694810] ftdi_sio ttyUSB0: failed
to get modem status: -110
Mar  1 22:11:27 pi004 kernel: [194871.694819] ftdi_sio ttyUSB0: urb
failed to clear flow control

and thereafter owserver returns
Errno::ECONNRESET: Connection reset by peer
There is nothing else abnormal in syslog around the above ftdi messages.

After a reboot everything works ok for another few weeks.

Has anyone any suggestions what might be causing it?

Colin

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: FTDI problem on pi

Johan Ström-3
Hi,

no suggestion on what it could be, but it looks like you are using the
serial device layer, not the libftdi layer.

I'm not sure it will make a difference, or behave more reliable, but you
could try to use direct ftdi access, make sure to compile with libftdi
support (or if if that is on by default on jessie?) and check the man
pages (use something like --device ftdi:xxx:yyyy).

Besides that, have you tried pulling the LinkUSB out and re-inserting it
(both on USB side and 1W side, if 1W net is externally powered)? And
also restarting owserver.

Johan


On 02/03/17 10:21, Colin Law wrote:

> Running a LinkUSB on a pi zero (Raspbian Jessie), with owserver
> 3.1p4-1 from jessie testing, I very occasionally (every few weeks) see
> in syslog
>
> Mar  1 22:10:50 pi004 kernel: [194834.694657] ftdi_sio ttyUSB0: failed
> to get modem status: -110
> Mar  1 22:11:00 pi004 kernel: [194844.694679] ftdi_sio ttyUSB0: failed
> to get modem status: -110
> Mar  1 22:11:06 pi004 kernel: [194850.694734] ftdi_sio ttyUSB0:
> ftdi_set_termios FAILED to set databits/stopbits/parity
> Mar  1 22:11:07 pi004 kernel: [194851.694724] ftdi_sio ttyUSB0:
> ftdi_set_termios urb failed to set baudrate
> Mar  1 22:11:12 pi004 kernel: [194856.694771] ftdi_sio ttyUSB0: urb
> failed to clear flow control
> Mar  1 22:11:22 pi004 kernel: [194866.694810] ftdi_sio ttyUSB0: failed
> to get modem status: -110
> Mar  1 22:11:27 pi004 kernel: [194871.694819] ftdi_sio ttyUSB0: urb
> failed to clear flow control
>
> and thereafter owserver returns
> Errno::ECONNRESET: Connection reset by peer
> There is nothing else abnormal in syslog around the above ftdi messages.
>
> After a reboot everything works ok for another few weeks.
>
> Has anyone any suggestions what might be causing it?
>
> Colin
>
> ------------------------------------------------------------------------------
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: FTDI problem on pi

Colin Law
It appears that the supplied version is not compiled with the ftdi option.

I had not tried restarting owserver or unplugging the linkUSB.
Unfortunately it has so far always failed at a inconvenient time when
the priority has been to get the heating running again before the
house freezes :)

Next time hopefully I will be able to try one or other of those.

Colin

On 2 March 2017 at 12:03, Johan Ström <[hidden email]> wrote:

> Hi,
>
> no suggestion on what it could be, but it looks like you are using the
> serial device layer, not the libftdi layer.
>
> I'm not sure it will make a difference, or behave more reliable, but you
> could try to use direct ftdi access, make sure to compile with libftdi
> support (or if if that is on by default on jessie?) and check the man
> pages (use something like --device ftdi:xxx:yyyy).
>
> Besides that, have you tried pulling the LinkUSB out and re-inserting it
> (both on USB side and 1W side, if 1W net is externally powered)? And
> also restarting owserver.
>
> Johan
>
>
> On 02/03/17 10:21, Colin Law wrote:
>> Running a LinkUSB on a pi zero (Raspbian Jessie), with owserver
>> 3.1p4-1 from jessie testing, I very occasionally (every few weeks) see
>> in syslog
>>
>> Mar  1 22:10:50 pi004 kernel: [194834.694657] ftdi_sio ttyUSB0: failed
>> to get modem status: -110
>> Mar  1 22:11:00 pi004 kernel: [194844.694679] ftdi_sio ttyUSB0: failed
>> to get modem status: -110
>> Mar  1 22:11:06 pi004 kernel: [194850.694734] ftdi_sio ttyUSB0:
>> ftdi_set_termios FAILED to set databits/stopbits/parity
>> Mar  1 22:11:07 pi004 kernel: [194851.694724] ftdi_sio ttyUSB0:
>> ftdi_set_termios urb failed to set baudrate
>> Mar  1 22:11:12 pi004 kernel: [194856.694771] ftdi_sio ttyUSB0: urb
>> failed to clear flow control
>> Mar  1 22:11:22 pi004 kernel: [194866.694810] ftdi_sio ttyUSB0: failed
>> to get modem status: -110
>> Mar  1 22:11:27 pi004 kernel: [194871.694819] ftdi_sio ttyUSB0: urb
>> failed to clear flow control
>>
>> and thereafter owserver returns
>> Errno::ECONNRESET: Connection reset by peer
>> There is nothing else abnormal in syslog around the above ftdi messages.
>>
>> After a reboot everything works ok for another few weeks.
>>
>> Has anyone any suggestions what might be causing it?
>>
>> Colin
>>
>> ------------------------------------------------------------------------------
>> 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
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
> ------------------------------------------------------------------------------
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: FTDI problem on pi

Martin Patzak (GMX)
On 03/02/2017 08:50 PM, Colin Law wrote:
> It appears that the supplied version is not compiled with the ftdi option.

how do you check for that? Why is the Debian package not compiled with ftdi?


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: FTDI problem on pi

Colin Law
On 3 March 2017 at 08:42, Martin Patzak (GMX) <[hidden email]> wrote:
On 03/02/2017 08:50 PM, Colin Law wrote:
> It appears that the supplied version is not compiled with the ftdi option.

how do you check for that? Why is the Debian package not compiled with ftdi?

When I ran it I got
 OWFS[26316]: DEFAULT: ow_arg.c:(85) FTDI support not included in compilation. Use generic serial device.
which seemed suggestive.

No idea why it is not built with that, you would have to ask the packager I suppose.

Colin



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: FTDI problem on pi

Martin Patzak (GMX)



On 03/03/2017 10:02 AM, Colin Law wrote:
On 3 March 2017 at 08:42, Martin Patzak (GMX) <[hidden email]> wrote:
On 03/02/2017 08:50 PM, Colin Law wrote:
> It appears that the supplied version is not compiled with the ftdi option.

how do you check for that? Why is the Debian package not compiled with ftdi?

When I ran it I got
 OWFS[26316]: DEFAULT: ow_arg.c:(85) FTDI support not included in compilation. Use generic serial device.
which seemed suggestive.
ok, I see. And yes, it does seem suggestive :-)

No idea why it is not built with that, you would have to ask the packager I suppose.
I might have to do that then ;-)
Thanks Colin,

Martin

Colin




------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: FTDI problem on pi

Jan Kandziora
In reply to this post by Colin Law
Am 02.03.2017 um 10:21 schrieb Colin Law:

> Running a LinkUSB on a pi zero (Raspbian Jessie), with owserver
> 3.1p4-1 from jessie testing, I very occasionally (every few weeks) see
> in syslog
>
> Mar  1 22:10:50 pi004 kernel: [194834.694657] ftdi_sio ttyUSB0: failed
> to get modem status: -110
> Mar  1 22:11:00 pi004 kernel: [194844.694679] ftdi_sio ttyUSB0: failed
> to get modem status: -110
> Mar  1 22:11:06 pi004 kernel: [194850.694734] ftdi_sio ttyUSB0:
> ftdi_set_termios FAILED to set databits/stopbits/parity
> Mar  1 22:11:07 pi004 kernel: [194851.694724] ftdi_sio ttyUSB0:
> ftdi_set_termios urb failed to set baudrate
> Mar  1 22:11:12 pi004 kernel: [194856.694771] ftdi_sio ttyUSB0: urb
> failed to clear flow control
> Mar  1 22:11:22 pi004 kernel: [194866.694810] ftdi_sio ttyUSB0: failed
> to get modem status: -110
> Mar  1 22:11:27 pi004 kernel: [194871.694819] ftdi_sio ttyUSB0: urb
> failed to clear flow control
>
These are messages from the ftdi_sio USB driver. All this usually means
the kernel simply cannot talk to the USB converter. Please check your
kernel log for USB related messages.

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: FTDI problem on pi

Colin Law
Thanks for looking Jan. The only other usb messages were the startup
messages associated with the linkUSB and the wifi adaptor (which
continued to work normally) which were from several days earlier when
it was last rebooted. Those for the linkUSB are

Feb 27 16:00:44 pi004 kernel: [    3.883218] usb 1-1.4: new full-speed
USB device number 4 using dwc_otg
Feb 27 16:00:44 pi004 kernel: [    4.021406] usb 1-1.4: New USB device
found, idVendor=0403, idProduct=6001
Feb 27 16:00:44 pi004 kernel: [    4.031837] usb 1-1.4: New USB device
strings: Mfr=1, Product=2, SerialNumber=3
Feb 27 16:00:44 pi004 kernel: [    4.045681] usb 1-1.4: Product: FT232R USB UART
Feb 27 16:00:44 pi004 kernel: [    4.053654] usb 1-1.4: Manufacturer: FTDI
Feb 27 16:00:44 pi004 kernel: [    4.061018] usb 1-1.4: SerialNumber: A501HXW7
Feb 27 16:00:44 pi004 kernel: [   11.355906] usbcore: registered new
interface driver usbserial
Feb 27 16:00:44 pi004 kernel: [   11.356020] usbcore: registered new
interface driver usbserial_generic
Feb 27 16:00:44 pi004 kernel: [   11.356124] usbserial: USB Serial
support registered for generic
Feb 27 16:00:44 pi004 kernel: [   11.412223] usbcore: registered new
interface driver ftdi_sio
Feb 27 16:00:44 pi004 kernel: [   11.412352] usbserial: USB Serial
support registered for FTDI USB Serial Device
Feb 27 16:00:44 pi004 kernel: [   11.412715] ftdi_sio 1-1.4:1.0: FTDI
USB Serial Device converter detected
Feb 27 16:00:44 pi004 kernel: [   11.412956] usb 1-1.4: Detected FT232RL
Feb 27 16:00:44 pi004 kernel: [   11.465368] usb 1-1.4: FTDI USB
Serial Device converter now attached to ttyUSB0

I too had expected to see messages about the usb device being
disconnected, or something similar, but there is nothing.

I don't know whether it may be relevant but I have a udev rule to map
the device to /dev/linkUSB but there is no mention of this anywhere in
the log, as far as I can see.

Colin

On 3 March 2017 at 13:24, Jan Kandziora <[hidden email]> wrote:

> Am 02.03.2017 um 10:21 schrieb Colin Law:
>> Running a LinkUSB on a pi zero (Raspbian Jessie), with owserver
>> 3.1p4-1 from jessie testing, I very occasionally (every few weeks) see
>> in syslog
>>
>> Mar  1 22:10:50 pi004 kernel: [194834.694657] ftdi_sio ttyUSB0: failed
>> to get modem status: -110
>> Mar  1 22:11:00 pi004 kernel: [194844.694679] ftdi_sio ttyUSB0: failed
>> to get modem status: -110
>> Mar  1 22:11:06 pi004 kernel: [194850.694734] ftdi_sio ttyUSB0:
>> ftdi_set_termios FAILED to set databits/stopbits/parity
>> Mar  1 22:11:07 pi004 kernel: [194851.694724] ftdi_sio ttyUSB0:
>> ftdi_set_termios urb failed to set baudrate
>> Mar  1 22:11:12 pi004 kernel: [194856.694771] ftdi_sio ttyUSB0: urb
>> failed to clear flow control
>> Mar  1 22:11:22 pi004 kernel: [194866.694810] ftdi_sio ttyUSB0: failed
>> to get modem status: -110
>> Mar  1 22:11:27 pi004 kernel: [194871.694819] ftdi_sio ttyUSB0: urb
>> failed to clear flow control
>>
> These are messages from the ftdi_sio USB driver. All this usually means
> the kernel simply cannot talk to the USB converter. Please check your
> kernel log for USB related messages.
>
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: FTDI problem on pi

Jan Kandziora
Am 03.03.2017 um 14:44 schrieb Colin Law:
>
> I too had expected to see messages about the usb device being
> disconnected, or something similar, but there is nothing.
>
Okay. Then we are a bit lost.

There is nothing we can do about this from OWFS. It's a USB problem.


> I don't know whether it may be relevant but I have a udev rule to map
> the device to /dev/linkUSB but there is no mention of this anywhere in
> the log, as far as I can see.
>
Please try updating the kernel. Maybe there was a bug in ftdi_sio.

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: FTDI problem on pi

Stefano Miccoli
Just for info, I run a similar system, but I do not have any problem. My setup is:

Raspberry Pi Model B Rev 2
LinkUSB, HW rev. E3

Raspbian GNU/Linux 8.0 (jessie)
Linux 4.4.38+ #938 Thu Dec 15 15:17:54 GMT 2016
owserver 2.9p8-6

I would suggest to check the power supply.

Stefano

> On 3 Mar 2017, at 17:48, Jan Kandziora <[hidden email]> wrote:
>
> Am 03.03.2017 um 14:44 schrieb Colin Law:
>>
>> I too had expected to see messages about the usb device being
>> disconnected, or something similar, but there is nothing.
>>
> Okay. Then we are a bit lost.
>
> There is nothing we can do about this from OWFS. It's a USB problem.
>
>
>> I don't know whether it may be relevant but I have a udev rule to map
>> the device to /dev/linkUSB but there is no mention of this anywhere in
>> the log, as far as I can see.
>>
> Please try updating the kernel. Maybe there was a bug in ftdi_sio.
>
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: FTDI problem on pi

Colin Law
It certainly could be a hardware issue. Possibly PSU or the linkUSB or
something else. The fact that it fails so infrequently is unusual
though, for hardware or software.


Colin

On 3 March 2017 at 22:18, Stefano Miccoli <[hidden email]> wrote:

> Just for info, I run a similar system, but I do not have any problem. My setup is:
>
> Raspberry Pi Model B Rev 2
> LinkUSB, HW rev. E3
>
> Raspbian GNU/Linux 8.0 (jessie)
> Linux 4.4.38+ #938 Thu Dec 15 15:17:54 GMT 2016
> owserver 2.9p8-6
>
> I would suggest to check the power supply.
>
> Stefano
>
>> On 3 Mar 2017, at 17:48, Jan Kandziora <[hidden email]> wrote:
>>
>> Am 03.03.2017 um 14:44 schrieb Colin Law:
>>>
>>> I too had expected to see messages about the usb device being
>>> disconnected, or something similar, but there is nothing.
>>>
>> Okay. Then we are a bit lost.
>>
>> There is nothing we can do about this from OWFS. It's a USB problem.
>>
>>
>>> I don't know whether it may be relevant but I have a udev rule to map
>>> the device to /dev/linkUSB but there is no mention of this anywhere in
>>> the log, as far as I can see.
>>>
>> Please try updating the kernel. Maybe there was a bug in ftdi_sio.
>>
>> 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
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
> ------------------------------------------------------------------------------
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers