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

[bluetooth-dev] RE: about the pppd and btd



The traces below are somewhat confusing. If you remove the --cmdmode
argument from the arguments given to btd, it will start immediately in
daemon mode. Then as soon as someone tries to connect using
Bluetooth, it will accept the connection and start pppd automatically.
 
If you stop btd (as you mention somewhere), then the Bluetooth stack
will be shut down, and you cannot use Bluetooth any more.
 
Do you use OpenBT on the client too? In that case you can look in
the README file to see how to do this (preferably the README from
the 0.0.8 release).
 
You should also consider using the tools in apps/bluetoth/experimental,
as they are much more up to date, and support multi-point.
 
//Peter
-----Original Message-----
From: Yang Xiaoyong [mailto:linuxbluetooth@xxxxxxx.com]
Sent: 23 October 2001 04:56
To: Peter Kjellerstedt; bluetooth-dev@xxxxxxx.com
Subject: about the pppd and btd

Hi Peter,

Thanks for your help. I am really clearer about the stack.

However I still could not start the PPP link between Linux boxes after btd starts. Could you please again give me some clue about the following error? Thanks in advance.

the btduser starts, but Icannot start the pppd with ttyBT0 or ttyBT1

1st Method : Kernel Mode

 

[root@localhost bluetooth]# btd --physdev /dev/ttyS0 --speed 9600 --cmdmode --local 192.168.2.22 --remote 192.168.2.28

Bluetooth Control Application

-----------------------------

Running as server

Physdev /dev/ttyS0, btdev /dev/ttyBT0, speed 9600 baud

Registered bluetooth line discipline on /dev/ttyS0

Init stack

Setting write_scan_enable in USB module!

Now entering cmd line mode

Menu

------------------------

inq <Max number of responses> (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

role_switch <xx:xx:xx:xx:xx:xx> <role> (0=master, 1=slave)

ppp

quit

> ppp -detach passive debug noauth 192.168.0.1:192.168.0.2 /dev/ttyS0 9600

Also ppp -detach passive debug noauth 192.168.0.1:192.168.0.2 /dev/ttyBT0 9600

no responce after that

 

Method 2: User mode

[root@xxxxxxx./btduser --physdev /dev/ttyS0 --speed 9600 --cmdmode --local 192.168.2.22 --remote 192.168.2.28

Bluetooth Control Application

-----------------------------

Running as server

Running stack in user mode

Physdev /dev/ttyS0, btdev (not used), speed 9600 baud

sdp_parser.c::SDP Server starting

sdp_parser.c::Opening server socket /tmp/sdp_sock

sdp_parser.c::SDP Server listens...

Init stack

Initiating read thread

BT SYS: Initialising Bluetooth Stack

BT SYS: Initialising HCI

BT SYS: *** HCI emulator on ***

BT SYS: Initialising HCI inbuffers [800]

BT SYS: Reading buffer sizes in HW module

BT SYS: Reading firmware info in HW module

BT SYS: ERROR: hci_read_firmware_rev_info [Generic] not supported.

BT SYS: Host flow control not enabled

BT SYS: M/S switch disabled

BT SYS: Force M/S switch set to 0

BT SYS: Initialising L2CAP

command_handler: Unknown command ogf:0x4,ocf:0x9

BT SYS: ERROR: l2cap_init: Failed to get local BD addr

BT SYS: Initialising RFCOMM

BT SYS: Initialising SDP

BT SYS: Init SDP as server

Opening socket /tmp/sdp_sock

Socket connected to /tmp/sdp_sock

BT SYS: Initialising TCS

BT SYS: Initialising TEST

BT SYS: Initialising BTMEM [2500 bytes]

command_handler: Unknown command ogf:0x3,ocf:0x24

command_handler: Unknown command ogf:0x3,ocf:0x13

command_handler: Unknown command ogf:0x3,ocf:0x1a

Open pty.

Initiating pty thread

Now entering cmd line mode

Menu

------------------------

inq <Max number of responses> (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

role_switch <xx:xx:xx:xx:xx:xx> <role> (0=master, 1=slave)

stat

ppp

quit

--- Test commands ------

sdp_conn <xx:xx:xx:xx:xx:xx> <profile>

tcs_conn <xx:xx:xx:xx:xx:xx>

test_conn <xx:xx:xx:xx:xx:xx> <psm>

test_disc

test_case_reject <xx:xx:xx:xx:xx:xx>

ping <xx:xx:xx:xx:xx:xx>

getinfo <xx:xx:xx:xx:xx:xx> <type>

bb_conn <xx:xx:xx:xx:xx:xx>

bb_disc <hci handle>

 

Meanwhile on the other console run the following command:

 

[root@xxxxxxx.2 /dev/ttyBT0 9600

Failed to open /dev/ttyBT0: Device or resource busy

Because the btd is using the command over on the other console. Then I stoped the btd and run the pppd

 

[root@localhost /root]# pppd -detach passive noauth 192.168.0.1:192.168.0.2 /dev/ttyBT0 9600

using channel 2

Using interface ppp1

Connect: ppp1 <--> /dev/ttyBT0

 

Then it stops there.

Regards,

Xiaoyong