Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've been testing a Wifi card in my machine and I can't seem to get it to connect to my home router. The card is a ralink rt37, I compiled the modules that I needed into the kernel and downloaded a firmware file, I can now see the card using ifconfig -a. I can also bring the card up using ip link wlan1 up. Then when the device is up, if I run iw dev wlan1 scan I can see the SSID of my home router.

Now it seems the card is functional I want to connect to my router. The router is secured with WPA, so I need to use wpa_supplicant (as far as I understand). I tried following this tutorial to get set up.

I have followed their steps and have the following files:

  • /etc/wpa_supplicant.conf:

    ctrl_interface=/var/run/wpa_supplicant
    ap_scan=1
    
    network={
      key_mgmt=NONE
    }
    
    network={
    ssid="SKY183C6"
    scan_ssid=1
    proto=WPA RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP
    psk=719d0a2d74b09536ce21cecda0851142a2e83d2a56b406098b22012ea0f536f9
    }
    
  • /etc/network/interfaces:

    # Configure Loopback
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet static 
    address 192.168.0.20
    netmask 255.255.255.0
    
    auto wlan1
    iface wlan1 inet static
    address 192.168.0.90
    netmask 255.255.255.0
    gateway 0.0.0.0
    pre-up wpa_supplicant -Dwext -iwlan1 -c/etc/wpa_supplicant.conf
    post-down killall -q wpa_supplicant
    

I can then run the command wpa_supplicant -Dwext -iwlan1 -c/etc/wpa_supplicant.conf & and then run ip dev wlan1 link and I see the following output:

    Connected to 4c:17:eb:a1:83:c7 (on wlan1)
SSID: SKY183C6
freq: 2462
RX: 295890 bytes (1942 packets)
TX: 53549 bytes (1379 packets)
signal: -82 dBm
tx bitrate: 36.0 MBit/s 

It seems that I'm past the authentication stage but I don't have a connection, there's no IP assigned to wlan1, and when I try ping 8.8.8.8 I get a message saying network unreachable.

If I run route I see this:

    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    192.168.0.0     *               255.255.255.0   U     0      0        0 eth0

My suspicion is that I've not set the interface file up properly, in particular the gateway line. If anyone can give me any help I'd be really grateful. Sorry for the long post, just wanted to give as much of the relevant info as possible

share|improve this question
    
Why aren't using using NetworkManager? –  slm Aug 12 '13 at 22:32
    
This is in an embedded environment with an OS I have compiled myself. –  Kells1986 Aug 13 '13 at 12:16
    
You can use NetworkManager still in a headless environment, it provides a command line tools, nm-cli and nm-tool for headless systems. –  slm Aug 13 '13 at 12:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.