OK thanks to everyone who helped, I now have net using bt NAP.

Here is how I did it (everything is by hand, I will try to automatize it later)

Host PC:
needed: bluez kernel, bluez lib & tools,iptables

Using typical hcid.conf

forwarding ready:
iptables -F
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i bnap0 -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

start listening connections:
pand --listen --role NAP --autozap --persist --ethernet bnap0

Then dev side:
gain root access

first add dummy net connection (as described in 
http://maemo.org/maemowiki/DummyIAP)
gconftool -s -t string /system/osso/connectivity/IAP/DEFAULT/type DUMMY

then connection
pand --connect <pc pdadrr>
(if pairing is needed, it will pop up dialog... wait second or two to 
connection to be established)
ifconfig bnep 192.168.2.2 netmask 255.255.255.0 up
route add default gw 192.168.2.1

and manual dns
echo "nameserver <nameserver ip>" >> /var/run/resolv.conf

Then again host PC side:
after connection is made by dev pand --connect:

ifconfig bnap0 192.168.2.1 netmask 255.255.255.0 up

All set. When starting browser or other that needs network, select the dummy 
"DEFAULT"


PS. Anyone already working on the NAP support for gwconnect? If not, I could 
take a look.

Greets, Ilkka
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to