LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Trying to connect to WiFi network on Raspberry Pi 0 using Ralink 5370 (https://www.linuxquestions.org/questions/linux-from-scratch-13/trying-to-connect-to-wifi-network-on-raspberry-pi-0-using-ralink-5370-a-4175595576/)

ScheissSchiesser 12-16-2016 12:30 PM

Trying to connect to WiFi network on Raspberry Pi 0 using Ralink 5370
 
Hi all,

I worked my way through the Pi LFS guide, which supplements the LFS development guide. I am using a Raspberry Pi Zero v1.3. I am able to boot the system (Woo!) and I am now trying to get the WiFi connection set up.

I have followed the wpa-supplicant setup, and I have set up wireless tools. But I can't seem to connect to my router. I don't think it is even seeing any WiFi network. Here is where I am at:

Code:

# cat /etc/sysconfig/wpa_supplicant-wifi0.conf
network={
    ssid="NotYourWiFi"
    #psk="mypassword"
    psk=<the-hashed-password-i-think>
}

Code:

# cat /etc/sysconfig/ifconfig.wifi0
ONBOOT="yes"
IFACE="wlan0"
SERVICE="wpa"

WPA_SERVICE="dhcpcd"
DHCP_START="-b -q"
DHCP_STOP="-k"

Code:

# ifconfig

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Bcast:0.0.0.0  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:4880 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4880 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:407968  TX bytes:407968

wlan0    Link encap:Ethernet  HWaddr 00:0F:60:05:1A:99
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0  TX bytes:0

Code:

# iwconfig

wlan0    IEEE 802.11bgn  ESSID:off/any 
          Mode:Managed  Access Point: Not-Associated  Tx-Power=20 dBm 
          Retry short limit:7  RTS thr:off  Fragment thr:off
          Encryption key:off
          Power Management:off
         
lo      no wireless extensions

Code:

#ip link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether 00:0f:60:05:1a:99 brd ff:ff:ff:ff:ff:ff

using wpa_cli to scan reports no results using scan_results. Something tells me my WiFi dongle is not working correctly or is not communicating correctly with linux. I am using the official raspberry pi linux 4.4 kernel.

Any help getting this working would be appreciated. Educate me please! I have exhausted my own knowledge at this point, and LFS and BLFS don't seem to have what I need.

spiky0011 12-16-2016 01:04 PM

Hi

Can you connect an eth0, Mine has trouble with wifi if eth0 not connected then see if wifi works, if it dose then at least you know you got wireless correct. It,s just something I found on mine

ScheissSchiesser 12-16-2016 01:07 PM

Hi Spiky,

No, I cannot test an eth0 connection, since the device does not have an ethernet port (it is a Raspberry Pi Zero). I have a WiFi dongle connected to a hub through the USB OTG port.

Thanks for the suggestion. Anything else I should try? It doesn't even seem to be able to find any wireless networks when I scan using the wpa_cli.

spiky0011 12-16-2016 01:14 PM

You have the firmware required

ScheissSchiesser 12-16-2016 01:35 PM

I think so, but I am not sure. How could I figure that out?

I placed rt2870.bin in /lib/firmware/. dmesg shows that it loads the firmware, and that the chipset is detected. It is using the rt2800usb interface driver. But it also says:

Code:

IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
though I haven't configured IPv6 and I don't think I need to.

How can I confirm I have the correct firmware and that it is loaded properly?

spiky0011 12-16-2016 02:09 PM

Have you tried restarting the network manualy?

ScheissSchiesser 12-16-2016 02:12 PM

What do you mean? Can you explain how to start it manually?

I assume you mean something more involved than ifup/ifdown. Those don't give me any obvious errors.

ScheissSchiesser 12-16-2016 02:36 PM

So something is definitely wrong with the firmware setup, but I can't really figure out what is wrong. Any help with debugging that would be great.

spiky0011 12-16-2016 02:41 PM

not sure it is, Is that the only usb socket you have?

ScheissSchiesser 12-16-2016 02:43 PM

Yes. I have a 4-port USB hub with my WiFi dongle and keyboard attached.

spiky0011 12-16-2016 02:56 PM

Is this a typo "wpa-supplicant-wifi0" should be wpa_supplicant

ScheissSchiesser 12-16-2016 03:24 PM

Yes, just a typo on the forum. It is correct on the Pi. Good spot though. I fixed it.

spiky0011 12-16-2016 03:29 PM

as root
Code:

iwlist wlan0 scan
I suppose thats no output, struggerling here now

stoat 12-16-2016 08:11 PM

Quote:

Originally Posted by ScheissSchiesser
Code:

# cat /etc/sysconfig/wpa_supplicant-wifi0
network={
    ssid="NotYourWiFi"
    #psk="mypassword"
    psk=<the-hashed-password-i-think>
}


The wpa service script expects your wpa_supplicant configuration file to have the .conf extension.

spiky0011 12-17-2016 10:01 AM

These are the options I have for the same device

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

lsmod
rt2800usb 14583 0
rt2x00usb 8338 1 rt2800usb
rt2800lib 68511 1 rt2800usb
rt2x00lib 34430 3 rt2800lib,rt2800usb,rt2x00usb
mac80211 477253 4 rt2800lib,b43,rt2x00lib,rt2x00usb
cfg80211 417021 3 b43,rt2x00lib,mac80211


Hope these help.

<NO-CARRIER,BROADCAST,MULTICAST,UP> means it,s up but not associated to a carrier access point


All times are GMT -5. The time now is 11:12 AM.