Skip to contentSkip to conversation

Unknown answer

Bluez-devel zubiwat 2 participants 3 messages Mar 28, 2004 1 message not in the archive Bluetooth drivers

lore
Share & tools
lore

zubiwat

author
#0 lore raw

Hi
I'm sending these commands :

0x01 0x05  0x10  0x00
0x01 0x09  0x10  0x00

and I don't understand why I get answer like this:

04 FF 13 C2 01 00 09 00 02 00 02 68 00 00 BF 0E 00 00 00 00 00 00 04 0E 0B 01 05 10 00 C0 00 40 08 00 08 00 04 0E 0A 01 09 10 00 04 00 20 DD 09 00

Why when I'm trying to read buffer size (0x01 0x05 0x10 0x00) and read BT ADDR (0x01 0x09 0x10 0x00) I get so many events? It's strange because when I'm trying to read, device answers that it can't for example connect because of connection rejected due to security reasons (04 0E 0B 01 05 10 00 C0 00 40 08 00 08 00 ) or am I wrong?

Regards

Maciej Zubilewicz

maintainer
#1 lore raw

Hi Maciej,

your questions are annoying me and this will be the last one I answer. Please stop posting non BlueZ related things to our mailing lists, because otherwise I have to ban you.

Quoted 9 lines

I'm sending these commands :

0x01 0x05  0x10  0x00
0x01 0x09  0x10  0x00

and I don't understand why I get answer like this:

04 FF 13 C2 01 00 09 00 02 00 02 68 00 00 BF 0E 00 00 00 00 00 00 04 0E 0B 01 05 10 00 C0 00 40 08 00 08 00 04 0E 0A 01 09 10 00 04 00 20 DD 09 00

You should have taken my advise and sit down and decode your results, because then you had seen the answers.

04 FF 13 C2 01 00 09 00 02 00 02 68 00 00 BF 0E 00 00 00 00 00 00

This is a vendor specific event. Ask your module manufacturer.

04 0E 0B 01 05 10 00 C0 00 40 08 00 08 00

And this is the result of the reading the buffer size.

04 0E 0A 01 09 10 00 04 00 20 DD 09 00

And here we have your local BD_ADDR, which is 00:09:dd:20:00:04

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

A message that is not in the archive (sent off-list or not yet received): 001101c414a2$2d426540$fcca010a@lysydziadek

maintainer
#3 lore raw

Hi Maciej,

Quoted 4 lines

Please this is the last - really. How do you decode this because 0e after 04 means an error. After 04 shouldn't be 00 as a command succeeded. How do you look into specification to find out the answer?
I swear it's the last question, because it will solve my problems.

actually your problem is reading the HCI specification. It is all there and the HCI part is one of the easier parts of Bluetooth.

So do it step by step and take this as an example

	04 0E 0A 01 09 10 00 04 00 20 DD 09 00


	04 = H:4 specific and means this is a HCI event

	0E 0A = HCI event header

		struct hci_event_hdr {
	        	uint8_t         event;
		        uint8_t         plen;
		} __attribute__ ((packed));

		0E = HCI command complete event
		0A = Event len (= 10 bytes)

	01 09 10 = HCI command complete event

		struct hci_command_complete_evt {
		        uint8_t         ncmd;
		        uint16_t        opcode;
		        /* variable length part */
		        uint8_t         param[0];
		} __attribute__ ((packed));

		01 = Number of command packets (HCI flow control)
		09 10 = Command opcode (OCF & OGF)

	00 04 00 20 DD 09 00 = HCI read BD_ADDR response

		struct hci_read_bd_addr_rp {
		        uint8_t         status;
		        bdaddr_t        bdaddr;
		} __attribute__ ((packed));

		00 = Status (= OK)
		04 00 20 DD 09 00 = BD_ADDR

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel