LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 12-16-2016, 12:30 PM   #1
ScheissSchiesser
LQ Newbie
 
Registered: Dec 2016
Posts: 15

Rep: Reputation: Disabled
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.

Last edited by ScheissSchiesser; 12-17-2016 at 02:45 PM. Reason: Added more info. Fixed typos.
 
Old 12-16-2016, 01:04 PM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
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
 
Old 12-16-2016, 01:07 PM   #3
ScheissSchiesser
LQ Newbie
 
Registered: Dec 2016
Posts: 15

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-16-2016, 01:14 PM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
You have the firmware required
 
Old 12-16-2016, 01:35 PM   #5
ScheissSchiesser
LQ Newbie
 
Registered: Dec 2016
Posts: 15

Original Poster
Rep: Reputation: Disabled
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?
 
Old 12-16-2016, 02:09 PM   #6
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Have you tried restarting the network manualy?
 
Old 12-16-2016, 02:12 PM   #7
ScheissSchiesser
LQ Newbie
 
Registered: Dec 2016
Posts: 15

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-16-2016, 02:36 PM   #8
ScheissSchiesser
LQ Newbie
 
Registered: Dec 2016
Posts: 15

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-16-2016, 02:41 PM   #9
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
not sure it is, Is that the only usb socket you have?
 
Old 12-16-2016, 02:43 PM   #10
ScheissSchiesser
LQ Newbie
 
Registered: Dec 2016
Posts: 15

Original Poster
Rep: Reputation: Disabled
Yes. I have a 4-port USB hub with my WiFi dongle and keyboard attached.
 
Old 12-16-2016, 02:56 PM   #11
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Is this a typo "wpa-supplicant-wifi0" should be wpa_supplicant
 
Old 12-16-2016, 03:24 PM   #12
ScheissSchiesser
LQ Newbie
 
Registered: Dec 2016
Posts: 15

Original Poster
Rep: Reputation: Disabled
Yes, just a typo on the forum. It is correct on the Pi. Good spot though. I fixed it.
 
Old 12-16-2016, 03:29 PM   #13
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
as root
Code:
iwlist wlan0 scan
I suppose thats no output, struggerling here now
 
Old 12-16-2016, 08:11 PM   #14
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
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.
 
Old 12-17-2016, 10:01 AM   #15
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can connect to cellphone through WIFI HOTSPOT, but cannot connect to my own WIFI network diegoandresalvarez Linux - Networking 7 10-22-2016 11:54 AM
[SOLVED] Wifi network on wifi - raspberry pi business_kid Debian 1 06-01-2014 01:11 PM
Wifi (pci) disconnect when computer idle. Fedora 14, wifi RaLink RT2561/RT61 tessx Linux - Hardware 1 05-27-2012 11:15 AM
Unable to connect to wifi network with network manager. Poss authorization issue openSauce Linux - Networking 14 12-13-2008 10:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration