The Following 39 Users Say Thank You to 9000 For This Useful Post: | ||
Alejandro, amin007110, anapospastos, anthonie, asys3, blipnl, cheve, debernardis, demolition, Estel, figaro, frostbyte, fw190, handaxe, impeham, ivanrajkovic, j-kidd, J4ZZ, jedi, Joseph9560, kwurk, lidow, lkravovicz, manojkumaru, Mentalist Traceur, miked1541, mike_shenoda, mr id, nman, Obsidian, pfontana77, Pigro, preflex, PUNK, sEKI, ste-phan, vdx29, vi_ |
|
2011-05-26
, 11:19
|
Posts: 539 |
Thanked: 518 times |
Joined on May 2010
@ nanaurbusiness
|
#2
|
IroN900:/usr/bin# wlapon + start wlancond start: Job not changed: wlancond + modprobe crc7 + modprobe mac80211 + modprobe wl12xx + modprobe ipt_MASQUERADE + iptables -F + iptables -t nat -F + iptables -t nat -A POSTROUTING -o gprs0 -j MASQUERADE + echo 1 + ifconfig wlan0 down + iwconfig wlan0 mode ad-hoc + ifconfig wlan0 up + iwconfig wlan0 essid TKX + iwconfig wlan0 key s:00000 + iwconfig wlan0 channel 11 + ifconfig wlan0 10.161.3.1 netmask 255.255.255.0 up + start-stop-daemon -S -p /var/run/wifi_tethering.pid -m -b -x /usr/sbin/dnsmasq -- -k -I lo -z -a 10.161.3.1 -F 10.161.3.2,10.161.3.10 -b /usr/sbin/dnsmasq already running. + run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:WiFi HotSpot Activated
|
2011-05-26
, 11:34
|
Posts: 43 |
Thanked: 18 times |
Joined on Jul 2010
|
#3
|
|
2011-05-26
, 12:12
|
Posts: 1,048 |
Thanked: 1,127 times |
Joined on Jan 2010
@ Amsterdam
|
#4
|
|
2011-05-26
, 12:33
|
|
Posts: 279 |
Thanked: 231 times |
Joined on Apr 2010
@ Holland
|
#5
|
|
2011-05-27
, 01:41
|
Posts: 1,425 |
Thanked: 983 times |
Joined on May 2010
@ Hong Kong
|
#6
|
I could need some help here. My Laptop is only getting a private IP so DHCP doesn't seem to work properly.
Here's my output.
Edit: I tried also to give static addresses (IP, Gateway and DNS) but I can't even ping my N900 from the Laptop.Code:IroN900:/usr/bin# wlapon + start wlancond start: Job not changed: wlancond + modprobe crc7 + modprobe mac80211 + modprobe wl12xx + modprobe ipt_MASQUERADE + iptables -F + iptables -t nat -F + iptables -t nat -A POSTROUTING -o gprs0 -j MASQUERADE + echo 1 + ifconfig wlan0 down + iwconfig wlan0 mode ad-hoc + ifconfig wlan0 up + iwconfig wlan0 essid TKX + iwconfig wlan0 key s:00000 + iwconfig wlan0 channel 11 + ifconfig wlan0 10.161.3.1 netmask 255.255.255.0 up + start-stop-daemon -S -p /var/run/wifi_tethering.pid -m -b -x /usr/sbin/dnsmasq -- -k -I lo -z -a 10.161.3.1 -F 10.161.3.2,10.161.3.10 -b /usr/sbin/dnsmasq already running. + run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:WiFi HotSpot Activated
Greetz,
J4ZZ
|
2011-05-27
, 01:47
|
Posts: 1,425 |
Thanked: 983 times |
Joined on May 2010
@ Hong Kong
|
#7
|
Thanks, I just have a question:
If I would only want to connect to my N900 with wifi but without using it as a hot-spot (so, without gprs0), I guess I would just need to take out these lines:
HOSTIDEV="gprs0"
modprobe ipt_MASQUERADE
iptables -t nat -A POSTROUTING -o $HOSTIDEV -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
would I need to keep:
iptables -t nat -F
I would say that I don't need iptables at all, is that right?
i.
The Following User Says Thank You to 9000 For This Useful Post: | ||
|
2011-05-27
, 01:53
|
Posts: 1,425 |
Thanked: 983 times |
Joined on May 2010
@ Hong Kong
|
#8
|
So this script is executable via QBW? I sure hope this works, seems complicated though!
I hope I don't ask too much of you, but since i am no expert of QBW could you please import the script to a QBW-instance and upload it to post #1? (export buffer to file) That would be just great
The Following User Says Thank You to 9000 For This Useful Post: | ||
|
2011-05-27
, 10:25
|
Posts: 539 |
Thanked: 518 times |
Joined on May 2010
@ nanaurbusiness
|
#9
|
|
2011-05-27
, 11:06
|
Posts: 1,425 |
Thanked: 983 times |
Joined on May 2010
@ Hong Kong
|
#10
|
Thanks for replying, I got it working now.
Now I have another request, is there a way to just start and stop Hotspot with a script and keep WiFi running. What I want is to have a QBW Button to just toggle Hotspot on/off if needed, but keep my WiFi or GPRS connection running afterwards.
Thx in advance,
Greetz,
J4ZZ
The advantage of using this script to build WiFi Hotspot over the packages mobilehotspot and joikuspot is that it's simple and consume less power. The original script is written by jebba, modified slightly by me for easy customization, DNS and process initialization; therefore credit still goes to him.
The reason I post this script is for those who are having technical problems with mobilehotspot or joikuspot, and for those who'd want to run a WiFi hotspot with minimum power usage.
2 Installation
The script is pretty self explanatory therefore I'll let you explore it yourself.
It can be run as root or triggered by Queen Beecon Widget. Tell me if you need help on this.
The SSID is honeypot and the password is 0000000000000. You can customize them for your own use. Note that the length of the password must be 13.
It needs packages wireless-tools and iptables, and iptables depends on kernel power. Therefore, you must be well-aware of the risk running kernel power so use it at your own risk.
You can turn it off by using any WiFi switching applet/widget, or you could use this script (again, run as root):
4. Troubleshooting
4.1 Q: Password rejected.
A: The length of the password must be 13.
4.2 Q:Tell me how to setup Queen Beecon Widget
A:
1) Add new Widget
2) Choose Queen BeeCon Widget
3) Edit the Widget you've created on your desktop
4) Add Cmd
5) Enter Title: WiFi HotSpot
6) Enter Command: echo <path_to_script>/<name of the script> | root
e.g. if the path to the script is /home/user/script/ and the name of the script is open_wifi_hotspot.sh, then the line would be:
echo /home/user/script/open_wifi_hotspot.sh | root
(you need rootsh installed, but I'm sure you do)
7) Save
8) If you don't need to change the outlook of your QBW icon, you can just accept all the default and save.
9) Done
Similarly for wifi.sh:
echo /home/user/script/wifi.sh | root
wifi.sh uses exit code (2 and 0) to tell you the status of the wifi. Therefore, you'd like to config different color for different exit code. I use the following:
0 - Green, WiFi is enabled
2 - Red, WiFi is disabled
Or you could just use the default. The script would give you popup message anyway.
4.3 The module ipt_MASQUERADE isn't loaded after upgrading to kernel-power v47
The module works fine in v46. Downgrade your kernel-power. (at your own risk)
(Please reply here if you've any question. Then I'll update this section.)
EDIT: wireless-tools provides iwconfig. Revised.
EDIT: Report has it that ipt_MASQUERADE isn't loaded in kernel-power v47. Troubleshooting updated.
[HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
[HOWTO] N900 WiFi Hotspot (shell script version)
N900: Useful Tips (a summary)
Last edited by 9000; 2011-06-27 at 14:51.