Hi

I've been using Davis Envoy + Weewx combo since 2011. About year ago I 
moved Weewx from bare metal to Proxmox VM. Since that I have got ftdi 
errors every 1-4 weeks that can be solved only by pulling usb-plug out and 
putting it back again (for example system reboot does not restore 
communication - ftdi chip needs to be actually depowered):  

syslog: 
Mar 12 13:59:06 keito weewx[266587] ERROR weewx.drivers.vantage: LOOP try 
#1; error: Expected to read 99 chars; got 0 instead
Mar 12 13:59:10 keito weewx[266587] ERROR weewx.drivers.vantage: LOOP try 
#2; error: Expected to read 99 chars; got 0 instead
Mar 12 13:59:14 keito weewx[266587] ERROR weewx.drivers.vantage: LOOP try 
#3; error: Expected to read 99 chars; got 0 instead
Mar 12 13:59:18 keito weewx[266587] ERROR weewx.drivers.vantage: LOOP try 
#4; error: Expected to read 99 chars; got 0 instead
Mar 12 13:59:18 keito weewx[266587] ERROR weewx.drivers.vantage: LOOP max 
tries (4) exceeded.
Mar 12 13:59:18 keito weewx[266587] INFO weewx.engine: Main loop exiting. 
Shutting engine down.
Mar 12 13:59:18 keito weewx[266587] INFO weewx.engine: Shutting down 
StdReport thread
Mar 12 13:59:18 keito kernel: [1654776.457856] ftdi_sio ttyUSB0: 
usb_serial_generic_write_bulk_callback - nonzero urb status: -71
Mar 12 13:59:18 keito kernel: [1654776.459321] ftdi_sio ttyUSB0: failed to 
get modem status: -71
Mar 12 13:59:18 keito kernel: [1654776.460276] ftdi_sio ttyUSB0: error from 
flowcontrol urb
Mar 12 13:59:18 keito weewx[266587] CRITICAL __main__: Caught WeeWxIOError: 
Max tries exceeded while getting LOOP data.
Mar 12 13:59:18 keito weewx[266587] CRITICAL __main__:     ****  Waiting 60 
seconds then retrying...
Mar 12 14:00:18 keito weewx[266587] INFO __main__: retrying...
Mar 12 14:00:18 keito kernel: [1654836.516473] ftdi_sio ttyUSB0: 
ftdi_set_termios FAILED to set databits/stopbits/parity
Mar 12 14:00:18 keito kernel: [1654836.517516] ftdi_sio ttyUSB0: 
ftdi_set_termios urb failed to set baudrate
Mar 12 14:00:18 keito weewx[266587] INFO weewx.engine: Loading station type 
Vantage (weewx.drivers.vantage)
Mar 12 14:00:18 keito weewx[266587] ERROR weewx.engine: Import of driver 
failed: [Errno 5] Input/output error (<class 'OSError'>)
Mar 12 14:00:18 keito kernel: [1654836.518524] ftdi_sio ttyUSB0: failed to 
set flow control: -84
Mar 12 14:00:18 keito kernel: [1654836.520634] ftdi_sio ttyUSB0: failed to 
set flow control: -84
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     **** 
 Traceback (most recent call last):
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 119, in setupStation
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****     
 self.console = loader_function(config_dict, self)
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****    File 
"/usr/share/weewx/weewx/drivers/vantage.py", line 40, in loader
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****     
 return VantageService(engine, config_dict)
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****    File 
"/usr/share/weewx/weewx/drivers/vantage.py", line 1916, in __init__
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****     
 Vantage.__init__(self, **config_dict[DRIVER_NAME])
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****    File 
"/usr/share/weewx/weewx/drivers/vantage.py", line 514, in __init__
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****     
 self.port.openPort()
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****    File 
"/usr/share/weewx/weewx/drivers/vantage.py", line 309, in openPort
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****     
 self.serial_port = serial.Serial(self.port, self.baudrate, 
timeout=self.timeout)
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****    File 
"/usr/lib/python3/dist-packages/serial/serialutil.py", line 244, in __init__
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****     
 self.open()
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****    File 
"/usr/lib/python3/dist-packages/serial/serialposix.py", line 343, in open
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****     
 self._update_dtr_state()
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****    File 
"/usr/lib/python3/dist-packages/serial/serialposix.py", line 691, in 
_update_dtr_state
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     ****     
 fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)
Mar 12 14:00:18 keito weewx[266587] CRITICAL weewx.engine:     **** 
 OSError: [Errno 5] Input/output error
Mar 12 14:00:18 keito weewx[266587] CRITICAL __main__: Unable to load 
driver: [Errno 5] Input/output error
Mar 12 14:00:18 keito weewx[266587] CRITICAL __main__:     ****  Exiting...
Mar 12 14:00:18 keito kernel: [1654836.528654] ftdi_sio ttyUSB0: failed to 
get modem status: -71
Mar 12 14:00:18 keito kernel: [1654836.529720] ftdi_sio ttyUSB0: error from 
flowcontrol urb

$ sudo dmesg
[1125845.535688] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now 
disconnected from ttyUSB0
[1125845.535696] ftdi_sio 3-1:1.0: device disconnected
[1125848.031559] usb 3-1: new full-speed USB device number 4 using uhci_hcd
[1125848.223499] usb 3-1: New USB device found, idVendor=0403, 
idProduct=6015, bcdDevice=10.00
[1125848.223504] usb 3-1: New USB device strings: Mfr=1, Product=2, 
SerialNumber=3
[1125848.223505] usb 3-1: Product: FT231X USB UART
[1125848.223506] usb 3-1: Manufacturer: FTDI
[1125848.223507] usb 3-1: SerialNumber: DN031FK6
[1125848.231534] ftdi_sio 3-1:1.0: FTDI USB Serial Device converter detected
[1125848.231557] usb 3-1: Detected FT-X
[1125848.240892] usb 3-1: FTDI USB Serial Device converter now attached to 
ttyUSB0
[1654776.457856] ftdi_sio ttyUSB0: usb_serial_generic_write_bulk_callback - 
nonzero urb status: -71
[1654776.459321] ftdi_sio ttyUSB0: failed to get modem status: -71
[1654776.460276] ftdi_sio ttyUSB0: error from flowcontrol urb
[1654836.516473] ftdi_sio ttyUSB0: ftdi_set_termios FAILED to set 
databits/stopbits/parity
[1654836.517516] ftdi_sio ttyUSB0: ftdi_set_termios urb failed to set 
baudrate
[1654836.518524] ftdi_sio ttyUSB0: failed to set flow control: -84
[1654836.520634] ftdi_sio ttyUSB0: failed to set flow control: -84
[1654836.528654] ftdi_sio ttyUSB0: failed to get modem status: -71
[1654836.529720] ftdi_sio ttyUSB0: error from flowcontrol urb

Proxmox gives quite limited usb passthrough options, only usb3 forcing, but 
problem remains regardless this. 

Debian VM (bookworm/sid) is currently running kernel version 5.16.7 and 
Proxmox 5.13.19. 

Any ideas how to solve this problem? Is there command that would reset ftdi 
chip communication without physical interaction? I have old RS232 interface 
somewhere, mayby some other USB UART would work better? Slowing down 
communication (currently as default 19200)? I had zero problems with this 
adapter on bare metal, but with new server hardware (Supermicro 
motherboard) I have used only VM. 

Weewx version 4.7.0 (deb-package) and wee_device highlights:

$ sudo wee_device --info
Using configuration file /etc/weewx/weewx.conf
Using Vantage driver version 3.2.3 (weewx.drivers.vantage)
Querying...
Davis Vantage EEPROM settings:

    CONSOLE TYPE:                   Vantage Pro2

    CONSOLE FIRMWARE:
      Date:                         Sep 12 2017
      Version:                      3.80

Thanks for all ideas, Samuli

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/eb43d681-9284-413e-8313-89789eb8e857n%40googlegroups.com.

Reply via email to