coghlan
Posts: 8
Joined: Fri Jul 01, 2016 4:53 pm

RPi 2 wlan0 drops packets

Sat Jul 02, 2016 4:47 pm

I just started using my Canakit RPi2 which comes with a USB WiFi adapter made - I believe - by Lifetron. Mac address starts with 00:0F:60.

I can browse and download, but want to make it headless (using it as host for Homeseer home automation software). Before I add packages to do that I just wanted to test out if I could ping it.

Well, if I try to ping/telnet/ssh to the RPi2 via its IP (192.168.1.6), there is no reply. If I arp -a from other computers on the WiFi network, I see the MAC address listed as (incomplete).

When I try ifconfig -a on the RPi2, I see lots of dropped packets for wlan0. Is it likely that the problem lies with a faulty USB adapter, or the driver for wlan0?

BTW, is the driver for wlan0 generic for USB? If I were to switch to a different USB WiFi adapter, do I have to try to remove the existing one from a list somewhere?

epoch1970
Posts: 5203
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: RPi 2 wlan0 drops packets

Sat Jul 02, 2016 5:14 pm

The USB is only the bus, drivers (modules in linux parlance) are loaded according to the wifi chip that sits within the key.
Normally you don't have to install/remove anything, modules are loaded automatically when the hardware is discovered by the OS.
Shell commands "lsusb" and "lsusb -t" should show your key and the driver that gets loaded. All drivers are not created equal, perhaps yours require some special attention?
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

coghlan
Posts: 8
Joined: Fri Jul 01, 2016 4:53 pm

Re: RPi 2 wlan0 drops packets

Sat Jul 02, 2016 8:46 pm

Hmmm, that's interesting.

lsusb indicates that the USB wireless adapter is Port 5 Dev 6. USB vendor:product is 148F:5370 (Ralink Technology 5370). However, the driver is RT2800USB.

I presume Raspian doesn't have every driver under the sun. How can one check: a) what drivers Raspian has, b) which driver it's going to select (presumably to match usb vendor:product) and c) if it's possible to download other drivers?

MaxK1
Posts: 1043
Joined: Sun Aug 26, 2012 11:34 pm

Re: RPi 2 wlan0 drops packets

Sun Jul 03, 2016 8:30 am

That is the correct driver (I have a bunch of Tenda adapters) They aren't the greatest, but they do work. They are really touchy about being plugged directly into the Pi - they seem to pick up noise (rf noise). Using a powered hub or an extension cable helps.
Tenda makes at least 2 versions of the adapter: one with a (somewhat flimsy) antenna and one without. Try with an extension cable a play around with positioning the adapter for best signal/least noise.
You are in a maze of twisty little passages, all alike.
When General Failure and Major Disaster get together, Private Parts usually suffers.

coghlan
Posts: 8
Joined: Fri Jul 01, 2016 4:53 pm

Re: RPi 2 wlan0 drops packets

Sun Jul 03, 2016 1:30 pm

I think I've fallen victim to the problem of wlan0 going to sleep. I might have to add a line to a config file to turn off power saving.

Is you signature block a reference to Wumpus?

MaxK1
Posts: 1043
Joined: Sun Aug 26, 2012 11:34 pm

Re: RPi 2 wlan0 drops packets

Sun Jul 03, 2016 2:28 pm

I think it was "Adventure"... :)
You are in a maze of twisty little passages, all alike.
When General Failure and Major Disaster get together, Private Parts usually suffers.

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: RPi 2 wlan0 drops packets

Sun Jul 03, 2016 2:41 pm

MaxK1 wrote:I think it was "Adventure"... :)
It's the Colossal Caves Adventure which was originally in FORTRAN on mid-range and mainframes, the version I played in the 1980's had been re-written by someone in Programming Language/1 (PL/I). It ran on OS/VS2 MVS.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

coghlan
Posts: 8
Joined: Fri Jul 01, 2016 4:53 pm

Re: RPi 2 wlan0 drops packets

Sun Jul 03, 2016 7:42 pm

I can ping it now.

I modified /etc/network/interfaces to set power management off. I also unplugged the keyboard and Wifi dongle and swapped ports. I tested it again from a PC by pinging 192.168.1.6, which again showed host not available. However, I noticed that the reply was coming from 192.168.1.106, not 192.168.1.6. Really bizarre. Perhaps the ARP cache still associated 192.168.1.6 with the MAC address of the dongle, but somehow the dongle had obtained a new IP. Or, perhaps it was 192.168.1.106 all along, but was coming through as *.6. Maybe this was related to the <incomplete> status that showed up where the MAC should be when I arp -a from another computer.

It still drops packets, but at least it's able to hobble along.

Return to “Troubleshooting”