consolewd and raspberry pi USB error

Didnt want to hijack any other topics so i start a new one.

Im testing the consolewd compiled on raspberry pi. Everything works for 30 minutes or so (sometimes longer sometimes shorter) but then usb connection is lost. What helps is when i close consolewd, blug in and out usb cable from WMR200 and then start consolewd again.

Im running raspbian weezy from raspberry pi website and have nothing else running, everything as it comes in image (had to compile and install libhid).

When i kill consolewd with kill command and then run it again i get messages like this:

This line is repeated over and over again:

send PC ready result -1

And after a while i get this:

USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open USBWrite USB device is not open send PC ready result -1

Next thing i will try is to use seperatl

hummmm
I had that occur once
but then in another test it ran all night
are you running consolewd as root?
you could also try setting permissions on the usb?
sudo r+w+x /dev/rawh1
(from memory, can t remember the exact name of the device (ls /dev/hid* will show it up)

also are you using vers 7.8?

After deleting all history from weather station consolewd has been running constatnly for 2 hours now. Thats best result yet…
Im going to leave it running and will see what happens.

Im running 7.7 version right now…
Thanks for the tips Brian, il see what happens over night. If it crashes again il try those tips.

do try it
(vers 7.8)
(lile that tea add)
(i.e re download to get the new update
http://www.weather-display.com/downloadfiles/consolewdfilespi.zip

should help

is it still runnning OK?

Yes, consolewd is running and haven’t crashed anymore (still running 7.7 version). I cant be sure but it seems that deleting history on wheater station helped for me. Maybe loading old data from device messed up current readings and flooded the USB…

OT: There is issue with 24 Hour graphs on WDL, no Min/Max Humidity values and Moon Rise/Set is always 00:00:00 (does it mean that moon is always showing?).
But these are hopefully all WDL configuration issues :slight_smile:

And here’s the link if anybody interested: http://web.zone.ee/zino/

EDIT:
Ok, after a nice run for almost 3 days consolewd has crashed again. Same problem with the USB…

Updated the consolewd to latest version. Will let you know how it behaves.

Did you try this:

How could i get better debug messages what goes wrong? Is there a setting that can be turned on to get better logging?

have you had more USB lost problems?

there is way to set more debugging output for the libusb calls
I cant remember what the command is at the moment, probably some very old threads on the linux section here about that

I had the first raspberry version crash again after 3 days running. Same usb issues…
Now i updated consolewd to the latest version and it has been running for 2-3 hours.

what was the error when it crashed?

one thing that I am coming to realise that is having a SD memory card as the ‘hard drive’ there might be conflicts with reading and writing of files to that (e.g the ini file, i.e the separate cron programs reading from the ini file when consolewd is writing to the ini file)
these problems did not exist when a normal hard drive is in use

I have had some USB drops out
googling, it might be powered related
it has happened lots when the screen comes out of screen saver mode
so I am going to try not having the screen go blank after a period of time out…googling on how to do that

I don’t have this particular problem for so far, but I experienced the lost of signal from the temp/hum sensor on the Nexus Pro console (Irox). It happens when I have 2 monitors on. If I use only one at a time, PC or Raspberry pi, no problem. :roll:
I think I’ll have to re-locate the Nexus console far away from the monitors.
Just my 2 cts…

I dont have screens attached, raspberry pi works in headless mode. Using ssh to connect to it. I have been restarting consolewd every day atleast once and haven’t had this problem again.

This could maybe help:
http://www.raspberrypi.org/phpBB3/viewtopic.php?p=180028

i bought a higher amperage power adapter to get over my keyboard issues, i managed to get a 1500ma one. Maybe that would solve your issues?

I am looking to try and get teh pi up and running tomorrow as i am off work and its going to be raining.
How far has progress got on it, will i still need to mess around installing lib files?

Also Brian, i want to have an option to save the log files etc… that WD creates to a directory on my NAS, can the pi version do this?

I installed xscreensaver
then disabled that under prefrences, screen saver…(in the drop down select not to blank the screen)
that has fixed by USB drop out on mouse move turning on the screen (it was also happening when the screen turned off sometimes too)

re the install library files:
if you can un tar
http://www.weather-display.com/downloadfiles/consolwdfilespi.tar.gz
(google how to un tar in a terminal )
then you will should all the needed library files and symbolic links in the deploy folder
(which then can be copied to /usr/local/lib via sudo cp . from that deploy folder (saves having to run GoWdconsole.sh)

Had another lockout today. Couldnt even kill the process with sudo kill and also sudo reboot couldnt restart device. So i had to go manully unblug raspberry’s power to restart it.

In dmesg i see this:

Jul 27 14:17:07 raspberrypi kernel: [258968.207399] consolewd       D c0398690     0  2618   2617 0x00000000
Jul 27 14:17:07 raspberrypi kernel: [258968.207535] [<c0398690>] (__schedule+0x2c4/0x5b0) from [<c03973d0>] (schedule_timeout+0x158/0x1e0)
Jul 27 14:17:07 raspberrypi kernel: [258968.207595] [<c03973d0>] (schedule_timeout+0x158/0x1e0) from [<c0398b3c>] (wait_for_common+0xcc/0x198)
Jul 27 14:17:07 raspberrypi kernel: [258968.207652] [<c0398b3c>] (wait_for_common+0xcc/0x198) from [<c0275838>] (usb_start_wait_urb+0x60/0xbc)
Jul 27 14:17:07 raspberrypi kernel: [258968.207703] [<c0275838>] (usb_start_wait_urb+0x60/0xbc) from [<c0275a48>] (usb_control_msg+0xb4/0xe8)
Jul 27 14:17:07 raspberrypi kernel: [258968.207763] [<c0275a48>] (usb_control_msg+0xb4/0xe8) from [<c027dd74>] (usbdev_ioctl+0x1884/0x21b0)
Jul 27 14:17:07 raspberrypi kernel: [258968.207817] [<c027dd74>] (usbdev_ioctl+0x1884/0x21b0) from [<c00d1f7c>] (do_vfs_ioctl+0x80/0x5d0)
Jul 27 14:17:07 raspberrypi kernel: [258968.207865] [<c00d1f7c>] (do_vfs_ioctl+0x80/0x5d0) from [<c00d2500>] (sys_ioctl+0x34/0x60)
Jul 27 14:17:07 raspberrypi kernel: [258968.207923] [<c00d2500>] (sys_ioctl+0x34/0x60) from [<c000da60>] (ret_fast_syscall+0x0/0x30)

Doesnt make much sense to me but maybe it helps u Brian.

I have not had any more usb drops out since I installed xscreensaver then disabled that
(gooling shows I am not the only person who has had to do that)
So I recommend doing that