Trying to connect to WiFi network on Raspberry Pi 0 using Ralink 5370
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The wpa service script expects your wpa_supplicant configuration file to have the .conf extension.
Another overlooked typo on my part. I do indeed have the .conf extension. Thank you.
Nothing is complaining in my system, which is what makes this a bit difficult. I don't get any obvious error messages. I just can't seem to find any WiFi connections when I scan, including my own router that I am connecting to.
CONFIG_WLAN_VENDOR_RALINK=y
# CONFIG_RT2800PCI is not set
CONFIG_RT2800USB=m
CONFIG_RT2800USB_RT33XX=y
CONFIG_RT2800USB_RT35XX=y
# CONFIG_RT2800USB_RT3573 is not set
CONFIG_RT2800USB_RT53XX=y
# CONFIG_RT2800USB_RT55XX is not set
# CONFIG_RT2800USB_UNKNOWN is not set
CONFIG_RT2800_LIB=m
CONFIG_RT2800USB_RT53XX=y
I did not build the kernel myself. I am using the official Raspberry Pi 4.4 kernel. How can I check those configurations/options you have listed?
<NO-CARRIER,BROADCAST,MULTICAST,UP> means it,s up but not associated to a carrier access point
lsmod shows that I have those modules running, except yours seem to have the additional "b43" dependent module, which I do not have. Is that important? What does that do?
Should I go through and build the kernel myself? Do you think that is the problem?
Then, I brought up the interface with wpa_supplicant:
Code:
# wpa_supplicant -B -i interface -c /etc/sysconfig/wpa_supplicant_test.conf
Successfully initialized wpa_supplicant
[4097.871872] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
then I use wpa_cli
Code:
# wpa_cli
> scan
OK
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>CTRL-EVENT-NETWORK-NOT-FOUND
> scan_results
bssid / frequency / signal level / flags / ssid
So, no results by scanning with wpa_cli. I cannot see any networks (which I should). So something is bonkers. I keep thinking it must be the drivers/firmware, but it appears I have set that up correctly. Any ideas what I should try next?
Last edited by ScheissSchiesser; 12-17-2016 at 03:57 PM.
Reason: fixed typo
Did you set your region? If you don't do that the kernel will repeatedly disconnect so you aren't broadcasting on illegal frequencies.
I will do that. But shouldn't there be some kind of error message stating that? Or a warning? Everything looks like it is working, except I can't see any WiFi ESSIDs when I scan. In fact, here's what I get when I scan with iwconfig:
Code:
# iwconfig wlan0 scan
iwconfig: unknown command "scan"
# iwlist wlan0 frequency
wlan0 14 channels in total; available frequencies :
Channel 01 : 2.412 GHz
...
...
[not typing all of the channels]
...
Channel 14 : 2.484 GHz
#iwlist wlan0 scanning
wlan0 No scan results
Can you be specific about what region I should be setting? Not sure how to do it. I am using iwconfig + wpa_supplicant and not iw.
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616
Rep:
Quote:
Originally Posted by ScheissSchiesser
Can you be specific about what region I should be setting? Not sure how to do it. I am using iwconfig + wpa_supplicant and not iw.
Thanks for you help.
Check your dmesg, you should see something like this:
Code:
cfg80211: Calling CRDA to update world regulatory domain
// If set correctly, it will continue like this:
cfg80211: Calling CRDA for country: US
cfg80211: Regulatory domain changed to country: US
cfg80211: DFS Master region: FCC
If it's not set correctly, it will continuously disconnect because the legal transmission frequencies are different depending on what country you're in. If you haven't configured it, then it cannot assume transmitting on any given frequency is legal where you are.
Try "man crda" for more info. That, or the 80211 docs in the kernel source. You can set it via certificate, kernel command line, config file for iw (I think) or udev rule.
Nothing in dmesg shows up regarding crda or regulatory domains. I don't have the crda program either! Did I miss a step somewhere in the build process? When would crda be installed?
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616
Rep:
crda is a udev helper, it's not built in. You have to download the package, the links can be found on the websites I posted before. It's just one way to set the regulatory domain. If your kernel isn't complaining that it's not set, then you're likely missing something.
Some settings aren't in the drivers tree, they're off the root kernel menu under "Networking Support"
Networking Support --->
-*- Wireless---> (auto-selected by wireless drivers)
<M/*> cfg80211 - wireless configuration API[*] cfg80211 wireless extensions capability
<M/*> RF switch subsystem support
(Sorry I can't get them to line up correctly. Whatever idiot coded this site's software decided to assume automatic formatting was desired inside code tags, which is just brilliant. Of course, I'm not a web developer so it might be the browser overriding a correctly coded tag. In which case, my apologies to the developer.)
Without everything, your adapter will probably just run in some sort of failsafe mode.
# wpa_supplicant -B -i interface -c /etc/sysconfig/wpa_supplicant_test.conf
Successfully initialized wpa_supplicant
[4097.871872] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Or are you replacing interface with wlan0?
Also did you change the instances of wifi0 to wlan0 as suggested by spiky0011?
Quote:
Originally Posted by ScheissSchiesser
I am using dhcpcd. Here is what I get when running it:
Code:
# dhcpcd wlan0
wlan0: waiting for carrier
timed out
dhcpcd exited
Makes sense, since I am not connected to an access point.
Yes, you are not connected to the access point and that is what dhcpcd is intended to do. It timing out waiting for the carrier seems to me that it's not being offered an ip address.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.