[ solved ] Missing library + pcmcia ethernet not seen

April 1st, 2013

Home Forums GeeXboX for PC [ solved ] Missing library + pcmcia ethernet not seen

This topic contains 43 replies, has 3 voices, and was last updated by  tomlohave 1 year, 7 months ago.

Viewing 14 posts - 31 through 44 (of 44 total)
  • Author
    Posts
  • #6174

    dave1981
    Member

    So, if I perform the following with an open (no security) network, an IP is immediately obtained:

    systemctl stop connman.service

    ifconfig wlan0 up

    iwconfig wlan0 essid AndroidAP

    udhcpc -s /bin/assign-ip -i wlan0

    It just doesn’t work when WPA-PSK is used.

    #6175

    tomlohave
    Moderator

    PASSPHRASE=”xxxx” # in ASCII text

    in hex ….

    #6176

    dave1981
    Member

    I’m afraid that doesn’t work either. I used wpa_passphrase (in my non-GeexBox machine) to generate the hex. Tried inserting it in /etc/network but didn’t work. Then tried:
    systemctl stop connman.service
    ifconfig wlan0 up
    iwconfig wlan0 essid myssid key restricted: xxxxxxxxxxx # in hex
    udhcpc -s /bin/assign-ip -i wlan0
    which doesn’t get an ip. The hex key is generated using both the ssid and the pass phrase. can’t leave out “restricted:” or replace it with “s:”, only “restricted:” works with the hex key.

    #6177

    tomlohave
    Moderator

    can you try with udhcpc in place of connman ?

    #6178

    dave1981
    Member

    Almost there now, I can get an ip address using wpa_supplicant:

    edit /etc/wpa_supplicant/wpa_supplicant.conf

    update_config=1

    ctrl_interface=/var/run/wpa_supplicant

    network={

    ssid=”myap”

    scan_ssid=1 # required for hidden ssid

    key_mgmt=WPA-PSK

    group=TKIP

    pairwise=TKIP

    proto=WPA

    psk=”xxxx” # pass key in ascii

    }

    ps aux | grep suppl

    then kill all processes running wpa_supplicant

    wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -u -B

    udhcpc -s /bin/assign-ip -i wlan0

    I get “Sending select for 192.168.0.5 – Lease of 192.168.0.5 obtained”, and my wifi card lights up like a christmas tree. However, when I ctrl-alt-f4 back to the GUI, system info says Link: not connected. And when I reboot, everything is lost. So how can I get the GUI to realise that there is a connection, and use wpa_supplicant with the correct parameters under startup? Thanks!

    #6179

    dave1981
    Member

    Hm – after getting the ip, I can’t ping the machine from the network, or ping from the Geexbox to any other machine: “ping: sendto: network is unreachable”

    #6180

    dave1981
    Member

    Ah, last piece of the puzzle:

    ifconfig wlan0 192.168.0.5 netmask 255.255.255.0 up

    And now the connection also appears in GUI! So, the last thing is how to do all this at boot…

    #6181

    tomlohave
    Moderator

    use udhcpc backend in /etc/network and edit /usr/lib/udhcpc/net-udhcpc to reflect your config
    all commands /steps you are doing are already done by this net-udhcpc

    #6182

    dave1981
    Member

    I changed /etc/network to use udhcpc backend, and then hard coded the commands in /usr/lib/udhcpc/net-udhcpc:

    . /etc/network

    systemctl stop wpa_supplicant.service

    /usr/sbin/wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -u -B

    ifconfig wlan0 up

    udhcpc -s /bin/assign-ip -i wlan0

    ifconfig wlan0 192.168.0.5 up

    When I reboot the connection does not come up. If I execute the commands in the shell one by one after startup, it works fine. I also have to include the leased ip address in the final ifconfig for it to work. Any ideas why it doesn’t work at boot?

    #6183

    dave1981
    Member

    After boot, iwconfig shows wlan0 without any essid. ifconfig shows l0 (loopback) as up.

    #6186

    tomlohave
    Moderator

    pretty sure it’ a timing issue, please readd the loop to wait for slow device

    suggestion : add debug line like :

    . /etc/network

    —– add the loop here ————

    echo “executing my script ” >> /tmp/debug-net.txt

    echo ” stopping wpa_supplicant.service” >> /tmp/debug-net.txt

    systemctl stop wpa_supplicant.service

    echo ” configuring wpa”>> /tmp/debug-net.txt

    /usr/sbin/wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -u -B

    echo “ifconfig wlan0 up” >>/tmp/debug-net.txt

    ifconfig wlan0 up

    echo “executing udhcpc” >>/tmp/debug-net.txt

    udhcpc -s /bin/assign-ip -i wlan0

    ifconfig wlan0 192.168.0.5 up

    then check the content of /tmp/debug-net.txt

    #6187

    dave1981
    Member

    It appears the /usr/lib/udhcpc/net-udhcpc script is not even run. I have

    #!/bin/sh

    echo “starting net script” >> /tmp/net.txt

    . /etc/network

    sleep 5

    … etc

    But the /tmp/net.txt file is never created… is it possible it’s not called? I’ve set /etc/network property NETWORK_BACKEND=”udhcpc”. I recalled seeing a synonym for that property somewhere (maybe NET_B?) is it possible something got out of date and startup does not realise udhcpc should be used?

    #6188

    dave1981
    Member

    Don’t think my post made it through just now… here it is again: I have the following in the /usr/lib/udhcpc/net-udhcpc now:

    #!/bin/sh

    echo “starting net script” >> /tmp/net.txt

    . /etc/network

    …. etc

    but the file /tmp/net.txt is not even created. Who/what calls the script in startup? I have set NETWORK_BACKEND=”udhcpc” in /etc/network already.

    #6192

    tomlohave
    Moderator

    for some reasons, your replies were considered as spam …

Viewing 14 posts - 31 through 44 (of 44 total)

You must be logged in to reply to this topic.

Comments are closed.