maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   [HOWTO] N900 WiFi Hotspot (shell script version) (https://talk.maemo.org/showthread.php?t=73406)

J4ZZ 2011-05-27 11:53

Re: [HOWTO] N900 WiFi Hotspot (shell script version)
 
Brilliant mate, that did it... ;)

cheers,

..::J4ZZ::..

Edit: Yay, 200 posts reached.

ivanrajkovic 2011-05-27 14:43

Re: [HOWTO] N900 WiFi Hotspot (shell script version)
 
Quote:

Originally Posted by 9000 (Post 1016412)
Yes, you could just leave the iptables alone if you just want to connect to N900 without a tethering need.

And you don't need that modprobe ipt_MASQUERADE as well.

However, one thing you must note that if you're using Windows PC to connect to any WiFi, it always tries to make it as the default route, i.e. all internet traffice request would go to WiFi. Unless you made change to this default behaviour, you might not be able to go to internet via your private network of your PC when you're connecting to WiFi.

Thanks, I'll give it try this weekend. I need this in the case I'm on a road and have to transfer something between my laptop and N900 without a cable. I have linux on the laptop so I hope I would be able to add different routes for N900 and internet, if necessary.

Thanks again,
i.

blipnl 2011-06-01 07:01

Re: [HOWTO] N900 WiFi Hotspot (shell script version)
 
I managed to establish a connection with my N900 running this script in QBW and connecting with a N97 mini. However, I did not get internet access. Will try after reboot. And, I don't know how to make the close script into a .tar, so for me it is not possible to turn the script off :/ could this also be added in the first post in the future?

Thanks.

9000 2011-06-01 07:38

Re: [HOWTO] N900 WiFi Hotspot (shell script version)
 
Quote:

Originally Posted by blipnl (Post 1019942)
I managed to establish a connection with my N900 running this script in QBW and connecting with a N97 mini. However, I did not get internet access. Will try after reboot. And, I don't know how to make the close script into a .tar, so for me it is not possible to turn the script off :/ could this also be added in the first post in the future?

Thanks.

I don't understand here. You don't need to make the second script into tar in order to run it. BTW, both scripts are included the the .tar of the first post. You can download and untar it.

downstormaf 2011-06-04 06:27

Re: [HOWTO] N900 WiFi Hotspot (shell script version)
 
I need a little help here 9000,

I was writing the first code on installing the script, everything was going well until writing the line

iwconfig wlan0 mode ad-hoc

it returns the following,

+ iwconfig wlan0 mode ad-hoc
/bin/sh: iwconfig: not found

Is this good? is it part of the process? I'm going to keep writing the code but if there is something wrong please reply, and thanks for your help

9000 2011-06-04 06:32

Re: [HOWTO] N900 WiFi Hotspot (shell script version)
 
Quote:

Originally Posted by downstormaf (Post 1022047)
I need a little help here 9000,

I was writing the first code on installing the script, everything was going well until writing the line

iwconfig wlan0 mode ad-hoc

it returns the following,

+ iwconfig wlan0 mode ad-hoc
/bin/sh: iwconfig: not found

Is this good? is it part of the process? I'm going to keep writing the code but if there is something wrong please reply, and thanks for your help

This command helps change the mode of the WiFi interface, which is essential to the script.

I forgot to mention this is provided by the package wireless-tools. I'll revise the instructions. Thank you for your feedback.

downstormaf 2011-06-04 06:41

Re: [HOWTO] N900 WiFi Hotspot (shell script version)
 
Quote:

Originally Posted by 9000 (Post 1022048)
This command helps change the mode of the WiFi interface, which is essential to the script.

I forgot to mention this is provided by the package wireless-tools. I'll revise the instructions. Thank you for your feedback.

sorry to bother again, but I wrote every code from the installation part, still haven't done the turn off one but should i notice anything after doing that part of the code?

I'm using the WiFi Switcher (cuz I can't install Queen BeeCon from the apps manager for some strange reason), but does this work for the code?

thanks for your help again

9000 2011-06-04 06:58

Re: [HOWTO] N900 WiFi Hotspot (shell script version)
 
Quote:

Originally Posted by downstormaf (Post 1022050)
sorry to bother again, but I wrote every code from the installation part, still haven't done the turn off one but should i notice anything after doing that part of the code?

I'm using the WiFi Switcher (cuz I can't install Queen BeeCon from the apps manager for some strange reason), but does this work for the code?

thanks for your help again

Don't worry. I'm glad to help.

There's two ways to turn off the hotspot: 1) change the mode from ad hoc to managed 2) turn off the wifi interface. I'm not sure about the operation of the wifi switcher, but what the wifi.sh script is doing is to

When wifi is up (no matter it is in ad hoc or managed)
1) turn off the interface
2) unload related modules
3) stop the related process
4) notify the user wifi is turned off

When wifi is down
1) turn on the interface in managed mode
2) load related modules
3) start the related process
4) notify the user wifi is turned on


Therefore, when you run the script wifi.sh I provided, you may look at the screen for notification.

Also, if you're using QBE, you might notice the change in color of the icon as wifi.sh would return different exit code for different status.

Hope this helps.

downstormaf 2011-06-04 07:15

Re: [HOWTO] N900 WiFi Hotspot (shell script version)
 
I thank you for your help but i'm not understanding how this works right now......

1. how do i know if the code is working?
2. where can i find the package wireless-tools for the iwconfig?

i managed to download and install Queen BeeCon and did the following steps on adding the new commands, wifi hotspot and wifi. But how do I use it?

I know that this is frustrating because for me it is.... I did get the Kernel_power for my n900 just for the overclocking, I haven't used it for anything else (850mhz) and lower the voltage usage a little...

9000 2011-06-04 07:43

Re: [HOWTO] N900 WiFi Hotspot (shell script version)
 
Quote:

Originally Posted by downstormaf (Post 1022058)
I thank you for your help but i'm not understanding how this works right now......

1. how do i know if the code is working?

Discover the wifi you setup by other device.

There's no other explicit message. It is a script version with highest simplicity anyway.

Quote:

2. where can i find the package wireless-tools for the iwconfig?
Code:

root
apt-get install wireless-tools

Quote:

i managed to download and install Queen BeeCon and did the following steps on adding the new commands, wifi hotspot and wifi. But how do I use it?
You may look here: http://wiki.maemo.org/Queen_BeeCon_Widget
Quote:

I know that this is frustrating because for me it is.... I did get the Kernel_power for my n900 just for the overclocking, I haven't used it for anything else (850mhz) and lower the voltage usage a little...
That's okay. You are on the right track.


All times are GMT. The time now is 08:41.

vBulletin® Version 3.8.8