[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bluetooth-dev] pppd cannot open ttyBT0



¦¶§Ó¿³(Justin Ju) wrote:

> I think that's because the btd has already opened the ttyBT0. To solve 
> this problem, I use
> 
> rf_conn twice in the client side to connect with the server side, like:
> 
>     rf_conn 11:22:33:44:55:66:77 1 0
> 
>     rf_conn 11:22:33:44:55:66:77 2 1
> 
> and the ttyBT1 in the server side will use the second channel to 
> connect with the ttyBT1 in
> 
> the client side. And finally, you can use "pppd /dev/ttyBT1" in both 
> client and server sides to
> 
> get a proper TCP/IP connection. By the way, where can I get the SDP 
> client patches? I got
> 
> the openbt (0.0.1) in the sourceforge.net but found that the 
> BluetoothPN can not be compiled,
> 
> it needs more fltk libs and including files. Your response will be 
> very helpful for me.
> 
>     -----Original Message-----
>     *From:* owner-bluetooth-dev@xxxxxxx.com
>     [mailto:owner-bluetooth-dev@xxxxxxx.com]*On Behalf Of *Tung
>     *Sent:* Thursday, March 15, 2001 9:09 PM
>     *To:* bluetooth-dev@xxxxxxx.com
>     *Subject:* [bluetooth-dev] pppd cannot open ttyBT0
>     
>     Hi,
>     i tried to set up ppp connection again. i still got the same
>     problem " *Device ttyBT0 is locked by pid 783*". i used ps to
>     check out the process but the kernel did not show out. one strange
>     thing was that pid number locking the ttyBT0 changed (look at
>     debug message, one is 783 and another is 4847). i don't know
>     what's happening? could anybody help me?
>     i am using 20010108 protocol stack patched with support RH 6.2
>     /7.0 and SDP client developed by Marcu Smith patches.
>     are there anybody who can set up ppp connection with this version
>     of stack?
>     
>     Raymond
>     
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     Client:
>      Mar 15 18:34:39 localhost btd: close_device
>     Mar 15 18:34:39 localhost btd: Didn't get any remote IP
>     Mar 15 18:34:39 localhost btd: IP addresses used : 88.250.255.191:
>     Mar 15 18:34:39 localhost btd: start pppd...
>     Mar 15 18:34:39 localhost btd: Starting ppp client on /dev/ttyBT0
>     Mar 15 18:34:39 localhost btd: Spawned pppd[4910] in the background
>     Mar 15 18:34:39 localhost btd: ppp child died, now restart!
>     Mar 15 18:34:39 localhost btd: build_pppdopt
>     Mar 15 18:34:39 localhost pppd[4911]: pppd 2.3.11 started by root,
>     uid 0
>     Mar 15 18:34:39 localhost pppd[4911]: Device ttyBT0 is locked by
>     pid 4847
>     
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     Mar 15 18:32:40 localhost btd: close_device
>     Mar 15 18:32:40 localhost btd: Didn't get any remote IP
>     Mar 15 18:32:40 localhost btd: IP addresses used : 88.250.255.191:
>     Mar 15 18:32:40 localhost btd: start pppd...
>     Mar 15 18:32:40 localhost btd: Starting ppp client on /dev/ttyBT0
>     Mar 15 18:32:40 localhost btd: Spawned pppd[932] in the background
>     Mar 15 18:32:40 localhost btd: ppp child died, now restart!
>     Mar 15 18:32:40 localhost btd: build_pppdopt
>     Mar 15 18:32:40 localhost pppd[933]: pppd 2.3.11 started by root,
>     uid 0
>     Mar 15 18:32:40 localhost pppd[933]: Device ttyBT0 is locked by
>     pid 783
>     Mar 15 18:32:40 localhost pppd[933]: Exit.
>     
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>      >ps
>     763 pts/1    00:00:06 btd
>       765 ?        00:00:01 konsole
>       766 pts/2    00:00:00 bash
>      3860 ?        00:00:00 pppd
>      4278 pts/1    00:00:00 pppd
>      4279 pts/2    00:00:00 ps
>      
>     
>     ************************************
>     Server:
>     <<<< i issued a rf_send on the client side>>>>>>
>     Mar 15 18:31:14 eea218 kernel: bt_receive_lower_stack : (1)
>     Mar 15 18:31:14 eea218 kernel:    0x40
>     Mar 15 18:31:14 eea218 kernel: BT (driver) bt_flush_chars (done)
>     Mar 15 18:31:17 eea218 kernel:
>     Mar 15 18:31:17 eea218 kernel: bt_receive_lower_stack : (16)
>     Mar 15 18:31:17 eea218 kernel:    0x02 0x01 0x20 0x3c 0x00 0x38
>     0x00 0x40 0x00 0x09 0xef 0x69 0x7e 0xff 0x7d 0x23
>     Mar 15 18:31:17 eea218 kernel:
>     Mar 15 18:31:17 eea218 kernel: bt_receive_lower_stack : (49)
>     Mar 15 18:31:17 eea218 kernel:    0xc0 0x21 0x7d 0x21 0x7d 0x21
>     0x7d 0x20 0x7d 0x38 0x7d 0x21 0x7d 0x24 0x7d 0x21
>     Mar 15 18:31:17 eea218 kernel:    0x28 0x7d 0x22 0x7d 0x26 0x7d
>     0x20 0x7d 0x20 0x7d 0x20 0x7d 0x20 0x7d 0x25 0x7d
>     Mar 15 18:31:17 eea218 kernel:    0x26 0x9d 0x2a 0xd5 0xfe 0x7d
>     0x27 0x7d 0x22 0x7d 0x28 0x7d 0x22 0xeb 0xc6 0x7e
>     Mar 15 18:31:17 eea218 kernel:    0x40
>     Mar 15 18:31:17 eea218 kernel: BT (driver) bt_flush_chars (done)
>     Mar 15 18:31:20 eea218 kernel:
>     Mar 15 18:31:20 eea218 kernel: bt_receive_lower_stack : (56)
>     Mar 15 18:31:20 eea218 kernel:    0x02 0x01 0x20 0x3c 0x00 0x38
>     0x00 0x40 0x00 0x09 0xef 0x69 0x7e 0xff 0x7d 0x23
>     Mar 15 18:31:20 eea218 kernel:    0xc0 0x21 0x7d 0x21 0x7d 0x21
>     0x7d 0x20 0x7d 0x38 0x7d 0x21 0x7d 0x24 0x7d 0x21
>     Mar 15 18:31:20 eea218 kernel:    0x28 0x7d 0x22 0x7d 0x26 0x7d
>     0x20 0x7d 0x20 0x7d 0x20 0x7d 0x20 0x7d 0x25 0x7d
>     Mar 15 18:31:20 eea218 kernel:    0x26 0x9d 0x2a 0xd5 0xfe 0x7d
>     0x27 0x7d
>     Mar 15 18:31:20 eea218 kernel:
>     Mar 15 18:31:20 eea218 kernel: bt_receive_lower_stack : (9)
>     Mar 15 18:31:20 eea218 kernel:    0x22 0x7d 0x28 0x7d 0x22 0xeb
>     0xc6 0x7e 0x40
>     Mar 15 18:31:20 eea218 kernel: BT (driver) bt_flush_chars (done)
>     Mar 15 18:31:23 eea218 kernel:
>     Mar 15 18:31:23 eea218 kernel: bt_receive_lower_stack : (8)
>     Mar 15 18:31:23 eea218 kernel:    0x02 0x01 0x20 0x3c 0x00 0x38
>     0x00 0x40
>     Mar 15 18:31:23 eea218 kernel:
>     Mar 15 18:31:23 eea218 kernel: bt_receive_lower_stack : (56)
>     Mar 15 18:31:23 eea218 kernel:    0x00 0x09 0xef 0x69 0x7e 0xff
>     0x7d 0x23 0xc0 0x21 0x7d 0x21 0x7d 0x21 0x7d 0x20
>     Mar 15 18:31:23 eea218 kernel:    0x7d 0x38 0x7d 0x21 0x7d 0x24
>     0x7d 0x21 0x28 0x7d 0x22 0x7d 0x26 0x7d 0x20 0x7d
>     Mar 15 18:31:23 eea218 kernel:    0x20 0x7d 0x20 0x7d 0x20 0x7d
>     0x25 0x7d 0x26 0x9d 0x2a 0xd5 0xfe 0x7d 0x27 0x7d
>     Mar 15 18:31:23 eea218 kernel:    0x22 0x7d 0x28 0x7d 0x22 0xeb
>     0xc6 0x7e
>     Mar 15 18:31:23 eea218 kernel:
>      
>      
>      
>     
>      > [root@xxxxxxx./btd -R -s 57600 -e 0 -m
>     Bluetooth Control Application
>     -----------------------------
>     Please reset HW board within 5 seconds
>     Running as server
>     Physdev /dev/ttyS0, btdev /dev/ttyBT0, speed 57600 baud
>     Registered bluetooth line discipline on /dev/ttyS0
>     Init stack
>     Setting write_scan_enable in Ericsson module!
>     Setting baudrate in Ericsson module!
>     Now entering cmd line mode
>     
>     Menu
>     ------------------------
>       inq (inquiry scan)
>       rf_conn <xx:xx:xx:xx:xx:xx> <srv ch> <line>
>       rf_send <nbr bytes> <nbr repeats> <line>
>       rf_disc <line>
>       rf_wait <line>
>       me <1/0>
>       setbd <xx:xx:xx:xx:xx:xx>
>       readbd
>       reset
>       ppp
>       quit
>      > inq
>     BD 0: 00:d0:b7:03:31:51
>      > rf_conn 00:d0:b7:03:31:51 1 0
>     Connected.
>      
>     
>     david LIBAULT wrote:
>     
>>     Le Mercredi 14 Mars 2001 08:43, vous avez écrit :
>>     
>>      > > Hi David,
>>      >       i knew you could set up PPP connection by changing the
>>     bt_ioctl in
>>      > bluetooth.c. you changed the default case to return
>>     -ENOIOCTLCMD. I
>>      > followed what you did and tried to set up ppp connections, but
>>     failed. i am
>>      > now using stack version 20010108, with redhat 6.2 and kernel
>>     2.2.14. i
>>      > attached with the debug messages. what should i do in order to
>>     set up ppp
>>      > connection?
>>     
>>     Mar 14 13:54:17 localhost pppd[1600]: Device ttyBT0 is locked by
>>     pid 1020
>>     
>>     It looks like pppd can't open ttyBT0 as it is used by a different
>>     process
>>     (with pid 1020). Check what process it is locked by by typing
>>     ps... which
>>     looks like a different problem...
>>     
>>     Please post this kind of message directly to the
>>     bluetooth-dev@xxxxxxx.com
>>     mailling list.
>>     
>>     David.
>>     
>>     ----------------------------------------
>>     Content-Type: application/octet-stream; charset="iso-8859-1";
>>     name="Pièces
>>     jointes : 1"
>>     Content-Transfer-Encoding: base64
>>     Content-Description:
>>     ----------------------------------------
>>     
Please get current cvs and try to use BluetoothPN.  I'm not sure what 
openbt (0.0.1) contains.

Marcus


-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com