- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to get rssi value from wiced sense.
I am using raspberry pi with a ble dongle. I use bluez and gattool to connect and read data from the sense.
I have a python script reading the sensor data. However I would like to get rssi also. I tried to do hcidump, but rssi doesnt show up on the dump I checked the advertisement packet format and it says the flag for rssi is 0xA ( is rssi same as tx power level here? I am not familiar with physical layer terms).
I used gattool to connect to the sense and dumped the raw data. Can you please tell me which packet has data I can get rssi from?
HCI sniffer - Bluetooth packet analyzer ver 5.30
device: hci0 snap_len: 1500 filter: 0xffffffff
< 01 0D 20 19 60 00 30 00 00 00 A2 19 17 6A 73 20 00 28 00 38
00 00 00 2A 00 00 00 00 00
> 04 0F 04 00 01 0D 20
> 04 3E 13 01 00 48 00 00 00 A2 19 17 6A 73 20 38 00 00 00 2A
00 00
> 02 48 20 10 00 0C 00 05 00 12 01 08 00 40 00 60 00 00 00 F4
01
< 02 48 00 0A 00 06 00 05 00 13 01 02 00 00 00
< 01 13 20 0E 48 00 40 00 60 00 00 00 F4 01 00 00 00 00
> 02 48 20 06 00 02 00 06 00 0B 01
< 02 48 00 06 00 02 00 06 00 05 05
> 04 0F 04 00 01 13 20
> 04 13 05 01 48 00 01 00
> 04 13 05 01 48 00 01 00
> 04 3E 0A 03 00 48 00 60 00 00 00 F4 01
Solved! Go to Solution.
- Tags:
- wiced sense rssi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The TX power is part of ADV Packet and is used in association with the Client Receive Event as shown below
22:37.907 com1 <e LE Event
LE_Event_Code: LE Advertising Report Event
HCI Event
com1@115200nfc
[3E 21]:
02 01 00 00 11 11 11 11 11 01 15 02 01 06 11 07 33 8D C2 86 0C C3 EB B0 E9 40 F4 CB E8 60 B2 F9 A5
event = 0x3E (62, "LE Event")
LE_Event_Code = 0x2 (2, "LE Advertising Report Event")
Num_Reports = 0x1 (1)
Event_Type[0] = 0x0 (0, "Connectable Undirected Event")
Address_Type[0] = 0x0 (0, "Public Address")
Address[0] = "011111111111"
Data_Len[0] = 0x15 (21)
Data[0] = "02 01 06 11 07 33 8D C2 86 0C C3 EB B0 E9 40 F4 CB E8 60 B2 F9"
RSS[0] = -91 (127 means RSSI is not available, Range from -127 to 20 dbm)
The RSSI is based on the Client Receive event which produces the event Report that contains the RSSI value.
Thanks
JT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I haven't been able to work on this part of the project this week.
But I still don't understand how I can call this function from my python script.
I want to know if the adv packets have rssi value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believed JT had given his thoughts on this qn in his posting above. Yes, the adv packets contain RSSI value. Please refer to his suggested reference thread for more details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi boont Thank you for the prompt response.
I read that post.I didn't find this in bluez stack. It is still not clear where I call this function from?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The TX power is part of ADV Packet and is used in association with the Client Receive Event as shown below
22:37.907 com1 <e LE Event
LE_Event_Code: LE Advertising Report Event
HCI Event
com1@115200nfc
[3E 21]:
02 01 00 00 11 11 11 11 11 01 15 02 01 06 11 07 33 8D C2 86 0C C3 EB B0 E9 40 F4 CB E8 60 B2 F9 A5
event = 0x3E (62, "LE Event")
LE_Event_Code = 0x2 (2, "LE Advertising Report Event")
Num_Reports = 0x1 (1)
Event_Type[0] = 0x0 (0, "Connectable Undirected Event")
Address_Type[0] = 0x0 (0, "Public Address")
Address[0] = "011111111111"
Data_Len[0] = 0x15 (21)
Data[0] = "02 01 06 11 07 33 8D C2 86 0C C3 EB B0 E9 40 F4 CB E8 60 B2 F9"
RSS[0] = -91 (127 means RSSI is not available, Range from -127 to 20 dbm)
The RSSI is based on the Client Receive event which produces the event Report that contains the RSSI value.
Thanks
JT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. Finally figured it out.
HCI Event: LE Meta Event (0x3e) plen 42
LE Advertising Report
ADV_IND - Connectable undirected advertising (0)
bdaddr 20:73:6A:17:19:A2 (Public)
Flags: 0x05
Unknown type 0xff with 8 bytes data
Complete local name: 'WICED Sense Kit'
RSSI: -52
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great! Glad to hear it.
JT