joshftx
Posts: 10
Joined: Sun Dec 02, 2012 3:29 pm

TimeLapse causing Network drop

Fri Jun 07, 2013 4:47 pm

So, when using the raspistill timelapse function, combined with a wifi dongle, I've noticed that after a little while, I eventually lose network access on the Pi completely. It continues to run, finishing the timelapse and encoding it per my script, however, I get no network (wired or wireless) until I power cycle the pi.

If I only use wired network and unplug the usb wifi dongle, it works fine, and I never lose network. However, like I mentioned, if the usb wifi is plugged in, after 30 minutes or so, BOTH wired and wireless networking disappear.

I run it headless, so I haven't tried plugging it into a monitor yet to see if there's any message on the console, or to verify that i still have console access at all once it drops.

Any ideas? My best guess was that the pi's camera module is drawing too much power away, and hosing it up.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24129
Joined: Sat Jul 30, 2011 7:41 pm

Re: TimeLapse causing Network drop

Fri Jun 07, 2013 7:18 pm

I think your power thoughts may be right. Can you try a beefier supply?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

erikcf
Posts: 19
Joined: Thu May 23, 2013 4:17 am

Re: TimeLapse causing Network drop

Fri Jun 07, 2013 11:19 pm

I've been seeing the same thing happen on mine; though I'm using a model A, so there's no wired network connection. I'm running it headless with wifi. Also, this was with raspivid rather than raspistill.

I'm using a 2.1A USB power supply (a rechargeable USB battery pack, actually) and I haven't tested it with the wifi dongle on a powered USB hub yet (the only compatible one I have is on my monitor, so it is a bit inconvenient).

erikcf
Posts: 19
Joined: Thu May 23, 2013 4:17 am

Re: TimeLapse causing Network drop

Sat Jun 08, 2013 7:43 am

I tested it again, but this time with the HDMI hooked up to a monitor and the wifi dongle plugged into a powered USB hub instead of directly attached. Based on bit-rate and the size of the video file recorded, it probably froze after about 30 minutes. It is being sent over the wifi with netcat to another computer where it is saved and being displayed. When the connection went down, the preview on the Pi also froze. I probably should have set the preview opacity or size so I could see if there were any console messages. I tried plugging in a USB keyboard afterward (one that I've used with it before), but it wouldn't even initialize (the F Lock light goes on for this keyboard when initialized if I had it on when I last used it, which I always do).

I currently have the wifi dongle unplugged and just have it displaying the camera output with raspivid without sending it anywhere and it has gone for nearly an hour and a half so far without issue, so like joshftx it seems to work fine without the wifi dongle.

I don't think the issue is power-related in my case.

joshftx: Which wifi dongle are you using and which chipset does it use? I'm using the Wi-Pi that element14 sells, which uses some kind of Ralink chipset, I think. I'm considering buying something different to test.

erikcf
Posts: 19
Joined: Thu May 23, 2013 4:17 am

Re: TimeLapse causing Network drop

Fri Jun 14, 2013 1:49 am

I bought an EDIMAX EW-7811Un which uses some type of Realtek chipset rather than Ralink and it seems to be working fine. I streamed video for over an hour with no issues. At some point the video stream stopped and I thought it froze, but then I looked over and realized that my battery pack ran out - I should have charged it before this test. :)

I got that wifi adapter partly because I just wanted something inexpensive to test. Don't expect much range out of it, especially if you want good data rates.

joshftx
Posts: 10
Joined: Sun Dec 02, 2012 3:29 pm

Re: TimeLapse causing Network drop

Fri Jun 14, 2013 3:44 am

Indeed I've been using an ralink adapter. I'll try another make and seeing it helps.

erikcf
Posts: 19
Joined: Thu May 23, 2013 4:17 am

Re: TimeLapse causing Network drop

Sat Jun 15, 2013 2:56 am

I've looked around and found posts from others who have also had similar issues with Ralink-based devices on the Raspberry Pi, though it seems that using it in combination with the camera may make it happen sooner, as they were talking about it freezing after hours to a day or two of usage (this was before the camera module was available). At least one of them is someone who now has at least one camera module and posts on the camera module forum.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24129
Joined: Sat Jul 30, 2011 7:41 pm

Re: TimeLapse causing Network drop

Sat Jun 15, 2013 8:07 am

erikcf wrote:I've looked around and found posts from others who have also had similar issues with Ralink-based devices on the Raspberry Pi, though it seems that using it in combination with the camera may make it happen sooner, as they were talking about it freezing after hours to a day or two of usage (this was before the camera module was available). At least one of them is someone who now has at least one camera module and posts on the camera module forum.
I'm guessing that people using the camera to stream are seeing the problem earlier simply because of the huge amount of data sent while streaming compared with normal usage.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

gabone
Posts: 19
Joined: Fri Dec 28, 2012 12:23 pm

Re: TimeLapse causing Network drop

Sat Jun 15, 2013 2:35 pm

I am experiencing the same behavior with my camera and a wifi dongle. I have a TP-LINK TL-WN722N. I realized that with lower resolution raspistill works fine, but when I try higher than 1024 it loses the network connection.

gabone
Posts: 19
Joined: Fri Dec 28, 2012 12:23 pm

Re: TimeLapse causing Network drop

Sat Jun 15, 2013 2:56 pm

I checked the logs and I found this:

Code: Select all

Jun 15 14:19:02 raspberrypi kernel: [  858.204008] ERROR::dwc_otg_hcd_urb_enqueue:482: Not connected
Jun 15 14:19:02 raspberrypi kernel: [  858.204008] 
Jun 15 14:19:02 raspberrypi kernel: [  858.204032] ERROR::dwc_otg_hcd_urb_enqueue:482: Not connected
Jun 15 14:19:02 raspberrypi kernel: [  858.204032] 
Jun 15 14:19:02 raspberrypi kernel: [  858.204056] ERROR::dwc_otg_hcd_urb_enqueue:482: Not connected
Jun 15 14:19:02 raspberrypi kernel: [  858.204056] 
Jun 15 14:19:02 raspberrypi kernel: [  858.204091] ERROR::dwc_otg_hcd_urb_enqueue:482: Not connected
Jun 15 14:19:02 raspberrypi kernel: [  858.204091] 
Jun 15 14:19:02 raspberrypi kernel: [  858.204116] ERROR::dwc_otg_hcd_urb_enqueue:482: Not connected
Jun 15 14:19:02 raspberrypi kernel: [  858.204116] 
Jun 15 14:19:02 raspberrypi kernel: [  858.387408] usb 1-1: USB disconnect, device number 2
Jun 15 14:19:02 raspberrypi kernel: [  858.387440] usb 1-1.1: USB disconnect, device number 3
Jun 15 14:19:02 raspberrypi kernel: [  858.387677] smsc95xx 1-1.1:1.0: eth0: unregister 'smsc95xx' usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet
Jun 15 14:19:02 raspberrypi kernel: [  858.398935] usb 1-1.2: USB disconnect, device number 4
Jun 15 14:19:03 raspberrypi kernel: [  859.259341] cfg80211: Calling CRDA for country: CN
Jun 15 14:19:03 raspberrypi kernel: [  859.727845] usb 1-1.2: ath9k_htc: USB layer deinitialized
Jun 15 14:19:04 raspberrypi kernel: [  859.887453] Indeed it is in host mode hprt0 = 00021501
Jun 15 14:19:04 raspberrypi kernel: [  860.357372] usb 1-1: new high-speed USB device number 5 using dwc_otg
Jun 15 14:19:04 raspberrypi kernel: [  860.357556] Indeed it is in host mode hprt0 = 00001101
Jun 15 14:19:04 raspberrypi kernel: [  860.747684] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
Jun 15 14:19:04 raspberrypi kernel: [  860.747716] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jun 15 14:19:04 raspberrypi kernel: [  860.748543] hub 1-1:1.0: USB hub found
Jun 15 14:19:04 raspberrypi kernel: [  860.748688] hub 1-1:1.0: 5 ports detected
Jun 15 14:19:05 raspberrypi kernel: [  861.027550] usb 1-1.1: new high-speed USB device number 6 using dwc_otg
Jun 15 14:19:05 raspberrypi kernel: [  861.127952] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
Jun 15 14:19:05 raspberrypi kernel: [  861.127983] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jun 15 14:19:05 raspberrypi kernel: [  861.131210] smsc95xx v1.0.4
Jun 15 14:19:05 raspberrypi kernel: [  861.192441] smsc95xx 1-1.1:1.0: eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:bf:e7:06
Jun 15 14:19:05 raspberrypi kernel: [  861.287589] usb 1-1.2: new high-speed USB device number 7 using dwc_otg
Jun 15 14:19:10 raspberrypi kernel: [  866.409103] usb 1-1.2: New USB device found, idVendor=0cf3, idProduct=9271
Jun 15 14:19:10 raspberrypi kernel: [  866.409136] usb 1-1.2: New USB device strings: Mfr=16, Product=32, SerialNumber=48
Jun 15 14:19:10 raspberrypi kernel: [  866.409170] usb 1-1.2: Product: USB2.0 WLAN
Jun 15 14:19:10 raspberrypi kernel: [  866.409186] usb 1-1.2: Manufacturer: ATHEROS
Jun 15 14:19:10 raspberrypi kernel: [  866.409199] usb 1-1.2: SerialNumber: 12345
Jun 15 14:19:10 raspberrypi kernel: [  866.413808] usb 1-1.2: ath9k_htc: Firmware htc_9271.fw requested
Jun 15 14:19:11 raspberrypi kernel: [  866.831493] usb 1-1.2: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272
Jun 15 14:19:11 raspberrypi kernel: [  867.067848] ath9k_htc 1-1.2:1.0: ath9k_htc: HTC initialized with 33 credits
Jun 15 14:19:11 raspberrypi kernel: [  867.300381] ath9k_htc 1-1.2:1.0: ath9k_htc: FW Version: 1.3
Jun 15 14:19:11 raspberrypi kernel: [  867.309129] ieee80211 phy1: Atheros AR9271 Rev:1
Jun 15 14:19:12 raspberrypi kernel: [  868.659291] ERROR::dwc_otg_hcd_urb_enqueue:482: Not connected
Jun 15 14:19:12 raspberrypi kernel: [  868.659291] 
Jun 15 14:19:12 raspberrypi kernel: [  868.659352] ERROR::dwc_otg_hcd_urb_enqueue:482: Not connected
Jun 15 14:19:12 raspberrypi kernel: [  868.659352] 
Jun 15 14:19:12 raspberrypi kernel: [  868.659399] ERROR::dwc_otg_hcd_urb_enqueue:482: Not connected
Jun 15 14:19:12 raspberrypi kernel: [  868.659399] 
Jun 15 14:19:12 raspberrypi kernel: [  868.659442] ERROR::dwc_otg_hcd_urb_enqueue:482: Not connected
Jun 15 14:19:12 raspberrypi kernel: [  868.659442] 
Jun 15 14:19:12 raspberrypi kernel: [  868.659483] ERROR::dwc_otg_hcd_urb_enqueue:482: Not connected
Jun 15 14:19:12 raspberrypi kernel: [  868.659483] 
Jun 15 14:19:12 raspberrypi kernel: [  868.659525] ERROR::dwc_otg_hcd_urb_enqueue:482: Not connected
It seems that the 482 Not connected repeats many times, and then the USB disconnect and reconnect show again, and again, until I reset the pi.

Edit: I tried without the wifi interface, only by ethernet, and it is working fine.

gabone
Posts: 19
Joined: Fri Dec 28, 2012 12:23 pm

Re: TimeLapse causing Network drop

Sat Jun 15, 2013 3:58 pm

I searched the forum and someone else said that solved the problem by changing the micro usb cable that powers the pi. Lucky me, I found a different cable from a Samsung Galaxy phone and used it. I was surprised to see that the Pi streamed for at least 30 minutes without crashing. The old cable came from an original Pi supply that I purchased. It seems that it is not very good.

Return to “Camera board”