Connecting P900 to My Linux Workstation

I need to see how my web pages looks on my P900’s Opera after a few changes. But it is unconvenient to send files back and forth to my web server, and then test it using GPRS connection. Even so considering I’m using that GPRS connection to do my uploads :). Yes, I have tested it on my desktop [Opera](http://www.operasoftware.com) using small screen rendering, but that’s not the real thing.

The following is what I did. **Note**, this is **NOT** a guide how to connect to the Internet using p900 as a modem which is probably what you want. This is a guide how to connect a P900 **to** a desktop computer using Bluetooth under Linux, so that I would be able to open web pages available in the desktop computer’s web server.

This guide is also applicable to the P800 and P910.

Note that I’m assuming that you have been able to make Bluetooth connection in both direction, i.e. try sending pictures to both direction. If you haven’t managed to get Bluetooth working, don’t bother continuing.

1. Install Bind DNS server. On my [Gentoo](http://www.gentoo.org) Linux, it is as simple as `emerge bind`.
2. Edit `/etc/bind/named.conf`. Add the following:

zone “mrouter” {
type master;
notify no;
file “mrouter”;
};

3. In `/etc/bind/named.conf`, make sure the DNS server is available on all interfaces:

listen-on { any; };

4. Create a file `/var/bind/mrouter` containing:

$TTL 86400
@ IN SOA ns.mrouter root.mrouter (
200306011
28800
14400
3600000
86400 )
NS ns.mrouter.
ns A 169.254.1.65
wsockhost A 169.254.1.65

5. Start the DNS server `/etc/init.d/named restart`. Verify that you had done the DNS part correctly by issuing the command `dig wsockhost.mrouter @127.0.0.1`. It should return the line `wsockhost.mrouter. 86400 IN A 169.254.1.65`. If not, go back and try again.

6. Create file `/etc/ppp/peers/p900` containing:

noauth
debug
115200
crtscts
lock
local
proxyarp
ms-dns 169.254.1.65
169.254.1.65:169.254.1.66

7. Create a serial port profile on RFComm channel 1: `sdptool add –channel=1 SP`

8. Start a PPP server on RFComm channel 1: `dund –listen –channel 1 –msdun call p900`

9. Find out the P900 address and its serial port channel by issuing `sdptool browse`

10. Bind the P900 serial port channel ‘rfcomm bind 2 [address] [channel]`.

11. Start the connection by poking the P900 serial port and restarting BIND after the interface are brought up `echo > /dev/rfcomm2 ; sleep 5 ; /etc/init.d/named restart`.

You can put the step 7, 8 and 10 to your init scripts. But be careful with step #8, make sure your Bluetooth configuration is not discoverable or don’t put step #8 in your init scripts at all.

15 comments

  1. hpku masih yg murahan… mo nginstall bind kemaren ragu2 takut serverku rusak, lagian servernya ditmpt lain. ya udah cobain lagi deh. :(

  2. Why bind? :p

    I can transfer files and sync my K700i to Evolution thanks to MultiSync. What I want to do now is setup my K700i as a remote control for Rhythmbox and Totem via Bluetooth using rfcomm :D.

  3. why bind? because all the examples on the net uses bind, and I’m too lazy to do it creatively. in fact, had I knew bind won’t bind (no pun intended) to a newly created network interface, I would use something else :)

  4. sigh.. sampe skr gw blm pernah bisa nyambungin ngage dg linux. dan sekarang, sekalinya ada info seperti ini, hape gw lagi di opname. anyway, thanks tuk informasinya.

    btw, kalo tuk ngejadiin hape sbg modem, tau juga caranya gak? :D

  5. Your /var/bind/mrouter doesn’t work on my Debian Sarge Laptop. Since I have absolutely no clue on bind it took me a long time to fix this. The file displayed at:

    http://www.wayfinder.it/resources/p900_lan.php

    works for me. Just a couple dots and a little less after the NS ns entry. I have no idea why though. It also doesn’t matter where You put it. Debian Sarge would expect it under /var/cache/bind/mrouter using Your named.conf entry. Please add this info for other noobs like me. Thx.

  6. So it would look like this:
    $TTL 86400
    @ IN SOA ns.mrouter. root.mrouter. (
    200306012
    28800
    14400
    3600000
    86400
    )

    NS ns

    ns A 169.254.1.65
    wsockhost A 169.254.1.65

  7. Hi, i tried this out. but my connection keeps getting terrminated. I am trying to sync my p900 with multisync. Here is the dund output:
    dund[28262]: Bluetooth DUN daemon version 2.19
    dund[28267]: New connection from 00:0E:07:CC:44:87
    using channel 8
    Using interface ppp0
    Connect: ppp0 /dev/rfcomm0
    sent [LCP ConfReq id=0x1 ]
    rcvd [LCP ConfAck id=0x1 ]
    rcvd [LCP ConfReq id=0x1 ]
    sent [LCP ConfAck id=0x1 ]
    sent [CCP ConfReq id=0x1 ]
    sent [IPCP ConfReq id=0x1 ]
    rcvd [CCP ConfReq id=0x1 ]
    sent [CCP ConfRej id=0x1 ]
    rcvd [IPCP ConfReq id=0x1 ]
    sent [IPCP ConfNak id=0x1 ]
    rcvd [CCP ConfRej id=0x1 ]
    sent [CCP ConfReq id=0x2]
    rcvd [IPCP ConfAck id=0x1 ]
    rcvd [CCP ConfReq id=0x2 ]
    sent [CCP ConfRej id=0x2 ]
    rcvd [IPCP ConfReq id=0x2 ]
    sent [IPCP ConfAck id=0x2 ]
    Cannot determine ethernet address for proxy ARP
    local IP address 169.254.1.65
    remote IP address 169.254.1.66
    Script /etc/ppp/ip-up started (pid 28289)
    Script /etc/ppp/ip-up finished (pid 28289), status = 0x1
    rcvd [LCP ProtRej id=0x3 80 fd 01 02 00 04]
    rcvd [CCP ConfReq id=0x4 ]
    rcvd [CCP ConfReq id=0x4 ]
    rcvd [CCP ConfReq id=0x4 ]
    rcvd [LCP TermReq id=0x2]
    LCP terminated by peer
    Script /etc/ppp/ip-down started (pid 28367)
    sent [LCP TermAck id=0x2]
    Script /etc/ppp/ip-down finished (pid 28367), status = 0x1
    Connection terminated.
    Connect time 0.3 minutes.
    Sent 7169 bytes, received 32369 bytes.
    Connect time 0.3 minutes.
    Sent 7169 bytes, received 32369 bytes.

    Any help whould be appreciated.. Thanks

  8. Here’s the out put of dig:

    [root@shark Fri 03:17 steven]# dig wsockhost.mrouter @127.0.0.1

    ; > DiG 9.2.5 > wsockhost.mrouter @127.0.0.1
    ; (1 server found)
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER

  9. The prevoius post seems to be incomplete so i’m posting it again
    Here’s the out put of dig:

    [root@shark Fri 03:17 steven]# dig wsockhost.mrouter @127.0.0.1

    ; > DiG 9.2.5 > wsockhost.mrouter @127.0.0.1
    ; (1 server found)
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER

  10. Sorry about the repeated posts … :”>
    Here’s the out put of dig:

    [root@shark Fri 03:17 steven]# dig wsockhost.mrouter @127.0.0.1

    ; > DiG 9.2.5 > wsockhost.mrouter @127.0.0.1
    ; (1 server found)
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER- opcode: QUERY, status: SERVFAIL, id: 561
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;wsockhost.mrouter. IN A

    ;; Query time: 0 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Fri Sep 30 03:17:51 2005
    ;; MSG SIZE rcvd: 35

    I have followed all the instructions and i tried many times, actually i’ve tried different methods but no luck. This is th only thing i havent been able to suceed in in linux. If i had enough knowledge about it i would have made an attempt to make an app to make synchronization easier, like a multisync plugin , a direct plugin. Do you know of any such atempts.
    Thanks a lot

Leave a Reply to Ronny Cancel reply

Your email address will not be published. Required fields are marked *