Maddler's Rants 'n' Raves

Of N800 and the missing Dummy IAP (updated)

Feb 1
Of N800 and the missing Dummy IAP (updated)

As many already noticed the Dummy IAP is not working on N800. This basically means that you cannot use browser, chat, calls and so on if you use a bluetooth or USB connection.
But, as maybe someone said already, I had a dream! What if I define a not-so-dummy ad-hoc wlan connection and use same usb0/BT subnet? Want to know more?

[More:]

I had already defined usb0 config, both on N800 and laptop:

/etc/networki/interfaces on N800


auto usb0
iface usb0 inet static
address 192.168.2.15
netmask 255.255.255.0
gateway 192.168.2.1

and on laptop


auto usb0
iface usb0 inet static
address 192.168.2.1
netmask 255.255.255.0
up echo 1 > /proc/sys/net/ipv4/ip_forward
up iptables -P FORWARD ACCEPT
up iptables -I POSTROUTING 1 -t nat -j MASQUERADE -s 192.168.2.0/24
down echo 0 > /proc/sys/net/ipv4/ip_forward
down iptables -t nat -F POSTROUTING

(both come from www.maemo.org wiki)

Then on N800 you need to define a new "Dummy" ad-hoc WLAN network connection. Using 0.0.0.0/0.0.0.0 address/netmask and 0.0.0.0 as gateway, no address will be assigned to wlan0, preventing other from being able to connect to your device. At this point your applications will automagically make use of already established USB0 (or bluetooth connection) since no new route will be added.


Nokia-N800-51:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 usb0
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 usb

Launching DNSmsaq on your PC will make thing easier to configure, since it will read your PC's /etc/resolv.conf and will proxy N800 requests to those nameserver.

At this point you only need to create a new nameserver entry on N800 /etc/resolv.conf

echo "nameserver 192.168.2.1" >> /etc/resolv.conf

At this point, if I didn't missed anything, everything should be working! :)

I know this is not the "perfect" solution, especially where you are not allowed to have wi-fi enabled. But, as of now, better than nothing!

Optionally, once the connection is established you can use

ifconfig wlan0 down

to switch wi-fi off. The change won't affect "dummy" connection.

More to come!
Stay tuned!

Maddler EmailMaemo, Nokia N800Permalink 8 comments

Comments, Pingbacks:

Comment from: Bob/Paul [Visitor] Email
Oh, that's genius! As my first Hildon App I'm going to write a (simple) UI for this that connects to BT or USB so I don't have to XTerm all of the time. Good deal!
PermalinkPermalink 31/01/07 @ 02:41
Comment from: Maddler [Member] Email
Thank you... :)
PermalinkPermalink 31/01/07 @ 09:28
Comment from: Matan [Visitor] Email
The two tasks can easily be automate with the dbus-scripts package:

1. running ifconfig wlan0 down when connection is established.

2. running connection script automatically when user select specific 'dummy' ad-hoc connection.

See here:http://www.mail-archive.com/maemo-users@maemo.org/msg02614.html

PermalinkPermalink 01/02/07 @ 17:40
Comment from: Maddler [Member] Email
Great! Thank you!
PermalinkPermalink 01/02/07 @ 18:03
Comment from: Simon [Visitor]
The cat command looks bogus - that probably
should have been an echo. But be carefful - on
the 770 modifying the resolv.conf directly
rendered the dnsmasq demon useless.
Suddenly resolving names no longer works. cat
command looks bogus - that probably should
have been an echo. But be careful - on the 770
modifying the resolv.conf directly rendered the dnsmasq useless and name resolving no longer works in other networks.
works.
PermalinkPermalink 03/02/07 @ 02:14
Comment from: admin [Member] Email
Hi, yes the "cat" was bogus and simply makes a new empty line appear in /etc/resolv.conf, the right command:

echo "nameserver 192.168.2.1" >> /etc/resolv.conf

This hack is only intended to be used on N800, since on 770 the gconftool stuff keeps working. This how my /etc/resolv.conf looks like:


nameserver 127.0.0.1
nameserver 192.168.2.1


DNSmasq on localhost hist queried first, then if no answer the xternal (in my case my laptop) is hit.

Yes, the file can be modified directly (e.g. with vi) but this could be harder for less experienced users who don't/cant't use vi.

Thank you for your comment by the way.
PermalinkPermalink 03/02/07 @ 19:44
Comment from: Lane [Visitor] Email
by
the Dummy IAP is not working on N800, I take it you mean the Phone connection does not show up in the select connections list. (It does not.
However, by setting up the select connection to phone (As the default), when no wifi connection is available the N800 automatically connects to the BT phone connection. Browsing and mail works for me anyway, The limitation I see is that I cannot tell the N800 to use that specific connection.
PermalinkPermalink 04/02/07 @ 04:08
Comment from: Maddler [Member] Email
Hi,
if you are already able to establish a connection using standard tools, there is no need to use this hack, since everything will just work out of the box.

The hack is instead meant to be used when you use "non standard" connections (USB networking is the most common for me) and {web|mail|rss|whatever} keeps ralying on system connection.

Yes, that would be nice having "USB networking" among other networking types while setting up a new connection.

Bye,
and thank you for your comment.
PermalinkPermalink 04/02/07 @ 12:15

This post has 24 feedbacks awaiting moderation...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))

Categories

Who's Online?

  • Guest Users: 6

XML Feeds

What is RSS?