universald
Posts: 6
Joined: Fri Jun 01, 2012 5:32 pm

Wireless and Ethernet die together

Fri Jun 01, 2012 5:40 pm

Weird problem. To avoid having a keyboard, I am trying to set up wireless lan and ssh. To set up the wireless lan, I ssh'ed into my pi via wired Ethernet. I was able to set everything up, including ssh over wireless. But when I unplug the wired ethernet, my wireless dies with the wired connection.

My wireless usb adaptor is rt2x00, probably rt2800. But it works when the wired ethernet is plugged in. And for testing purposes, I do not even move the pi when I unplug.

Trust me, I power this thing right. I put it on a battery bank that can recharge ipads.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5572
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Wireless and Ethernet die together

Fri Jun 01, 2012 5:59 pm

Is the wireless usb adaptor plugged directly into Pi?
It's probably using too much power, but you only notice when wired connection is removed and it becomes enabled.
Can you try going through a powered usb hub?

universald
Posts: 6
Joined: Fri Jun 01, 2012 5:32 pm

Re: Wireless and Ethernet die together

Sat Jun 02, 2012 10:48 am

The Pi is powered properly, as while the ethernet is plugged, both wired and wireless interfaces respond to ping and ssh properly.

Without changing the power or location or anything, when I unplug the ethernet cable, the wireless dies with the wired interface.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13229
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Wireless and Ethernet die together

Sat Jun 02, 2012 11:10 pm

repeating dom's question, no matter how much power you supply to the PI, the fuses to the USB port will prevent that power from reaching your WiFi adapter, unless you are powering it from an externally powered hub your adapter will not receive enough power! So do you power the wifi adapter from a hub?

universald
Posts: 6
Joined: Fri Jun 01, 2012 5:32 pm

Re: Wireless and Ethernet die together

Sun Jun 03, 2012 3:19 am

No, the wireless adapter is only powered by the Pi.

But again, how does it simultaneously respond to ping and ssh along with the wired interface while wire is plugged in?

MrEngman
Posts: 4051
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Wireless and Ethernet die together

Sun Jun 03, 2012 12:33 pm

universald wrote:No, the wireless adapter is only powered by the Pi.

But again, how does it simultaneously respond to ping and ssh along with the wired interface while wire is plugged in?
What happens if you just stop the wired ethernet without unplugging it?

Code: Select all

sudo ifdown eth0
this will shut down the wired ethernet. To restart it you can use

Code: Select all

sudo ifup eth0
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

universald
Posts: 6
Joined: Fri Jun 01, 2012 5:32 pm

Re: Wireless and Ethernet die together

Tue Jun 05, 2012 12:51 am

Good question. I was curious about this scenario, too. Never got around to do this.

But I tried at your recommendation. The behavior is the same. An ifconfig eth0 down also shuts down the wireless interface and causes ping and ssh to not respond.

MrEngman
Posts: 4051
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Wireless and Ethernet die together

Tue Jun 05, 2012 11:15 am

universald wrote:Good question. I was curious about this scenario, too. Never got around to do this.

But I tried at your recommendation. The behavior is the same. An ifconfig eth0 down also shuts down the wireless interface and causes ping and ssh to not respond.
To check if it's a power issue with the wifi you can check by copying a large file or files, a couple of hundreds of MBytes, from the Pi to your other machine using the wifi port. This will get the wifi transmitting in a fairly continuous mode for some time which is when it will be using most power. You could even try to get several transfers going at once.

If there is a power issue then something may "break" - eg. wifi stops working or something else. A rather better test than just blindly assuming that there is an issue with power because the wifi stops. There are plenty of other reasons why this could happen. Power just happens to be one of them.

e.g. I'm trying to get the Linux source installed on my Pi using wifi and "git clone .....". My wifi keeps hanging when it gets near the end of the transfer - its not a power issue as far as I'm concerned. I think I've just run out of space on the SD card but being a Linux newby I'm not sure how to check that. My system hung sitting there saying "Receiving objects: ...." and no data is being transfered. I've tried several times and the results are consistent.

I've tried this to check my wifi and I SSH in to the Pi using the wifi and then transfers large files from the Pi to my Windows laptop. Not sure what you're using but on my windows machine I use putty and then to transfer files there is an addition to putty - pscp - which I use to copy the files.

I've seen people refering to power issues because mice don't work, keyboards don't work and of course wifi in particular. My keyboard uses about 2-3mA or 26mA max with the LEDs lit, my optical mouse uses a max of 33mA although generally it only uses about 20mA so to say they cause power issues would be rather ridiculous, although if the power supply was rather mediocre maybe they could.

But to blindly blame power supplies for Pi's not working is not helpful. I'm a hardware engineer, or was until I retired, and designed many embedded computer system using PowerPC processors, SCSI and Fibre channel and more often than not problems turned out to be issues with the software, and the operating system? guess what - LINUX. ;)
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

universald
Posts: 6
Joined: Fri Jun 01, 2012 5:32 pm

Re: Wireless and Ethernet die together

Tue Jun 05, 2012 1:06 pm

Dude, my feelings exactly. But a bunch of these people are just doling out these kiddie answers.

Per my reply, this issue is a debian software issue because software turning off eth0 also causes wireless to hang.

Bo





MrEngman wrote:
universald wrote:Good question. I was curious about this scenario, too. Never got around to do this.

But I tried at your recommendation. The behavior is the same. An ifconfig eth0 down also shuts down the wireless interface and causes ping and ssh to not respond.
To check if it's a power issue with the wifi you can check by copying a large file or files, a couple of hundreds of MBytes, from the Pi to your other machine using the wifi port. This will get the wifi transmitting in a fairly continuous mode for some time which is when it will be using most power. You could even try to get several transfers going at once.

If there is a power issue then something may "break" - eg. wifi stops working or something else. A rather better test than just blindly assuming that there is an issue with power because the wifi stops. There are plenty of other reasons why this could happen. Power just happens to be one of them.

e.g. I'm trying to get the Linux source installed on my Pi using wifi and "git clone .....". My wifi keeps hanging when it gets near the end of the transfer - its not a power issue as far as I'm concerned. I think I've just run out of space on the SD card but being a Linux newby I'm not sure how to check that. My system hung sitting there saying "Receiving objects: ...." and no data is being transfered. I've tried several times and the results are consistent.

I've tried this to check my wifi and I SSH in to the Pi using the wifi and then transfers large files from the Pi to my Windows laptop. Not sure what you're using but on my windows machine I use putty and then to transfer files there is an addition to putty - pscp - which I use to copy the files.

I've seen people refering to power issues because mice don't work, keyboards don't work and of course wifi in particular. My keyboard uses about 2-3mA or 26mA max with the LEDs lit, my optical mouse uses a max of 33mA although generally it only uses about 20mA so to say they cause power issues would be rather ridiculous, although if the power supply was rather mediocre maybe they could.

But to blindly blame power supplies for Pi's not working is not helpful. I'm a hardware engineer, or was until I retired, and designed many embedded computer system using PowerPC processors, SCSI and Fibre channel and more often than not problems turned out to be issues with the software, and the operating system? guess what - LINUX. ;)

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: Wireless and Ethernet die together

Tue Jun 05, 2012 2:19 pm

MrEngman wrote: But to blindly blame power supplies for Pi's not working is not helpful. I'm a hardware engineer, or was until I retired, and designed many embedded computer system using PowerPC processors, SCSI and Fibre channel and more often than not problems turned out to be issues with the software, and the operating system? guess what - LINUX. ;)
Actually, it's hardly "blindly blam[ing] power supplies". We've been troubleshooting a lot of issues with the pi and most of them circle back around to the pi being improperly powered or too much current being drawn from the usb ports.
universald wrote:Dude, my feelings exactly. But a bunch of these people are just doling out these kiddie answers.

Per my reply, this issue is a debian software issue because software turning off eth0 also causes wireless to hang.

Bo
We start with the kiddie answers, because that's where the problems *usually* lie. You cut out the simple answers before moving to the more complicated answers (a real world application of occam's razor basically)

That said, working off the assumption that it isn't a power issue for the moment, allow me to ask one more kiddie question.

If this happens when you unplug the ethernet, have you tried turning on the pi without the ethernet plugged in at all and the wireless adapter plugged in?

What does your /etc/network/interfaces look like?
Dear forum: Play nice ;-)

MrEngman
Posts: 4051
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Wireless and Ethernet die together

Tue Jun 05, 2012 11:29 pm

abishur wrote:Actually, it's hardly "blindly blam[ing] power supplies". We've been troubleshooting a lot of issues with the pi and most of them circle back around to the pi being improperly powered or too much current being drawn from the usb ports.
To often the only response to a question has been "its your power supply". It would be far more useful to ask have you tried this or have you tried that first. Using such high resistance polyfuses on the USB was a poor design decision and has caused no end of problems and will cause many more in the future. But problems may be due to some other issue and so should not just be ignored or glossed over with the easy answer - it's the PSU. Of course if the device being used has a known high current demand then it should only be used with a powered hub. But even then there are powered hubs that can draw conciderable current from the host USB connector - e.g. Logik L4THUB10 not what I'd call a proper powered hub and is in the wiki as working with the Pi and I have one but don't use it with my Pi. My proper powered hub, Belkin F5U224, takes zero current from the host.
abishur wrote:If this happens when you unplug the ethernet, have you tried turning on the pi without the ethernet plugged in at all and the wireless adapter plugged in?

What does your /etc/network/interfaces look like?
This is a far more helpful suggestion. Like my question about large data transfers using the wifi to see if it continues operating with a high transmit load. If it runs OK then the problem is likely to be somewhere else other than PSU. If it fails then it is quite possibly, but not necessarily, drawing too much current and then perhaps the PSU should be investigated or the wifi should be tried with a hub.

Trying to find what current USB devices really use is not easy unless you can actually measure it. Detailed specs are not readily available, like with Broadcom, and data available more often than not does not indicate power used. USB devices do indicate what current they may draw, or rather the power class they are in, generally 100mA or 500mA, and I suppose only devices in the 100mA class should be used directly in the Pi USB ports, but even devices indicating 500mA can actually use far less current. My wifi indicates it is in the 500mA class but actually draws a max current of about 115mA. A spec I found buried in a chinese web site said a max of 129mA but at a much high transfer rate than I have ever been able to achieve, and mine runs quite happily plugged directly into the Pi. So in theory I suppose, with the current it takes, it shouldn't work but it's quite happy even when I'm using the Belkin powered hub to power my Pi and the voltage is on the low side. Normally I use a switched mode supply and all voltages are well in spec. However, no matter what current the devices draw from the USB ports obviously if the PSU is poor quality this will probably cause problems.


Anyway regarding the present problem. The wifi works with the ethernet cable plugged in, right? If all communication is via the wifi and the ethernet is unused with no data transfered via eth0 - can you verify that is the case Universald? - then why should it stop working when the ethernet is unplugged. Doesn't make much sense. Blaming the PSU seems somewhat irrational.

Universald have you been able to transfer large files from the Pi via wifi without problems as I previously suggested?
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

User avatar
Grumpy Mike
Posts: 936
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
Contact: Website

Re: Wireless and Ethernet die together

Sat Jun 09, 2012 2:24 pm

abishur wrote:
MrEngman wrote: But to blindly blame power supplies for Pi's not working is not helpful. ..... ;)
Actually, it's hardly "blindly blam[ing] power supplies". We've been troubleshooting a lot of issues with the pi and most of them circle back around to the pi being improperly powered or too much current being drawn from the usb ports.
[
The power supply issue is being attributed for lots of things that are simply not power related. Like the repeating keys problem that turns out to be a kernel issue, see a heated debate here before we get to the true answer:-
http://www.raspberrypi.org/phpBB3/viewt ... =28&t=6771

User avatar
SN
Posts: 1014
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
Contact: Website

Re: Wireless and Ethernet die together

Sat Jun 09, 2012 2:46 pm

so lets the ask the question(s)
Is anyone working on fixing the kernel issues (for slow/fast usb devices, for key repeats, for wifi/ethernet etc etc etc)
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?

universald
Posts: 6
Joined: Fri Jun 01, 2012 5:32 pm

Re: Wireless and Ethernet die together

Sun Jun 17, 2012 12:05 pm

Thanks everybody! Abishur has a good question. I was out on business so apologies for the late reply.

I tried it and the log says that the wireless actually associated. See below


wlan2: authenticate with 00:22:15:2f:32:66 (try 1)
wlan2: authenticated
wlan2: associate with 00:22:15:2f:32:66 (try 1)
wlan2: RX AssocResp from 00:22:15:2f:32:66 (capab=0x431 status=0 aid=3)
wlan2: associated
fuse init (API version 7.17)

But I couldn't ping or ssh into it. I should really find a USB keyboard. More to come tomorrow. Thanks people!

NikizXXL
Posts: 1
Joined: Mon Jul 09, 2012 6:00 pm

Re: Wireless and Ethernet die together

Mon Jul 09, 2012 6:18 pm

Hallo,

have you found a solution to the problem yet? I experience the same problem. Running Raspbian and a current version of compat wireless. Maybe there is something wrong with the setup? Interfaces file looks like this:

Code: Select all

auto lo
iface lo inet loopback

#primary network interface
auto eth0
iface eth0 inet dhcp

#wireless interface
auto wlan1
iface wlan1 inet dhcp
    wpa-ssid mySSID
    wpa-psk myPassword
When booting without ethernet cable connected, it will accosiate the wifi network and I also see that an IP is assigned, but neither ping nor ssh work. Any ideas?

cheers,
Niklas

AndrewJohnson
Posts: 21
Joined: Mon Jul 30, 2012 7:34 am
Location: Derbs UK

Re: Wireless and Ethernet die together

Mon Jul 30, 2012 7:47 am

I am also having a similar problem with an R28x00 based adapter - the cheap one from amazon - if I leave RasPi for minutes or hours, it just drops off the Wlan. If I remove and re-insert the adapter, it will reconfigure itself and re-connect.

I don't know if it's related to the Network Manager Applet I installed (http://projects.gnome.org/NetworkManager/) - which came with network-manager-gnome when I installed that - because that pops up the "wireless connected" and "disconnected" messages for you.

I don't think it's a power issue - my wireless adapter is plugged into a hub which uses a 2A power supply.

It's this one by the way: http://www.amazon.co.uk/Wireless-Intern ... roduct_top

Less than £5 delivered though!

AndrewJohnson
Posts: 21
Joined: Mon Jul 30, 2012 7:34 am
Location: Derbs UK

Re: Wireless and Ethernet die together

Mon Jul 30, 2012 8:56 am

I might add that this seems to be CPU-usage related - for example, in trying to solve another problem, I was using GParted and when I was running it, it seemed to gobble some CPU when it was scanning for partitions - it was at around this point that the wireless dropped out.

TastyT
Posts: 1
Joined: Sat Sep 01, 2012 12:35 am

Re: Wireless and Ethernet die together

Sat Sep 01, 2012 12:37 am

I'm having the exact same problem the OP described on Wheezy and everything is run off a powered Gigaware hub, so I can confirm that it's not a power issue. When I unplug the ethernet cable or disable eth0 my WiFi shuts down as well.

Thanks in advance for any help.

doughecka
Posts: 1
Joined: Mon Oct 01, 2012 9:10 pm

Re: Wireless and Ethernet die together

Mon Oct 01, 2012 9:12 pm

I've noticed that when I unplug ethernet (when both ethernet and wlan are up), the default route gets removed. Stopping/starting the network services fixes that. So a bug somewhere is removing the default route when an interface goes down.

obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: Wireless and Ethernet die together

Tue Oct 02, 2012 8:10 am

When you have both ethernet and wifi running on your Pi, it's hard to tell which network connection the Pi will use.
I ran nuttcp to check my network speed like that. The Pi was setup as server. When I ran the client and connected to the wlan0 ip adress, the pi answered trough it's eth0 connection. Checking network speed trough eth0 or wlan0 always gave me the same testresults.
I don't think it's a Pi issue. It wouldn't suprise me that another debian setup would behave the same. Maybe a script related to ifdown eth0 could reestablish the wifi connection, if you intend to use it as a failover path. Be aware that the eth0 network speed drops from 70 mbit/sec to 27 mbit/sec when a wireless dongle is connected and paired to the same network as well.
You can check the ifconfig RX and TX packets to figure out which interface the Pi is using.
I assume adding routing rules could be used to change the default behavour.

darius
Posts: 1
Joined: Fri Oct 05, 2012 7:07 pm
Contact: Website

Re: Wireless and Ethernet die together

Fri Oct 05, 2012 7:12 pm

I don't know if you already solved this problem, but i just had the same issue :) and i think i figured it out. When both adapters (Ethernet and wireless) are connected, as someone already mentioned routing makes packets go out Ethernet. So if i ping my raspberry from my pc i get reply from pi's ethernet interface, thus (important part) my pc's arp table now has two ip addresses pointing to same mac address, and when i disconnect ethernet (wireless still working), but my pc still holds ethernet's arp entry. So all i have to do (if its windows: "arp -d pi_wireless_ip_address"), and then i can ping pi over wireless.

nantunest
Posts: 1
Joined: Mon Oct 22, 2012 6:52 pm

Re: Wireless and Ethernet die together

Mon Oct 22, 2012 7:03 pm

Hello all,

I don't know if Raspberry Pi uses pure Debian arm distro, but I faced the same problem in a Beagleboard with Debian Squeeze. The problem was solved upgrading distro from Squeeze to Wheezy, this updated the linux kernel too.

I don't know exactly where is the problem (distro or kernel) but this solved the problem.

User avatar
jimmyeao
Posts: 27
Joined: Wed Jun 27, 2012 7:34 am
Location: Lincoln, Lincolnshire LN6 7QY, UK
Contact: Website

Re: Wireless and Ethernet die together

Thu Feb 12, 2015 7:15 pm

I know this is an old post, but I am having the same issue, however I'm tempted to believe it to be a routing issue on the PI. Why? Because I can see the Pi wireless associated to my wireless access point, and see the ip address it has been assigned.
I can only surmise that it is trying to route outgoing packets through the (now non-connected) eth0 interface.
Does anyone have any info that may help?
Follow my Raspberry Pi experience at www.deviousweb.com

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: Wireless and Ethernet die together

Thu Feb 12, 2015 7:48 pm

jimmyeao wrote:I know this is an old post, but I am having the same issue, however I'm tempted to believe it to be a routing issue on the PI. Why? Because I can see the Pi wireless associated to my wireless access point, and see the ip address it has been assigned.
I can only surmise that it is trying to route outgoing packets through the (now non-connected) eth0 interface.
Does anyone have any info that may help?
can you list the contents of your interfaces file? (Obviously please remove any passwords you may have stored in there)
Dear forum: Play nice ;-)

User avatar
jimmyeao
Posts: 27
Joined: Wed Jun 27, 2012 7:34 am
Location: Lincoln, Lincolnshire LN6 7QY, UK
Contact: Website

Re: Wireless and Ethernet die together

Thu Feb 12, 2015 8:48 pm

interfaces:

Code: Select all

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
post-down killall -q wpa_supplicant
/etc/wpa_supplicant/wpa_supplicant.con

GNU nano 2.2.6 File: /etc/wpa_supplicant/wpa_supplicant.conf

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
key_mgmt=NONE
}

network={
ssid="BTHub5-****"
scan_ssid=1
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group= CCMP TKIP
psk="***********"
}
Follow my Raspberry Pi experience at www.deviousweb.com

Return to “Troubleshooting”