Linux - Joikuspot/Ad-Hoc with Encryption - Working

Discussion in 'Networking' started by bluefrog, Nov 12, 2008.

  1. bluefrog

    bluefrog

    Joined:
    Sep 5, 2008
    Messages:
    14
    Likes Received:
    0
    I read some other posts here on the linux version of the Acer's inability to connect to the Symbian software Joikuspot which basically turns a Symbian phone equipped with wifi into a wireless hotspot. You can then connect your One to this hotspot and use the phone's 3G for your internet connection. This bypasses the need to tether one's phone with a bluetooth dongle or USB cable - one less gadget to carry when out and about.

    Unfortunately it seems that the Linux Acer Aspire One does not support Ad-Hoc wireless connections out of the box at this time but Joikuspot can only provide this type of connection. This makes it necessary to stop networkmanager services and destroy and recreate the wireless device ath0 and its associated base device wifi0 in order to change the mode from managed to ad-hoc. This can all be accomplished relatively easily using a script available elsewhere on this forum.

    However, this script was not permitting me to run Joikuspot with any encryption (Joikuspot itself only supports WEP at this time) which, given the locations I would normally use Joikuspot in, was not a very satisfactory state of affairs. While we all know the shortcomings of WEP, it should discourage most casual use of my 3G, espcially given that I won't be using it anywhere for long. Therefore I began to investigate why encrypted connections would not work.

    On my phone I have enabled WEP in open mode - I have read in several places that open mode is somewhat more secure. I use a 10 digit hex key which gives 64bit level encryption though I see no reason why this would not work with any of the levels Joikuspot will support.

    Having added the encryption information to the connection script discussed above and making a small change to the recreation of the wireless device using wlanconfig (the version of the script I saw set wlanmode to ad-hoc rather than adhoc), I still could not connect. Errors seemd to be coming from the DHCP client daemon dhclient. After a lot of testing I discovered that in order for dhclient to successfully bind with my new wireless device I needed to release the standard wireless device before stopping the NetworkManager with the command

    Code:
    dhclient -r ath0
    
    ONce I figured that out I could run an encrypted connection to Joikuspot and use my phone's 3G.

    Here is my modified Ad-Hoc Joikuspot script:

    Code:
    # release the DHCP lease from our wireless device
    sudo dhclient -r ath0
    # bring wireless interface down
    sudo ifconfig ath0 down
    # bring down our ethernet connection too so it doesn't confuse things
    sudo ifconfig eth0 down
    # stop networkmanager
    sudo /etc/rc.d/init.d/Networkmanager stop
    # destroy our wireless device
    sudo wlanconfig ath0 destroy
    # create a new wireless interface in ad-hoc mode
    sudo wlandconfig ath0 create wlandev wifi0 wlanmode adhoc
    # set the channel for our connection
    sudo iwconfig ath0 channel <channel number you set on your phone - I use 6>
    # set the essid for our connection
    sudo iwconfig ath0 essid <essid Joikuspot is configured with on your phone>
    # set the encryption key and encryption mode - I used a HEX value - if you use ASSCI then you need to prefix this value with "s:"
    sudo iwconfig ath0 key <your key> open
    # bring up our wireless interface
    sudo ifconfig ath0
    # get our ip settings via DHCP
    sudo dhclient ath0
    
    After running this script after a small delay you should see your IP address assigned and you are good to go.

    Remember, once you reboot, your original network settings will be restored.
     
    bluefrog, Nov 12, 2008
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.