![]() |
Re: N900 as a Wifi Hotspot, part 2
Slight bump here... If this isn't easy to work out, would it be possible to post some documentation on doing basic NAT through the USB connection? I tried simply reversing the host/cellphone instructions for the USB-->PC-->Internet wiki page, but if PC-->USB-->N900-->Internet would be available, that'd be grand as well.
|
Re: N900 as a Wifi Hotspot, part 2
Quote:
Also haven't tried the USB networking (in case you want to use the net at the same time from n900 and laptop) but in theory just by changing the wlan0 to usbnet0 (or whatever the interface is called) in what mobilehotspot backend outputs for dnsmasq and ifconfig should do the trick. |
Re: N900 as a Wifi Hotspot, part 2
Quote:
You said manually configuring the ip address on laptop does not give you internet connection; but can you ping the N900 (10.72.83.1 in your case) or resolve the hw address of n900 from laptop (arp 10.72.83.1). I don't really have good ideas what exactly would be the problem, I have seen this at times with my Mac laptop and never really figured out what caused it. You could try running wireshark on laptop and n900. |
Re: N900 as a Wifi Hotspot, part 2
Hi there, this has been giving me problems since the install as it seems to work and my laptop can pick it up, but it just does not want to share the connection. It seems to connect but everything just times out, Joikuspot never worked either. I have titan's kernel and the install seemed fine, but yeah it just has been giving me a lot of trouble. To save anyone some time, here is a few outputs:
~ $ uname-a Linux Nokia-N900-02-8 2.6.28.10power37 #1 PREEMPT Wed May 26 00:24:03 EEST 2010 armv71 unknown ~ $ /usr/sbin/mobilehotspot_backend start DEBUG: executing uname -r DEBUG-read_previous_state: setting state key 'gconf' to value: {'wlan_search_interval': 0} DEBUG-read_previous_state: setting state key 'kernel' to value: {'loaded_modules': {'x_tables': False, 'nf_nat': True, 'nf_conntrack': True, 'ipt_MASQUERADE': True, 'nf_conntrack_ipv4': True, 'ip_tables': False, 'iptable_nat': True, 'nf_defrag_ipv4': True}} DEBUG-read_previous_state: setting state key 'icd' to value: {} DEBUG: executing lsmod DEBUG: executing insmod /lib/modules/2.6.28.10power37/nf_conntrack.ko DEBUG: Command output: sh: insmod: not found Traceback (most recent call last): File "/usr/sbin/mobilehotspot_backend", line 14, in <module> sys.exit(backend.cli()) File "/opt/mobilehotspot/libs/backend.py", line 383, in cli backend.start() File "/opt/mobilehotspot/libs/backend.py", line 132, in start self.start_insert_modules() File "/opt/mobilehotspot/libs/backend.py", line 142, in start_insert_modules self.state['kernel']['loaded_modules'][modulename] = self.test_insert_module(modulename) File "/opt/mobilehotspot/libs/backend.py", line 359, in test_insert_module helpers.exec_cmd('insmod ' + self.module_directory + '/' + module + '.ko') File "/opt/mobilehotspot/libs/helpers.py", line 12, in exec_cmd raise Exception("Command '" + cmd + "' returned with code " + str(return_code) + " (" + str(expect_code) + " expected)") Exception: Command 'insmod /lib/modules/2.6.28.10power37/nf_conntrack.ko' returned with code 32512 (0 expected) |
Re: N900 as a Wifi Hotspot, part 2
Hi all, first message on forums :D
I have been playing with my n900, trying to get it to work as an acces point. I am using power kernel and iptables packages. I've managed to make route to internet, with wifi on ad-hoc mode and wep key. Also, with usbip, but the first one is the problematic for me. As I said, it already works, but there is just some thing that annoys me, I'll explain... Code:
#!/bin/sh- with gprs0 down, when I launch the script, I can freely comunicate between laptop and n900. - with gprs0 up, I can also go to the outside, but i cannot ping from my laptop to the n900, neither from n900 to its own wlan0 address. I can ssh to it, ask for dhcp, get routed... but cannot ping. - for the script to work, I must first connect to gprs, otherwise, changing the connection status of gprs (from connected to disconnected, or from disconnected to connected) makes the wifi stop working on the n900, and so I must re-run the script to set it up. I would be glad if somebody knows why some of these things happen, these things make this solution not completely automated. If somebody wants to try this script, the clean and sure way to go with it is: - turn wifi down, and up again (for example with wifi switcher) - connect to gprs - start the script I've made something similar with usbip, which is easier, as connection does not get killed with grps connection changes. |
Re: N900 as a Wifi Hotspot, part 2
Quote:
Unless of course! You are not root when running the backend script and you did not use sudo... Try "sudo /usr/sbin/mobilehotspot_backend start", though the frontend should do exactly the same thing so there is some other underlying issue. |
Re: N900 as a Wifi Hotspot, part 2
my mistake, wasn't under sudo... here is the output with heightened privileges
/home/user # /usr/sbin/mobilehotspot_backend start DEBUG: executing uname -r DEBUG-read_previous_state: setting state key 'gconf' to value: {'wlan_search_interval': 0} DEBUG-read_previous_state: setting state key 'kernel' to value: {'loaded_modules': {'ip_tables': True, 'nf_nat': True, 'nf_conntrack': True, 'ipt_MASQUERADE': True, 'nf_conntrack_ipv4': True, 'x_tables': True, 'iptable_nat': True, 'nf_defrag_ipv4': True}} DEBUG-read_previous_state: setting state key 'icd' to value: {'old_connection_type': 'WLAN_INFRA', 'old_connection_name': '07549e44-7336-4fbd-aa32-3541c1781a58'} DEBUG: executing lsmod DEBUG: executing lsmod DEBUG: executing lsmod DEBUG: executing lsmod DEBUG: executing lsmod DEBUG: executing lsmod DEBUG: executing lsmod DEBUG: executing lsmod ERROR:dbus.proxies:Introspect error on :1.80:/com/nokia/icd2: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NotSupported: Unsupported interface or method DEBUG: executing ifconfig wlan0 down DEBUG: executing iwconfig wlan0 mode ad-hoc DEBUG: executing ifconfig wlan0 up DEBUG: executing iwconfig wlan0 essid "N900" DEBUG: executing ifconfig wlan0 10.246.211.1 netmask 255.255.255.0 up DEBUG: executing /usr/sbin/dnsmasq -i wlan0 -a 10.246.211.1 -I lo -z -x /var/run/dnsmasq.wlan0.pid --dhcp-range=10.246.211.10,10.246.211.100,6h --dhcp-option=3,10.246.211.1 --dhcp-option=6,10.246.211.1 DEBUG: Command output: dnsmasq: failed to bind listening socket for fe80::ee9b:5bff:fe01:f6d3: Address already in use Traceback (most recent call last): File "/usr/sbin/mobilehotspot_backend", line 14, in <module> sys.exit(backend.cli()) File "/opt/mobilehotspot/libs/backend.py", line 383, in cli backend.start() File "/opt/mobilehotspot/libs/backend.py", line 135, in start self.start_run_dnsmasq() File "/opt/mobilehotspot/libs/backend.py", line 249, in start_run_dnsmasq helpers.exec_cmd(dnsmasq_command + dnsmasq_options) File "/opt/mobilehotspot/libs/helpers.py", line 12, in exec_cmd raise Exception("Command '" + cmd + "' returned with code " + str(return_code) + " (" + str(expect_code) + " expected)") Exception: Command '/usr/sbin/dnsmasq -i wlan0 -a 10.246.211.1 -I lo -z -x /var/run/dnsmasq.wlan0.pid --dhcp-range=10.246.211.10,10.246.211.100,6h --dhcp-option=3,10.246.211.1 --dhcp-option=6,10.246.211.1' returned with code 512 (0 expected) |
Re: N900 as a Wifi Hotspot, part 2
Quote:
I know I should wait for the real "connected" DBUS signal but it's pretty complex especially since there already is a signal listerner for the old connection and it seems there is no way to disconnect that one after it has outlived it's usefulness. I have spent some evenings trying to do this (4-6 weeks ago and could not make a usable solution), you could try increasing the sleep in /opt/mobilehotspot/libs/backend.py line 169 |
Re: N900 as a Wifi Hotspot, part 2
just checked and it is connected by the time it gives the error
|
Re: N900 as a Wifi Hotspot, part 2
Quote:
Try switching the connection first manually and then running the "executing ..." commands manually (below the icd2 dbus error message [which is just complaint about the interface missing introspection data]) Then before the dnsmasq command see what processes are listening and where "netstat -lnp" should give a list, port 53 is the one we're mostly interested in. |
| All times are GMT. The time now is 16:17. |
vBulletin® Version 3.8.8