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

[bluetooth-dev] How to use "bnep --test" ?



Hello Fredrik,

  My 2 bluetooth devices can make RFCOMM connection successfully,and I see the
  logfile found it said that bnep channel is opened when I "bnep -c
  [BD-Address]".
  But I also cannot ping another PC successfully(I had add the route
  table).
  
  can you tell me how to use another option of bneo.c
  "bnep --test xx-xx-xx-xx-xx"? what's the meaning of
  "xx-xx-xx-xx-xx"?
  Also I found when I "ping another PC with bnep",the log has nothing
  added,it seemed that no data package is pass through the bnep0
  device.

  Another question is does bnep need kernel support "hot-plug device"?

  below is my logfile
  what I do is
  "
  insmod bt.o;
  ifconfig bnep0 192.9.100.1
  -->
  bnep0     Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          inet addr:192.9.100.1  Bcast:192.9.100.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1397772884 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          DMA chan:1 
  
  btdm&;
  btinq -n 20 -t 15;
  btcon -d /dev/ttyBT -p 1234 -a xx:xx:xx:xx:xx:xx -S 2;(successfully)
  btdisc -D 0 (successfully)
  bnep -c xx:xx:xx:xx:xx:xx
  "
  Then I ping another IP address(192.9.100.2)....

  below is my logfile

Mar  8 13:46:16 darkstar kernel: Bluetooth Driver v1.3, Copyright (c) 2000, 2001 Axis Communications AB
Mar  8 13:46:16 darkstar kernel: devfs: devfs_register(): device already registered: "ttyBT"
Mar  8 13:46:16 darkstar last message repeated 6 times
Mar  8 13:46:16 darkstar kernel: BT SYS: Bluetooth driver registered as ttyBT
Mar  8 13:46:16 darkstar kernel: BT SYS: Bluetooth line discipline registered.
Mar  8 13:46:16 darkstar kernel: BT (driver) Initialising bt ctrl struct
Mar  8 13:46:16 darkstar kernel: BT SYS: Registering BT proc files
Mar  8 13:46:16 darkstar kernel: Proc entry registered
Mar  8 13:46:16 darkstar kernel: BT SYS: Bluetooth Driver Using ttyBT[0-6] (data), ttyBTC (ctrl [7])
Mar  8 13:46:16 darkstar kernel: BNEP driver v0.1 (c) 2002 Axis Communications AB
Mar  8 13:46:16 darkstar kernel: bnep0 initialized
Mar  8 13:46:16 darkstar kernel: bnep1 initialized
Mar  8 13:46:16 darkstar kernel: bnep2 initialized
Mar  8 13:46:16 darkstar kernel: bnep3 initialized
Mar  8 13:46:16 darkstar kernel: bnep4 initialized
Mar  8 13:46:16 darkstar kernel: bnep5 initialized
Mar  8 13:46:16 darkstar kernel: bnep6 initialized
Mar  8 13:46:56 darkstar btdm: Bluetooth daemon starting
Mar  8 13:46:56 darkstar kernel: BT (driver) bt_open: Line 7
Mar  8 13:46:56 darkstar kernel: BT (driver) Registering tty on line 7 (btdm)
Mar  8 13:46:56 darkstar kernel: BT (driver) Now 1 open fd:s for ttyBTC [btdm]
Mar  8 13:46:56 darkstar kernel: BT (driver) bt_open: Line 7
Mar  8 13:46:56 darkstar kernel: BT (driver) Registering tty on line 7 (btdm)
Mar  8 13:46:56 darkstar kernel: BT (driver) Now 2 open fd:s for ttyBTC [btdm]
Mar  8 13:46:56 darkstar kernel: BT (driver) bt_close: Line 7
Mar  8 13:46:56 darkstar kernel: BT (driver) Unregistering tty on line 7
Mar  8 13:46:56 darkstar kernel: BT (driver) bt_open: Line 7
Mar  8 13:46:56 darkstar kernel: BT (driver) Registering tty on line 7 (btdm)
Mar  8 13:46:56 darkstar kernel: BT (driver) Now 2 open fd:s for ttyBTC [btdm]
Mar  8 13:46:56 darkstar kernel: BT (driver) BTSETBCSPMODE: -1
Mar  8 13:46:56 darkstar kernel: BT (driver) bt_close: Line 7
Mar  8 13:46:56 darkstar kernel: BT (driver) Unregistering tty on line 7
Mar  8 13:46:56 darkstar kernel: BT (ldisc) bt_tty_open
Mar  8 13:46:56 darkstar kernel: BT SYS: Setting BT driver to use serial tty
Mar  8 13:46:56 darkstar kernel: BT SYS: Setting btdm_pid (125)
Mar  8 13:46:56 darkstar kernel: BT (ldisc) bt_tty_ioctl: Forwarding ioctl 0x540b to n_tty line disc
Mar  8 13:46:56 darkstar btdm: Registered bluetooth line discipline on /dev/ttyS0
Mar  8 13:46:56 darkstar btdm: Init stack
Mar  8 13:46:56 darkstar kernel: BT SYS: Initialising Bluetooth Stack
Mar  8 13:46:56 darkstar kernel: BT SYS: Current HW: CSR
Mar  8 13:46:56 darkstar kernel: BT SYS: Initialising BTMEM [2500 bytes]
Mar  8 13:46:56 darkstar kernel: BT SYS: Initialising HCI
Mar  8 13:46:56 darkstar kernel: BT SYS: HCI emulator off
Mar  8 13:46:56 darkstar kernel: BT SYS: Initialising HCI inbuffers [800]
Mar  8 13:46:56 darkstar kernel: BT SYS: Reading buffer sizes in HW module
Mar  8 13:46:56 darkstar kernel: 
Mar  8 13:46:56 darkstar kernel: HW module contains...
Mar  8 13:46:56 darkstar kernel: 8 ACL buffers at 192 bytes
Mar  8 13:46:56 darkstar kernel: 8 SCO buffers at 64 bytes
Mar  8 13:46:56 darkstar kernel: 
Mar  8 13:46:56 darkstar kernel: BT SYS: Reading firmware info in HW module
Mar  8 13:46:56 darkstar sdp_server: SDP Server starting
Mar  8 13:46:56 darkstar kernel: BT SYS: Host flow control not enabled
Mar  8 13:46:56 darkstar kernel: BT SYS: M/S switch enabled
Mar  8 13:46:56 darkstar kernel: BT SYS: Force M/S switch set to 1
Mar  8 13:46:56 darkstar kernel: BT SYS: Initialising L2CAP
Mar  8 13:46:56 darkstar kernel: BT SYS: Local bd [00:02:5b:ff:ca:03]
Mar  8 13:46:56 darkstar kernel: BT SYS: Initialising RFCOMM
Mar  8 13:46:56 darkstar kernel: BT SYS: Initialising SDP
Mar  8 13:46:56 darkstar kernel: BT SYS: Init SDP as server
Mar  8 13:46:56 darkstar kernel: BT SYS: Initialising TCS
Mar  8 13:46:56 darkstar kernel: BT SYS: Initializing BNEP
Mar  8 13:46:56 darkstar kernel: BT SYS: Initialising TEST
Mar  8 13:46:56 darkstar kernel: BT (driver) BT_SET_DFU_MODE: -1
Mar  8 13:46:56 darkstar kernel: BT (driver) __bt_ioctl: HCIWRITECLASSOFDEVICE
Mar  8 13:46:56 darkstar btdm: bt_set_classofdevice : srv class 0x10, maj class 0x3, min class 0x0, format 0x0
Mar  8 13:46:56 darkstar btdm: bt_set_local_name: AXIS (darkstar.flora)
Mar  8 13:46:56 darkstar kernel: BT (driver) __bt_ioctl: HCISETLOCALNAME
Mar  8 13:46:57 darkstar kernel: BT (driver) BTSETBCSPMODE: -1
Mar  8 13:46:57 darkstar kernel: BT (driver) Setting write scan enable: [0x3]
Mar  8 13:46:57 darkstar btdm: Setting write_scan_enable: 0x3
Mar  8 13:46:57 darkstar btdm: Setting write_pagescan_activity: int:0x800 wind:0x12
Mar  8 13:46:57 darkstar kernel: BT (driver) Setting write page scan activity: [0x800,0x12]
Mar  8 13:46:57 darkstar btdm: Setting event filter
Mar  8 13:46:57 darkstar kernel: BT (driver) __bt_ioctl: HCISET_EVENT_FILTER
Mar  8 13:46:57 darkstar kernel: BT (driver) __bt_ioctl: HCISET_EVENT_FILTER
Mar  8 13:46:58 darkstar kernel: BT (driver) bt_open: Line 7
Mar  8 13:46:58 darkstar kernel: BT (driver) Registering tty on line 7 (btdm)
Mar  8 13:46:58 darkstar kernel: BT (driver) Now 2 open fd:s for ttyBTC [btdm]
Mar  8 13:46:58 darkstar kernel: BT (driver) __bt_ioctl: BTFIRMWAREINFO
Mar  8 13:46:58 darkstar kernel: BT (driver) bt_close: Line 7
Mar  8 13:46:58 darkstar kernel: BT (driver) Unregistering tty on line 7
Mar  8 13:46:58 darkstar kernel: BT (driver) __bt_ioctl: Setting baudrate in host controller to 115200
Mar  8 13:46:58 darkstar kernel: BT (ldisc) bt_tty_ioctl: Forwarding ioctl 0x5401 to n_tty line disc
Mar  8 13:46:58 darkstar kernel: BT (driver) bt_open: Line 7
Mar  8 13:46:58 darkstar kernel: BT (driver) Registering tty on line 7 (btdm)
Mar  8 13:46:58 darkstar kernel: BT (driver) Now 2 open fd:s for ttyBTC [btdm]
Mar  8 13:46:58 darkstar kernel: BT (driver) BTSETBCSPMODE: -1
Mar  8 13:46:58 darkstar kernel: BT (driver) bt_close: Line 7
Mar  8 13:46:58 darkstar kernel: BT (driver) Unregistering tty on line 7
Mar  8 13:46:58 darkstar kernel: BT (ldisc) bt_tty_ioctl: Forwarding ioctl 0x5402 to n_tty line disc
Mar  8 13:46:58 darkstar kernel: BT (ldisc) bt_tty_ioctl: Forwarding ioctl 0x5401 to n_tty line disc
Mar  8 13:46:57 darkstar btdm: Setting event filter
Mar  8 13:46:58 darkstar btdm: bt_set_baudrate: 115200 baud
Mar  8 13:46:58 darkstar kernel: BT (ldisc) bt_tty_ioctl: Forwarding ioctl 0x540b to n_tty line disc
Mar  8 13:47:02 darkstar login[105]: ROOT LOGIN on `tty2' 
Mar  8 13:47:35 darkstar kernel: BT (driver) bt_open: Line 7
Mar  8 13:47:35 darkstar kernel: BT (driver) Registering tty on line 7 (btinq)
Mar  8 13:47:35 darkstar kernel: BT (driver) Now 2 open fd:s for ttyBTC [btinq]
Mar  8 13:47:35 darkstar kernel: BT (driver) __bt_ioctl: HCINQUIRY
Mar  8 13:47:35 darkstar kernel: 
Mar  8 13:47:35 darkstar kernel: hci_inquiry (9):
Mar  8 13:47:35 darkstar kernel: 0x01 0x01 0x04 0x05 0x33 0x8b 0x9e 0x0f 0x14 
Mar  8 13:47:39 darkstar kernel: BD addr 1
Mar  8 13:47:39 darkstar kernel: 
Mar  8 13:47:39 darkstar kernel: BD (6):
Mar  8 13:47:39 darkstar kernel: 0x00 0x02 0x5b 0xff 0x00 0xc2 
Mar  8 13:47:55 darkstar kernel: BT (driver) bt_close: Line 7
Mar  8 13:47:55 darkstar kernel: BT (driver) Unregistering tty on line 7
Mar  8 13:48:48 darkstar kernel: BT (driver) bt_open: Line 7
Mar  8 13:48:48 darkstar kernel: BT (driver) Registering tty on line 7 (btcon)
Mar  8 13:48:48 darkstar kernel: BT (driver) Now 2 open fd:s for ttyBTC [btcon]
Mar  8 13:48:48 darkstar kernel: BT (driver) __bt_ioctl: BTCONNECT
Mar  8 13:48:48 darkstar kernel: BT (driver) bt_connect: Connecting srv ch 2 on line 0
Mar  8 13:48:48 darkstar kernel: 
Mar  8 13:48:48 darkstar kernel: bd (6):
Mar  8 13:48:48 darkstar kernel: 0xc2 0x00 0xff 0x5b 0x02 0x00 
Mar  8 13:48:48 darkstar kernel: l2ca_connect_req: wait baseband, sleep on wq 0xc7b8273c
Mar  8 13:48:49 darkstar kernel: BT SYS: process_event: ROLE_CHANGED
Mar  8 13:48:49 darkstar kernel: BT SYS: process_event: Current master is 0x00025bff00c2
Mar  8 13:48:49 darkstar kernel: lp_connect_cfm (pos), wake up wq 0xc7b8273c
Mar  8 13:48:49 darkstar kernel: BT SYS: process_event: ACL link is up
Mar  8 13:48:49 darkstar kernel: l2ca_connect_req: wait baseband, woke up !
Mar  8 13:48:49 darkstar kernel: l2ca_connect_req: wait rsp, sleep on wq 0xc7b8273c
Mar  8 13:48:49 darkstar kernel: l2cap con rsp, wake up wq 0xc7b8273c
Mar  8 13:48:49 darkstar kernel: 
Mar  8 13:48:49 darkstar kernel: l2cap options:  (0):
Mar  8 13:48:49 darkstar kernel: l2ca_connect_req: wait rsp, woke up !
Mar  8 13:48:49 darkstar kernel: BT SYS: rfcomm_config_cfm: : configuration not done yet
Mar  8 13:48:49 darkstar kernel: BT SYS: l2cap channel (64,66) [RFCOMM] connected
Mar  8 13:48:49 darkstar kernel: BT SYS: rfcomm_config_cfm: l2cap is now open
Mar  8 13:48:49 darkstar kernel: BT SYS: rfcomm_config_ind: already ready with config req
Mar  8 13:48:49 darkstar kernel: BT SYS: bt_register_rfcomm: dlci 4 on line 0
Mar  8 13:48:49 darkstar kernel: BT (driver) bt_connect_cfm: Line 0 [RCOMM]
Mar  8 13:48:49 darkstar kernel: BT (driver) __bt_ioctl: BTREADREMOTEBDADDR
Mar  8 13:48:49 darkstar kernel: BT SYS: get_remote_bd: 00:02:5b:ff:00:c2
Mar  8 13:48:49 darkstar kernel: BT (driver) bt_close: Line 7
Mar  8 13:48:49 darkstar kernel: BT (driver) Unregistering tty on line 7
Mar  8 13:48:49 darkstar btdm: Found connection on line: 0
Mar  8 13:48:49 darkstar btdm: Started modem emulator on /dev/ttyBT0 [pid: 141]
Mar  8 13:48:49 darkstar kernel: BT (driver) bt_open: Line 7
Mar  8 13:48:49 darkstar kernel: BT (driver) Registering tty on line 7 (memul)
Mar  8 13:48:49 darkstar kernel: BT (driver) Now 2 open fd:s for ttyBTC [memul]
Mar  8 13:48:49 darkstar kernel: BT (driver) bt_close: Line 7
Mar  8 13:48:49 darkstar kernel: BT (driver) Unregistering tty on line 7
Mar  8 13:48:49 darkstar kernel: BT (driver) bt_open: Line 0
Mar  8 13:48:49 darkstar kernel: BT (driver) Registering tty on line 0 (memul)
Mar  8 13:48:49 darkstar kernel: BT (driver) bt_open: Line 7
Mar  8 13:48:49 darkstar kernel: BT (driver) Registering tty on line 7 (memul)
Mar  8 13:48:49 darkstar kernel: BT (driver) Now 2 open fd:s for ttyBTC [memul]
Mar  8 13:48:49 darkstar kernel: BT (driver) BTSETBCSPMODE: -1
Mar  8 13:48:49 darkstar kernel: BT (driver) bt_close: Line 7
Mar  8 13:48:49 darkstar kernel: BT (driver) Unregistering tty on line 7
Mar  8 13:48:49 darkstar kernel: BT (driver) bt_set_termios: Forwarding to serial driver
Mar  8 13:48:49 darkstar kernel: BT (driver) bt_chars_in_buffer: 0
Mar  8 13:48:49 darkstar memul: Starting modem emulator on /dev/ttyBT0
Mar  8 13:48:56 darkstar kernel: BT (driver) bt_open: Line 7
Mar  8 13:48:56 darkstar kernel: BT (driver) Registering tty on line 7 (btdisc)
Mar  8 13:48:56 darkstar kernel: BT (driver) Now 2 open fd:s for ttyBTC [btdisc]
Mar  8 13:48:56 darkstar kernel: BT (driver) __bt_ioctl: BTDISCONNECT
Mar  8 13:48:56 darkstar kernel: BT (driver) bt_disconnect: Disconnecting line 0 (ONLY RFCOMM)
Mar  8 13:48:56 darkstar kernel: BT (driver) bt_chars_in_buffer: 0
Mar  8 13:48:56 darkstar kernel: BT (driver) bt_chars_in_buffer: 0
Mar  8 13:48:56 darkstar kernel: BT SYS: rfcomm_receive_data: RFCOMM disconnected ctrl ch (local) on line [0]
Mar  8 13:48:56 darkstar kernel: l2ca_disconnect_req, sleep on wq 0xc7b8273c
Mar  8 13:48:56 darkstar kernel: BT (driver) bt_chars_in_buffer: 0
Mar  8 13:48:56 darkstar kernel: BT (driver) bt_disconnect_ind: RFCOMM dlci: 0
Mar  8 13:48:56 darkstar kernel: BT (driver) bt_unregister_rfcomm: Line 0
Mar  8 13:48:56 darkstar kernel: BT (driver) Upper tty still open...
Mar  8 13:48:56 darkstar kernel: BT (driver) bt_hangupline: Hanging up line 0
Mar  8 13:48:56 darkstar kernel: BT (driver) bt_disconnect_cfm: PSM 3, status 0
Mar  8 13:48:56 darkstar kernel: BT SYS: l2cap channel (64,66) [RFCOMM] disconnected
Mar  8 13:48:56 darkstar kernel: l2cap disc rsp, wake up wq 0xc7b8273c
Mar  8 13:48:56 darkstar kernel: BT (driver) bt_flush_buffer: Ignored
Mar  8 13:48:56 darkstar kernel: BT (driver) bt_hangup: Line 0 (nothing done) pid 2 (keventd)
Mar  8 13:48:56 darkstar kernel: BT (driver) bt_close: Line 0
Mar  8 13:48:56 darkstar kernel: BT (driver) Unregistering tty on line 0
Mar  8 13:48:56 darkstar kernel: l2ca_disconnect_req, woke up !
Mar  8 13:48:56 darkstar kernel: BT SYS: l2ca_disconnect_req : (C) no more l2cap cons
Mar  8 13:48:56 darkstar kernel: BT SYS: Shutdown baseband
Mar  8 13:48:56 darkstar kernel: BT (driver) bt_close: Line 7
Mar  8 13:48:56 darkstar kernel: BT (driver) Unregistering tty on line 7
Mar  8 13:48:56 darkstar kernel: BT SYS: process_event: DISCONNECTION_COMPLETE Connection Terminated by Local Host
Mar  8 13:48:56 darkstar kernel: BT SYS: lp_disconnect_ind: Connection handle 40 disconnected
Mar  8 13:49:16 darkstar kernel: BT (driver) bt_open: Line 7
Mar  8 13:49:16 darkstar kernel: BT (driver) Registering tty on line 7 (bnep)
Mar  8 13:49:16 darkstar kernel: BT (driver) Now 2 open fd:s for ttyBTC [bnep]
Mar  8 13:49:16 darkstar kernel: BT (driver) bt_flush_buffer: Ignored
Mar  8 13:49:16 darkstar kernel: BT (driver) bt_close: Line 7
Mar  8 13:49:16 darkstar kernel: BT (driver) Unregistering tty on line 7
Mar  8 13:49:22 darkstar kernel: BT (driver) bt_open: Line 7
Mar  8 13:49:22 darkstar kernel: BT (driver) Registering tty on line 7 (bnep)
Mar  8 13:49:22 darkstar kernel: BT (driver) Now 2 open fd:s for ttyBTC [bnep]
Mar  8 13:49:22 darkstar kernel: BT (driver) bt_flush_buffer: Ignored
Mar  8 13:49:22 darkstar kernel: BT (driver) BNEP connection to 00:02:5b:ff:00:c2
Mar  8 13:49:22 darkstar kernel: BT SYS: BNEP: Connect request 00:02:5b:ff:00:c2
Mar  8 13:49:22 darkstar kernel: 
Mar  8 13:49:22 darkstar kernel: bd (6):
Mar  8 13:49:22 darkstar kernel: 0xc2 0x00 0xff 0x5b 0x02 0x00 
Mar  8 13:49:22 darkstar kernel: l2ca_connect_req: wait baseband, sleep on wq 0xc7b82a3c
Mar  8 13:49:23 darkstar kernel: BT SYS: process_event: ROLE_CHANGED
Mar  8 13:49:23 darkstar kernel: BT SYS: process_event: Current master is 0x00025bff00c2
Mar  8 13:49:23 darkstar kernel: lp_connect_cfm (pos), wake up wq 0xc7b82a3c
Mar  8 13:49:23 darkstar kernel: BT SYS: process_event: ACL link is up
Mar  8 13:49:23 darkstar kernel: l2ca_connect_req: wait baseband, woke up !
Mar  8 13:49:23 darkstar kernel: l2ca_connect_req: wait rsp, sleep on wq 0xc7b82a3c
Mar  8 13:49:23 darkstar kernel: l2cap con rsp, wake up wq 0xc7b82a3c
Mar  8 13:49:23 darkstar kernel: bnep_connect_cfm: Connection index 0, Interface bnep0
Mar  8 13:49:23 darkstar kernel: BT SYS: Setting local mtu to 1691
Mar  8 13:49:23 darkstar kernel: BT SYS: Sending in_mtu 1691
Mar  8 13:49:23 darkstar kernel: 
Mar  8 13:49:23 darkstar kernel: l2cap options:  (4):
Mar  8 13:49:23 darkstar kernel: 0x01 0x02 0x9b 0x06 
Mar  8 13:49:23 darkstar kernel: l2ca_connect_req: wait rsp, woke up !
Mar  8 13:49:23 darkstar kernel: BT (driver) bt_close: Line 7
Mar  8 13:49:23 darkstar kernel: BT (driver) Unregistering tty on line 7
Mar  8 13:49:24 darkstar kernel: BT SYS: bnep_config_cfm: not done with configuration yet
Mar  8 13:49:24 darkstar kernel: BT SYS: Setting remote mtu (65:67) to 1691 bytes
Mar  8 13:49:24 darkstar kernel: BT SYS: l2cap channel (65,67) [BNEP] connected
Mar  8 13:49:24 darkstar kernel: BT SYS: bnep_config_cfm: bnep channel opened
Mar  8 13:49:24 darkstar kernel: BT SYS: bnep_config_ind: already ready with config req




-- 
Best regards,
 nasm64                            mailto:nasm64@xxxxxxx.com


_________________________________________________________
Do You Yahoo!?
Get your free @xxxxxxx.com">http://mail.yahoo.com

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