Anda di halaman 1dari 19

土木坛子

Skip to content
● Home
● About
● 公益
● 存档
● 留言
● 简介
● 联系

Set up Ubuntu 12.04 Laptop as WiFi


Hotspot (ad-hoc) to Share Wired Internet
84 Replies

I made a tutorial showing “​How to Make an Ubuntu Laptop as a WiFi Hotspot​” before. The post
is actually for Ubuntu 10.04. Since the Ubuntu 12.04 LTS (Precise Pangolin) is released, there
is a bit problem to implement the same purpose following the setup from that tutorial.
In this post I will show how to setup Ubuntu 12.04 as hotspot (ad-hoc, Access Point) to share
wired internet with other WIFI enabled devices, e.g. laptops, iPad, iPhone, iTouch,
smart-phones. Do not worry, it is quite easy to do the setup step by step by my captured
screenshot.
First of all, what you need are:
A laptop with WIFI hardware and the WIFI function is on
The laptop is connected with internet via wired connection(WLAN)
OK, here we go.
● 1. Right click network manager on the laptop with wireless hardware (these days most of
laptops have wireless modules) and connected with internet by wired network (WLAN),
then choose “Edit Connections…”, click it (Figure 1).

Figure 1
Figure 2
● 2. Click the menu “Wireless”, and click “Add” button, then fill up the blanks as you like:
your “Connection name”, “SSID”, then choose “Mode” option as “Ad-hoc”, for others no
need to change, shown as Figure 3.
Figure 3
● 3. The next step is set up your key for the connection, click “Wireless Security”, choose
“WEP 40/128-bit Key (Hex or ASCII)”, type your own “Key” if you do not want to make
the whole world to share your WIFI, it is better make the length of the key as 5
characters that I tried successfully (other length may not work) (Figure 4).

Figure 4
● 4. Turn to “IPv4-Settings”, choose the option “Shared to other computers” for “Method”,
as shown in Figure 5.
Figure 5
● 5. Do not make any change for “IPv6 Settings”, OK, click “Save” to finish the setup work,
as shown in Figure 6.
Figure 6
● 6. Left click the wireless icon on the right top corner and left click the last option: “Create
New Wireless Network…”, as shown in Figure 7.
Figure 7
● 7. On the new pop-up window, choose your created wireless network, in my case is
“WIFI hotspot via LAN”, and click “Create” button, type your password set at the step 3.
(Figure 8).
Figure 8
● 8. Now, you should see the “Wireless Networks” with a computer icon on your laptop,
which means this WIFI is the wireless connection by a computer rather than a wireless
router (Figure 9).
Figure 9
● 9. OK, all work is done on the laptop that acts as WIFI hotspot (ad-hoc). Now you can
use the wireless connection (WIFI) you already created for other devices enabled with
WIFI connection (Figure 10), select it, and input the Key (password you set) (Figure 11).
Figure 10

Figure 11
● 10. OK, you are using the WiFi from the laptop connected with cable Internet (WLAN
connection) (Figure 12)!
Figure 12
Is it great? Yes, it is, no command, all is done by GUI setup. It is the power of Linux (here is
Ubuntu 12.04), since this is only possible on Windows 7 in Microsoft family, almost no way for
XP.
The above method has been successfully tested on my two laptops, iPad 2 (WIFI only), and
Nokia 5800.
Here is the information of my two laptops (hardware and software).
● HP 520 laptop, Ubuntu 12.04, cable Internet (WLan)
● Intel Corporation 82562ET/EZ/GT/GZ – PRO/100 VE (LOM) Ethernet Controller Mobile
(rev 01)
● Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
● Acer Aspire one Netbook, Ubuntu 12.04, WiFi provided by HP 520
● Atheros Communications Inc. AR5001 Wireless Network Adapter (rev 01)
● Atheros Communications Atheros AR8132 / L1c Gigabit Ethernet Adapter (rev c0)
Update: If you think the procedure above is too complicated, you can also try the simplest and
easiest method: ​How to create a WiFi hotspot in Ubuntu laptop for mobile devices [easiest and
simplest]
Suggested Posts
● 让Ubuntu恢复屏幕定时休息功能
● Ubuntu安装极点五笔词库的方法
● 一名Ubuntu老用户对Ubuntu手机系统的评价
● 拥抱变化?老电脑要不要升级到Windows 8?
● How to Create a WiFi Hotspot in Ubuntu Laptop for Mobile Devices [Easiest and
Simplest]

This entry was posted in​ ​信息技术​ and


tagged​ ​ad-hoc​,​ ​Hotspot​,​ ​Laptop​,​ ​Ubuntu​,​ ​WiFi​ on​ ​May 19, 2012​.

Post navigation
← 祝儿子两周岁生日快乐
Windows系统(XP, Vista, Win 7)设置WiFi无线热点共享上网 →

84 thoughts on “Set up Ubuntu 12.04 Laptop


as WiFi Hotspot (ad-hoc) to Share Wired Internet”

1. Antony
August 20, 2013 at 19:50

2. I have done this but my android phone is not getting connected with the wifi poor me.
3.
4. Reply​ ↓
5.

1.
sukhjit​ ​August 22, 2013 at 16:55

2. Same for me
3.
4. Reply​ ↓
5.

6.
Andrea Araldo​ ​September 14, 2013 at 15:15

7. for me too
8.
9. Reply​ ↓
10.
1.

土木坛子​ Post author​September 14, 2013 at 21:15

2. Did you use FIVE letters as password?


3.
4. Reply​ ↓
5.
6.

Sebi​ ​March 21, 2014 at 21:28

7. I know its a bit late now bui by using a static IP, and manually configuring
the gateway and DNS you can easily connect your Android phone.
8.
9. Reply​ ↓
10.
1.

土木坛子​ Post author​March 22, 2014 at 12:11

2. Would you like to share your tricks with guys who use android
phones? Thanks anyway.
3.

4. Reply​ ↓
5.
1.

Sebi​ ​March 24, 2014 at 04:45

2. FIrst of all, android by default doesn’t support an ad-hoc


network I use a rooted Galaxy S2 with edited build.prop
files, and there are also other custom ROM’s that enable
ad-hoc support,
3. For those who don’t have root you will have to do a lil more
work to connect, first of all your computer’s wifi must
support infrastructure mode(most devices now do) and
then it is an execution of series of commands but
somebody made up a script called AP-Hotspot which if
anybody searches will get instructions to install and
configure, or alternatively there is Wiconnect which offers a
GUI, which will enable setting up a hotspot and for some
people there will be an issue of the android device getting
stuck at “Obtaining IP address”, in that case setting a static
IP through the advanced wifi settings will help you connect
it immediately, for example after setting up the hotspot, find
your computes default gateway address which will be
something like “192.168.127.1″ (Note:this is an example it
could be different for you) or finding your computers IP
something like “192.168.127.4″ and then replacing the 4
with 1 will also usually work, this address ie.
“192.168.127.1″ should be the gateway address typed in
your android device for static IP you can give any number
at the end like “192.168.127.8″, just make sure no other
device uses the same IP, netmask should be the usual
“255.255.255.0 and both the DNS server’s should be
Google DNS ie, “8.8.8.8 and 8.8.4.4″ and thats it, works
everytime.
4.

5.
6.
6. Anna
August 25, 2013 at 13:27

7. Thank you for this! This advice is the only thing that has worked to get my iphone4 to
connect to my ad hoc wireless laptop connection.
8. The key point was that the password must be five characters long. How bizarre!
9.
10. Reply​ ↓
11.

12. RonC
October 7, 2013 at 14:30

13. Your directions say:


14. “First of all, what you need are:
15. …
16. The laptop is connected with internet via wired connection (WLAN)”
17. My laptop (actually, my netbook) works also with a 3G USB modem, and since my
Android/Linux phone lacks 3G capability — I would like to feed this signal to my phone.
18. This way I could have Internet connectivity, when the phone is being used without a
nearby Wi-Fi connection.
19. Question: please tell me, is your method strictly limited to use with a wired connection?
Or, if there some modification to do the same, but by getting the Internet connection from
an USB 3G modem, instead?
20.
21. Reply​ ↓
22.

1. 土木
坛子​ Post author​October 7, 2013 at 15:15

2. @RonC: Have you tried my tutorial yet? I do not have USB modem, so I
personally do not know it. Feedback on this post does not show any solution
either.
3.
4. Reply​ ↓
5.
23. RonC
October 7, 2013 at 14:42

24. So sorry, I did not see the section ‘Older Comments’ before posting. Back in May
another user wanted to do this and you said as far as you know it is not possible.
25. I was only able to read the English-language comments so is it possible the other
exchanges contain what I need?
26. I am hoping since May, there could be be new information? But if not, I shall continue my
search.
27.
28. Reply​ ↓
29.

1. 土木
坛子​ Post author​October 7, 2013 at 15:12

2. @RonC: So far, I have not heard guys succeed to use USB modem to build an
ad-hoc hotspot. You can do a google search, and I would like to know how you
fix the problem. Good luck.
3.
4. Reply​ ↓
5.

30. lorenzobo
November 1, 2013 at 21:04

31. Hi. Thanks for your tutorial.


32. My hotspot works with my ipad but only if I don’t set any password. If I use the 5
characters one, the ipad asks for a username and the password but cannot connect (I
used no username and the username on the pc but nothing …).
33. Thanks!
34.
35. Reply​ ↓
36.
37. Tomi
November 5, 2013 at 22:46

38. Android devices (without patching) , Wii console etc can’t connect to ad-hoc networks.
You need to create access mode connection. I just found a promising howto (sharing
mobile broadband is included), haven’t tried it out yet:
http://askubuntu.com/questions/180733/how-to-setup-a-wi-fi-hotspot-access-point-mode
39.
40. Reply​ ↓
41.

1. 土木
坛子​ Post author​November 8, 2013 at 14:50

2. @Tomi: Thanks for your information. The post here was just my successful
experience. Considering the complex of the mobile devices, I think it really
depends on your fortune.
3.
4. Reply​ ↓
5.

42. george
December 26, 2013 at 07:06

43. all are fine but net…but a msg comes “hotspot is not connected to internet…Do you want
to join anyway???”
44. but i’m sure i was conneted to internet
45.
46. Reply​ ↓
47.

48. Cris​ ​March


4, 2014 at 05:57
49. I followed the instructions to the dot, I also got the message “hotspot is not connected to
internet…Do you want to join anyway???” but I just connected to the ad hoc hotspot
anyway. Then voila! I can now browse the internet thru my iPad. Thanks.
50.
51. Reply​ ↓
52.

1. 土木
坛子​ Post author​March 4, 2014 at 11:42

2. That is very nice, you can benefit from this post.


3.
4. Reply​ ↓
5.

53. Jatinder
singh​ ​April 19, 2014 at 07:21

54. hello Sir,


55. Still i have a problem in connecting my Android Phone Samasung Galaxy S DUOS with
my wireless connection.
56. m using UBUNTU 12.04 version, i followed all the steps given in above tutorial but still
facing to fix it.
57. m using a wierd network…
58. pleasse help me out
59. thanks
60.
61. Reply​ ↓
62.

Comment navigation
← Older Comments
Leave a Reply

Your email address will not be published. Required fields are marked *

Name *
Email *
Website

Comment

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym
title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite="">
<strike> <strong>

© 2006-2014 All Rights Reserved |​ ​Zhijun Tan

Anda mungkin juga menyukai