engine: Unable to load driver: (5, 'Input/output error')

185 views
Skip to first unread message

Kevin Bosworth

unread,
Jan 9, 2017, 6:39:17 AM1/9/17
to weewx-user
I had this running on an older Lubuntu laptop that died. Seems I had no problems then. So here is what I have.

Lubuntu 12.04


sudo tail -f /var/log/syslog
Jan  9 04:25:54 weather weewx[3277]: engine: Platform Linux-3.2.0-119-generic-i686-with-Ubuntu-12.04-precise
Jan  9 04:25:54 weather weewx[3277]: engine: pid file is /var/run/weewx.pid
Jan  9 04:25:54 weather weewx[3281]: engine: Using configuration file /etc/weewx/weewx.conf
Jan  9 04:25:54 weather weewx[3281]: engine: Loading station type WS23xx (weewx.drivers.ws23xx)
Jan  9 04:25:54 weather weewx[3281]: ws23xx: driver version is 0.25
Jan  9 04:25:54 weather weewx[3281]: ws23xx: serial port is /dev/ttyS0
Jan  9 04:25:54 weather weewx[3281]: ws23xx: polling interval is None
Jan  9 04:25:54 weather weewx[3281]: import of driver failed: (5, 'Input/output error') (<class 'termios.error'>)
Jan  9 04:25:54 weather weewx[3281]: engine: Unable to load driver: (5, 'Input/output error')
Jan  9 04:25:54 weather weewx[3281]:     ****  Exiting...
Jan  9 04:30:07 weather kernel: [ 4758.327907] b43legacy-phy0 ERROR: PHY transmission error
Jan  9 04:31:23 weather wpa_supplicant[1050]: WPA: Group rekeying completed with 14:91:82:bd:0f:77 [GTK=TKIP]
Jan  9 04:33:57 weather kernel: [ 4988.761336] b43legacy-phy0 ERROR: PHY transmission error

Not sure what else to do. Tried copying my old backup config files with the same results. I did add myself to to the dailout group.

Thanks, Kevin

Kevin Bosworth

unread,
Jan 19, 2017, 6:17:07 AM1/19/17
to weewx-user
Can anyone help me out here??!!

Thomas Keffer

unread,
Jan 19, 2017, 6:40:41 AM1/19/17
to weewx-user
Things to try:

Does /dev/ttyS0 actually exist?

It looks like you are running weewxd as a daemon, which is usually run as root, so adding yourself to the dialout group will not make any difference. In any case, try running from the command line, and try running as root (by using a 'sudo' prefix). This may give you clues. 

Try running the driver directly. It can give you more clues about what's happening. The command

PYTHONPATH=/usr/share/weewx python /usr/share/weewx/weewx/drivers/ws23xx.py --help

will show you the options available.

-tk

--
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 weewx-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kevin...@gmail.com

unread,
Jan 19, 2017, 7:52:42 AM1/19/17
to weewx...@googlegroups.com
How do I run it normally and not as a daemon?

Kevin

Sent from Yahoo Mail on Android

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/NpeOl7xJ0BQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

Thomas Keffer

unread,
Jan 19, 2017, 7:59:07 AM1/19/17
to weewx-user
See the manual.

-tk

To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 weewx-user+unsubscribe@googlegroups.com.

kevin...@gmail.com

unread,
Jan 19, 2017, 8:05:13 AM1/19/17
to weewx...@googlegroups.com
I have read that big freaking manual 20 times already. Wonder how I ever got the dang thing working in the first place. For some reason it seems like I had heavyweather running also.... But I don't remember.


Kevin

Sent from Yahoo Mail on Android

On Thu, Jan 19, 2017 at 5:58 AM, Thomas Keffer
See the manual.

-tk

On Thu, Jan 19, 2017 at 4:52 AM, kevin...@gmail.com <kevin...@gmail.com> wrote:
How do I run it normally and not as a daemon?

Kevin

Sent from Yahoo Mail on Android

On Thu, Jan 19, 2017 at 4:40 AM, Thomas Keffer
Things to try:

Does /dev/ttyS0 actually exist?

It looks like you are running weewxd as a daemon, which is usually run as root, so adding yourself to the dialout group will not make any difference. In any case, try running from the command line, and try running as root (by using a 'sudo' prefix). This may give you clues. 

Try running the driver directly. It can give you more clues about what's happening. The command

PYTHONPATH=/usr/share/weewx python /usr/share/weewx/weewx/ drivers/ws23xx.py --help
To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@ googlegroups.com.

For more options, visit https://groups.google.com/d/ optout.

--
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 weewx-user+unsubscribe@ googlegroups.com.
For more options, visit https://groups.google.com/d/ optout.

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/NpeOl7xJ0BQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

kevin...@gmail.com

unread,
Jan 19, 2017, 8:14:46 AM1/19/17
to weewx...@googlegroups.com
What is fcntl/select?


Kevin

Sent from Yahoo Mail on Android

mwall

unread,
Jan 19, 2017, 8:38:14 AM1/19/17
to weewx-user
On Thursday, January 19, 2017 at 8:14:46 AM UTC-5, Kevin Bosworth wrote:
What is fcntl/select?

 
kevin,

those are the functions that the ws23xx driver uses to communicate over the serial port.  they are more direct than the pyserial library that many other drivers use.

what kind of computer are you using now?

is the weather station connected to a serial port, or to a usb port using a serial-to-usb adapter?

m

Andrew Milner

unread,
Jan 19, 2017, 8:53:13 AM1/19/17
to weewx-user, kevin...@gmail.com
See 'running weewx' in the user guide.
To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.

kevin...@gmail.com

unread,
Jan 19, 2017, 9:23:10 AM1/19/17
to weewx...@googlegroups.com
It is a old dell laptop. Latitude D600. Serial port and ttyS0 exists. Do I need to install a different library?


Kevin

Sent from Yahoo Mail on Android

--

mwall

unread,
Jan 19, 2017, 9:33:15 AM1/19/17
to weewx-user, kevin...@gmail.com
On Thursday, January 19, 2017 at 9:23:10 AM UTC-5, Kevin Bosworth wrote:
It is a old dell laptop. Latitude D600. Serial port and ttyS0 exists. Do I need to install a different library?

no need to install any libraries.

now try running the driver directly.  if you installed from deb package, it looks like this:

cd /usr/share/weewx
sudo PYTHONPATH=. python weewx/drivers/ws23xx.py --port /dev/ttyS0 --readings

if you installed using setup.py it looks like this:

cd /home/weewx/bin
sudo PYTHONPATH=. python weewx/drivers/ws23xx.py --port /dev/ttyS0 --readings

you should see readings from the station sensors.

m

mwall

unread,
Jan 21, 2017, 10:38:48 AM1/21/17
to weewx-user
On Saturday, January 21, 2017 at 06:59:54 AM UTC-5, Kevin Bosworth wrote:
Here is what I got.

Traceback (most recent call last):
  File "weewx/drivers/ws23xx.py", line 2117, in <module>
    with WS23xx(port) as s:
  File "weewx/drivers/ws23xx.py", line 648, in __init__
    self.serial_port = LinuxSerialPort(port)
  File "weewx/drivers/ws23xx.py", line 908, in __init__
    self.orig_settings = tty.tcgetattr(self.serial_port)
termios.error: (5, 'Input/output error') 
 
 
ok... So my serial port got changed in BIOS. So I tried this.
setserial -g /dev/ttyS[0123456789]
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3
/dev/ttyS2: No such device
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS5, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS6, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS7, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS8, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS9, UART: unknown, Port: 0x0000, IRQ: 0

Now I know it is on COM1 or TTYS0. I then ran the command you gave me with the following.

sudo PYTHONPATH=. python weewx/drivers/ws23xx.py --port /dev/ttyS0 --readings
{'rt': 556.0, 'wc': -2.4, 'cn': 15, 'oh': 85.0, 'it': 22.8, 'ih': 42.0, 'pa': 837.4, 'dp': -4.6, 'ot': -2.4, 'rh': 0.0, 'wind': (0.0, 225.0, 0, 0)}

So I guess it is working. But nothing in the WWW Directory. When I use "sudo /etc/init.d/weewx start" I get ,
* Starting weewx weather system weewx                                   [ OK ]

So now what I guess is my next question. :)

Thanks, Kevin


what is the archive interval for the station?  factory default for ws23xx is 30 minutes, so you probably just need to wait.  or change the interval.

http://weewx.com/docs/usersguide.htm#archive_interval

m

kevin...@gmail.com

unread,
Jan 30, 2017, 4:08:55 AM1/30/17
to weewx...@googlegroups.com
So I said to help with it. I reinstalled lubuntu. And did the weewx install. Everything went perfect like the old laptop. The only thing I can not figure out is how to get the webpage to update every 5 min like before. I set the archive interval to 300 sec, but is only updating every hour. Ideas?

Thanks, Kevin

--

Andrew Milner

unread,
Jan 30, 2017, 5:29:32 AM1/30/17
to weewx-user, kevin...@gmail.com
Can you be more specific?  How frequently are the archive records being saved?  Ids the issue with the creation of the html pages, the .png image files, the ftp of the data to a remote site, or in the browser viewing the html/png files??

what exactly hap[pens every hour, and/or every 5 minutes?

A copy of the log would be useful to understand what is happening!!

It has previously been reported that nginx has some high default media cache times - but you do not say what/how the data is being served or created.
To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages