dinsdag 30 juli 2013

Set up wireless hotspot for DS or Android in Ubuntu 13.04

Hi all,

I have a DSi and could not connect to my network because it doesn't support WPA. This is nothing new.
I found a lot of guides to set up a wirless network on ubuntu with the hotspot function. Too bad I cannot set it to WEP or open in ubuntu 13.04.

So I went looking and found this really neat guide. But I could not get the dns part working.
So to make it easy there is the ap-hotspot program. I was really exited when I found it. So I did the set up and found out it only supports WPA(again...).

After some looking in to the code I'll show you how to change this to open or WEP. This also works with an android phone!

What you need
-A computer with ethernet/cable connection to share
-A wireless network card in your computer(that supports ap)

Installing
So first you start by installing ap-hotspot and configuring it.
Enter this into the terminal:
 
~$ sudo add-apt-repository ppa:nilarimogard/webupd8 
~$ sudo apt-get update 
~$sudo apt-get install ap-hotspot
~$ sudo ap-hotspot configure 
 
You will be asked if if found the right interface (for me it is eth0, my ethernet network interface). If it has it press enter.
After that it asks if it has the right wireless network card. For me it was wlan0. If it is right, press enter again.
Then it prompts you to enter the hotspot name. In this example it will be DS hotspot.
I'll use the default key because I'll remove it later so just press enter.
Now you have finished the setup.

Now enter this in the terminal: 
 ~$ sudo gedit /etc/hostapd-hotspot.conf

You will get a file with this code

# WiFi Hotspot
interface=wlan0
driver=nl80211
#Access Point
ssid=DS hotspot
hw_mode=g
# WiFi Channel:
channel=1
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=qwerty0987
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

For open wifi
Now you can simply remove the last 5 lines
wpa=3
...
rsn_pairwise=CCMP
For WEP
Replace the last 5 lines with
wep_default_key=0
wep_key0="mykey"
Make sure mykey is inside " ..." and is a correct WEP key (5 characters long or other WEP keys)

Continue
So now save this file.
Disconnect your wifi.
Open your terminal again.

~$ sudo ap-hotspot start
As easy as that.

Now to your DS or phone should be able to find your hotspot under the name you gave (DS hotspot in this tutorial).
When you want to stop the hotspot simple enter this into the terminal

~$ sudo ap-hotspot stop
If you have any questions don't hesitate to ask.

5 opmerkingen:

  1. Thank you, I love you, and you will get a lot of sex one day!

    BeantwoordenVerwijderen
  2. hi! my phone doesn't obtain the ip address :/ any ideas on what to do?

    BeantwoordenVerwijderen
    Reacties
    1. Did you try the default configuration? So don't change anything in the /etc/hostapd-hotspot.conf
      Does it connect that way?

      Verwijderen
  3. I had connected to internet through wvdial....how to make it available through hotspot. I am able to connect it to mobile device but there is no interet

    BeantwoordenVerwijderen
  4. tab is not able to get IP address.. hence no internet connection to tab.

    BeantwoordenVerwijderen