Raspberry Pi Lab

Tag: USB

RPi Keeps Crashing

by on Apr.12, 2014, under Troubleshooting

I have been having issues with the RPi staying online.

My setup is a RPi Model B with a WiFi antanea attached and powered by a 1A wall wort.  There is no keyboard, mouse, or video attached.  All access to the RPi is done over SSH.

The RPi will stay online for aprox. one to three hours then disappear from the network.  Powering off for a hard re-boot would bring it back.  However, one to three hours and we’d have to repeat.  Not acceptable.  Eventually, the constant crashing did corrupt the image on the SD card.

After speaking with some geek friends and consulting Google, I believe the issue is the WiFi adpater.  I believe the WiFi adapter is drawing just enough off the USB to cause power related stability issues.

For now, I have disconnected the WiFi and attached the RPi directly to the network via RJ-45.  After flashing an SD card with a new Raspbian image, the RPi is up and has beed stable for the best part of 24 hours.

When I get ready to do some more testing, I’m going to attach the WiFi via an external, powered USB hub.  This should allow the WiFi adapter to draw sufficient power without having to depend on the RPi for its power source.

More to come…

 

Leave a Comment :, , , , , , , more...

Setting Up WiFi From the Command Line

by on Dec.29, 2013, under Installation

RTL8188CUS-with-Rpi-transparentI have my RPi up and running.  It is patched into the network via the built-in RJ-45 ethernet port.  However, I have a motto in my lab… “One less wire is a good thing.”

My RPi package I received fro Christmas includes a USB WiFi adapter, so I’m proceeding to set it up and have “one less wire.”

Here are my steps to set up the USB WiFi adapter on my RPi running Occitdentalis.  Given that Occidentalis is a Debian variant, I am fairly confident is saying this should work with Debian, Raspbian, and Occidentalis.  It would, probably also work with x86 Debian and x86 Debian varients such as Ubuntu.  However, take care on systems running Gnome, KDE, etc…  Those systems may (probably are) running network managers within X that would conflict with the command line configurations I am about to describe.

My Wifi adapter is a Realtek RTL8188CUS purchased from AdaFruit.  This particular WiFi adapter is supported by Occidentalis so we won’t have to worry about drivers.

  • Run ‘iwconfig‘ to make sure your adapter is attached and functional.
  • Run ‘iwlist scan | grep ESSID‘ to get a list of WiFi SSIDs in range.
  • Make a backup of your interfaces file by running ‘sudo cp /etc/network/interfaces /etc/network/interfaces.original
  • Now edit /etc/network/interfaces to include your SSID and password
  • Make sure wpa_supplicant is installed and updated by running the command ‘sudo apt-get install wpasupplicant
  • Now delete a file. Run ‘sudo rm /etc/udev/rules.d/70-persistent-net.rules
  • Reboot.  Run ‘sudo reboot

The WiFi should, now, automatically connect to the network and receive an address via DHCP.

 

Here is my /etc/network/interfaces

auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid “my-network-ssid”
wpa-psk “my-wifi-password”

 

Leave a Comment :, , , , more...

Archives

All entries, chronologically...

Our Partners

Please take a minute to visit our partners

Looking for something?

Search the Site

If you can't find what you are looking for, please leave a comment somewhere, subscribe to our feed and hopefully your question will be answered shortly, so please visit again!