[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bluetooth-dev] Inbuffers and generic mode
Hi all,
I'm using a hardware that is not in the config (TI), so I use the stack in generic mode, communicating with UART.
I'm able to do an inquiry and a connection between two devices. But I've a problem when sending data from the remote device to my hardware.
On the remote device, I use bt_send -d /dev/ttsBT0 -r 50 -s 50.
Note that on local device, I don't use inbuffers, because I got errors when activating inbuffers.
On the local device, I recieve bytes by pairs, I've next logs (... means a log of debug of the same type) :
*****
BT DATA -->|X| 2
hci_receive_data: (2):
0x02 0x01
BT DATA -->|X| 2
hci_receive_data: (2):
0x10 0x00
BT DATA -->|X| 2
hci_receive_data: (2):
0x00 0x02
BT DATA -->|X| 2
hci_receive_data: (2):
0x01 0x10
BT DATA -->|X| 2
hci_receive_data: (2):
0x00 0x00
BT DATA -->|X| 2
.
.
.
hci_receive_data: (2):
0x41 0x42
BT DATA -->|X| 2
hci_receive_data: (2):
0x43 0x44
BT DATA -->|X| 2
hci_receive_data: (2):
0x45 0x46
BT DATA -->|X| 2
hci_receive_data: (2):
0x47 0x48
BT DATA -->|X| 2
.
.
.
hci_receive_data: (2):
0x58 0x59
BT DATA -->|X| 2
hci_receive_data: (2):
0xbf 0x02
BT DATA |X|--> 50 [0]
BT DATA bt_receive_top: (50) line 0 not active yet... silent discard!
*******
---> Then, this complete sequence begin again.
Question : Why do I always recieve byte by pair ? why don't I recieve more bytes at the same time ?
But from time to time, something goes wrong. I've next logs :
*****
hci_receive_data: (2):
0x4d 0x4e
BT DATA -->|X| 2
hci_receive_data: (2):
0x4f 0x50
BT SYS: ERROR: hci_receive_data: discarding 2 bytes
BT DATA -->|X| 2
hci_receive_data: (2):
0x51 0x52
BT SYS: ERROR: hci_receive_data: discarding 2 bytes
BT DATA -->|X| 2
hci_receive_data: (2):
0x53 0x54
BT SYS: ERROR: hci_receive_data: discarding 2 bytes
BT DATA -->|X| 2
hci_receive_data: (2):
0x55 0x56
BT SYS: ERROR: hci_receive_data: discarding 2 bytes
BT DATA -->|X| 2
hci_receive_data: (2):
0x57 0x58
BT SYS: ERROR: hci_receive_data: discarding 2 bytes
BT DATA -->|X| 2
hci_receive_data: (2):
0x59 0xbf
BT SYS: ERROR: hci_receive_data: discarding 2 bytes
BT DATA -->|X| 2
hci_receive_data: (2):
0x02 0x01
BT DATA -->|X| 2
hci_receive_data: (2):
0x10 0x00
BT DATA -->|X| 2
*****
---> Then, the data are recieved correctly again...
And at the end, I have recieved 6 times the message "BT DATA bt_receive_top: (50) line 0 not active yet... silent discard!". I think I should recieve this message 50 times... where are the other bytes ? (of course, the remote device told me that it sent every bytes).
The result of this problem is that some bytes are logs (because of the discarding), and when I try to use ppp on the serial line, the ppp negociation never works (of course because some bytes are lost).
Please is someone can give me some gidelines how to track the problem, what I could do, please tell me !
Best regards.
--
Alain Paschoud SMARTDATA SA
alain.paschoud@xxxxxxx.ch PSE-A
http://www.smartdata.ch 1015 Lausanne
Phone +41-21-693'84'98
Fax +41-27-693'84'91
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com