Read-only archive of the All About Symbian forum (2001–2013) · About this archive

How to connect the A925 to Linux using Bluetooth

11 replies · 32,725 views · Started 02 November 2004

albatorsk wrote:The guide's down for the moment. I'm working on a newer, easier to follow version.

Can't wait to see it, since i'm fighting with my Motorola on Linux right now.

BTW, is it possible to have internet access on Motorola phones using linux subsitute of mrouter?

KrzychuG wrote:BTW, is it possible to have internet access on Motorola phones using linux subsitute of mrouter?

Yes, it works exactly as in Windows.

albatorsk wrote:Yes, it works exactly as in Windows.

That's great, i hope you'll release new guide soon.

Could you also write how to configure IrDA and Bluetooth connection with it?

Any news about that guide? Could you at least post some sources on how to connect motorola to PC with linux while you're still working on the guide?

Ah, sorry about that. It's been a busy month.

Quick'n'dirty guide:

Set up a DNS with 169.254.1.1 pointing to a920, and 169.254.1.68 pointing to wsockhost.mrouter.

Then, make sure you have PPP support in your kernel, and the pppd (PPP daemon) installed. You also need, of course, bluetooth support, hci_usb, rfcomm, l2cap and the device driver for your BT dongle. BlueZ (the bluetooth stack) has to be installed too.

Then, it's simply a matter of configuring hcid.conf and starting hcid and sdpd. After that you pair your phone with your computer.

Next, you add a serial port with

sdptool add SP

and start the Dial-up Networking Daemon (dund) with the following options:
dund --listen --channel 1 --msdun noauth 169.254.1.68:169.254.1.1 460800 ms-dns 169.254.1.68 lock --persist

That's basically it. This won't enable TCP forarding, though. You'll need iptables for that.

The complete guide should be done in a couple of days. Just hold on a bit longer.

I did everything like you wrote. I setup a DNS server (bind) with 169.254.1.68 pointing to wsockhost.mrouter


[ 23:36:27 :: root :: ~ ] hostx -v wsockhost.mrouter
Query about wsockhost.mrouter for record types A
Trying wsockhost.mrouter ...
Query done, 1 answer, authoritative status: no error
wsockhost.mrouter 86400 IN A 169.254.1.68
Authority information:
mrouter 86400 IN NS ns.mrouter
Additional information:
ns.mrouter 86400 IN A 169.254.1.69

and added 169.254.1.1 as a920 in /etc/hosts.

Everything seems to work. I can connect my Motorola via desktop suite to PC, but it disconnects after 90 seconds. It looks like it can't resolve wsockhost.mrouter addess but i don't get why. Right now i'm trying to connect via USB cable with ppp options like this:


[ 23:36:38 :: root :: ~ ] cat /etc/ppp/options
/dev/ttyACM0
460800
debug
crtscts
local
lock
noauth
passive
nomagic
proxyarp
ms-dns 169.254.1.68
169.254.1.68:169.254.1.1

After i run ppp /dev/ttyACM0 nodeatch i get:


[ 23:33:52 :: root :: ~ ] pppd /dev/ttyACM0 nodetach
using channel 40
Using interface ppp0
Connect: ppp0 <--> /dev/ttyACM0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <magic 0xd4dadb0a> <asyncmap 0x0> <pcomp> <accomp>]
sent [LCP ConfRej id=0x1 <magic 0xd4dadb0a>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <magic 0x1ec8442a> <asyncmap 0x0> <pcomp> <accomp>]
sent [LCP ConfRej id=0x1 <magic 0x1ec8442a>]
rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <pcomp> <accomp>]
sent [LCP ConfAck id=0x2 <asyncmap 0x0> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <pcomp> <accomp>]
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 169.254.1.68>]
rcvd [CCP ConfReq id=0x1 < 11 05 00 01 03>]
sent [CCP ConfRej id=0x1 < 11 05 00 01 03>]
rcvd [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
sent [IPCP ConfNak id=0x1 <addr 169.254.1.1> <ms-dns1 169.254.1.68> <ms-dns3 169.254.1.68>]
rcvd [CCP ConfRej id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [CCP ConfReq id=0x2]
rcvd [IPCP ConfAck id=0x1 <compress VJ 0f 01> <addr 169.254.1.68>]
rcvd [CCP ConfReq id=0x2 <mppe -H -M -S -L -D +C>]
sent [CCP ConfRej id=0x2 <mppe -H -M -S -L -D +C>]
rcvd [LCP ProtRej id=0x3 80 fd 01 02 00 04]
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
rcvd [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 169.254.1.1> <ms-dns1 169.254.1.68> <ms-dns3 169.254.1.68>]
sent [IPCP ConfAck id=0x2 <compress VJ 0f 01> <addr 169.254.1.1> <ms-dns1 169.254.1.68> <ms-dns3 169.254.1.68>]
Cannot determine ethernet address for proxy ARP
local IP address 169.254.1.68
remote IP address 169.254.1.1
Script /etc/ppp/ip-up started (pid 16337)
rcvd [CCP ConfReq id=0x4 <predictor 1>]
Script /etc/ppp/ip-up finished (pid 16337), status = 0x1
rcvd [CCP ConfReq id=0x4 <predictor 1>]
rcvd [CCP ConfReq id=0x4 <predictor 1>]
rcvd [CCP ConfReq id=0x4 <predictor 1>]
rcvd [CCP ConfReq id=0x4 <predictor 1>]
rcvd [LCP TermReq id=0x3]
LCP terminated by peer
Connect time 1.5 minutes.
Sent 728 bytes, received 1032 bytes.
Script /etc/ppp/ip-down started (pid 16366)
sent [LCP TermAck id=0x3]
Script /etc/ppp/ip-down finished (pid 16366), status = 0x1
Connection terminated.
Modem hangup

I tried to ping a920 (169.254.1.1) but i can't do that. I can only ping 169.254.1.68. It looks like mobile still doesn't see my PC, but why?

I'm out of ideas. Same thing happends when i'm trying to connect via bluetooth. It shows connected to PC on phone and breaks it after 90 seconds.

I temporarily disabled my firewall (it blocks a lot of things by default) but still same problem.

Edit:

That's my ppp modules i have loaded:


[ 23:41:55 :: root :: ~ ] lsmod | grep ppp
ppp_deflate 4128 0
zlib_deflate 17112 1 ppp_deflate
ppp_async 8160 0
crc_ccitt 1216 1 ppp_async
ppp_generic 20884 3 ppp_deflate,bsd_comp,ppp_async
slhc 4576 1 ppp_generic

It looks like it can't resolve wsockhost.mrouter addess but i don't get why.

Are you sure it's listening on 169.254.1.68? Try starting BIND after you've established the PPP connection.

In the guide (which is still not finished, sorry) I will recommend using dnsmasq. It resolves hosts from /etc/hosts, always listens on all interfaces (unless you tell it not to) and is extremely easy to set up.

Yes, i'm preety sure that my bind listens on 169.254.1.68 too. Just look at this:


[ 22:37:59 :: root :: ~ ] pppd /dev/ttyACM0 nodetach
using channel 42
Using interface ppp0
Connect: ppp0 <--> /dev/ttyACM0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <pcomp> <accomp>]
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 169.254.1.68>]
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 169.254.1.68>]
rcvd [LCP ConfReq id=0x1 <magic 0x9ec24a89> <asyncmap 0x0> <pcomp> <accomp>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <pcomp> <accomp>]
sent [LCP ConfRej id=0x1 <magic 0x9ec24a89>]
rcvd [LCP ConfAck id=0x2 <asyncmap 0x0> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <pcomp> <accomp>]
sent [LCP ConfAck id=0x2 <asyncmap 0x0> <pcomp> <accomp>]
sent [CCP ConfReq id=0x2 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 169.254.1.68>]
rcvd [CCP ConfReq id=0x1 < 11 05 00 01 03>]
sent [CCP ConfRej id=0x1 < 11 05 00 01 03>]
rcvd [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
sent [IPCP ConfNak id=0x1 <addr 169.254.1.1> <ms-dns1 169.254.1.68> <ms-dns3 169.254.1.68>]
rcvd [CCP ConfRej id=0x2 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [CCP ConfReq id=0x3]
rcvd [IPCP ConfAck id=0x2 <compress VJ 0f 01> <addr 169.254.1.68>]
rcvd [CCP ConfReq id=0x2 <mppe -H -M -S -L -D +C>]
sent [CCP ConfRej id=0x2 <mppe -H -M -S -L -D +C>]
rcvd [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 169.254.1.1> <ms-dns1 169.254.1.68> <ms-dns3 169.254.1.68>]
sent [IPCP ConfAck id=0x2 <compress VJ 0f 01> <addr 169.254.1.1> <ms-dns1 169.254.1.68> <ms-dns3 169.254.1.68>]
Cannot determine ethernet address for proxy ARP
local IP address 169.254.1.68
remote IP address 169.254.1.1
Script /etc/ppp/ip-up started (pid 29180)
Script /etc/ppp/ip-up finished (pid 29180), status = 0x1
rcvd [LCP ProtRej id=0x3 80 fd 01 03 00 04]
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
rcvd [CCP ConfReq id=0x4 <predictor 1>]
rcvd [CCP ConfReq id=0x4 <predictor 1>]
rcvd [CCP ConfReq id=0x4 <predictor 1>]
rcvd [CCP ConfReq id=0x4 <predictor 1>]
rcvd [CCP ConfReq id=0x4 <predictor 1>]
rcvd [LCP TermReq id=0x3]
LCP terminated by peer
Connect time 1.5 minutes.
Sent 336 bytes, received 870 bytes.
Script /etc/ppp/ip-down started (pid 29476)
sent [LCP TermAck id=0x3]
Script /etc/ppp/ip-down finished (pid 29476), status = 0x1
rcvd [LCP TermAck id=0x3]
Connection terminated.
[ 22:40:00 :: root :: ~ ]

Meanwhile:


[ 22:37:56 :: root :: /home/arcain ] /etc/init.d/named restart
* Stopping named ... [ ok ]
* Starting named ... [ ok ]

[ 22:38:33 :: root :: /home/arcain ] hostx -v wsockhost.mrouter 169.254.1.68
Server: 169.254.1.68

Query about wsockhost.mrouter for record types A
Trying wsockhost.mrouter ...
Query done, 1 answer, authoritative status: no error
wsockhost.mrouter 86400 IN A 169.254.1.68
Authority information:
mrouter 86400 IN NS ns.mrouter
Additional information:
ns.mrouter 86400 IN A 169.254.1.69

[ 22:38:39 :: root :: /home/arcain ] ping 169.254.1.1
PING 169.254.1.1 (169.254.1.1) 56(84) bytes of data.

--- 169.254.1.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3031ms

I also tried with dnsmask. Same problem.

It looks like no data is transfered through cable/bluetooth to phone.

EDIT:

Could it be because of the flash i'm using in my Motorola? I've got 35.80.59 Generix, which is a modified version of 30.95.00. I've got some weird bleutooth problems with it too. It disconnects me sometimes without any reason in random moments.