DUN over bluethoot
Maksim Yevmenkin
maksim.yevmenkin at gmail.com
Wed Mar 5 17:24:26 UTC 2008
Hello Anatoli,
> I am trying to connect my n800 internet tablet (it runs Linux). I
> would like to use IP over bluethoot or ppp over it.
>
> I've tried the following:
>
> I. on the freebsd 7.0 stable host:
> #kldload ng_ubt
> #ng_ubt_load="YES"
looks fine
> ---plug the dongle
>
> /etc/rc.bluetooth start ubt0
> in /etc/bluetooth/hcsecd.conf I have
> device {
> bdaddr 00:80:n800addr;
> name "Toli";
> key nokey;
> pin "333";
> }
looks fine
> At this stage I managed to make a pair link between freebsd box and n800.
> At the next stage I will use user land ppp daemon to make a DUN.
just to clarify - do you really want DUN, i.e. Dial-Up Networking or
you want LAN - LAN Access Using PPP? while both profiles are similar,
DUN-client assumes that it talks to the modem type device, where is
LAN-client assumes is talks directly to PPP (just like in null-modem
cable case). also, from sdp point of view, both services are
completely different.
> in /etc/ppp/ppp.conf I have:
> default:
> set timeout 0
> set lqrperiod 10
> set ifaddr 10.0.0.1 10.0.0.2 255.255.255.0
> enable lqr
> accept lqr
> accept dns
> # Do not use PPP authentication. Assume that
> # Bluetooth connection was authenticated already
> disable pap
> deny pap
> disable chap
> deny chap
right. that looks fine, however, it assumes LAN-type connection. in
other words, both client and server will start talking PPP after
RFCOMM connection is established.
> I start the deamon with:
> rfcomm_pppd -s -d -C 7 -l default
this looks fine too
> II. after that I used previously created pair link and try to connect
> from n800 but I never succeed. Every time I get "Connection failed to
> phone blabla(ubt0). Try again?
>
> Do you have any idea what could be wrong? At n800 i do not have any logs.
please read below
> I prepared dump for a time when i tried to connect:
> #/usr/local/bin/hcidump
[...]
everything looks fine before this point
> > ACL data: handle 0x0011 flags 0x02 dlen 17
> L2CAP(d): cid 0x51 len 13 [psm 1]
> SDP SS Req: tid 0x0 len 0x8
> pat uuid-16 0x1103 (DUN)
> max 0x40
> cont 00
here is the SDP request from the remote client (n800) where it asks
for DUN service
> < ACL data: handle 0x0011 flags 0x02 dlen 14
> L2CAP(d): cid 0x40 len 10 [psm 1]
> SDP SS Rsp: tid 0x0 len 0x5
> tot 0x0 cur 0x0
> cont 00
and here is the response from your server that tells it that it does
not offer DUN service.
the problem is that rfcomm_pppd(8) does not register DUN service. by
design, rfcomm_pppd(8) in server mode implements LAN profile. so when
the remote client tries to search for DUN service, it will never find
it and bail.
there are a couple of solutions to this problem
1) make sure you request LAN-type (instead of DUN-type) connection on
your n800. linux can do it.
2) teach rfcomm_pppd(8) to register DUN profile as well as LAN
profile. this should be easy to do. however, you will need to tweak
your ppp(8) configuration and add fake chat script to emulate modem
AT-command exchange.
thanks,
max
More information about the freebsd-bluetooth
mailing list