Low-Level BLE Sniffing

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
User avatar
silvia
Posts: 2
Joined: Sun May 03, 2020 2:44 pm

Low-Level BLE Sniffing

Post by silvia » Wed May 06, 2020 2:48 pm

What is the best approach to listening to non-connectable, undirected BLE advertisements?

On a raspberry pi 3 I have used a combination of bluetoothctl and btmon to get a low-level view of advertisements coming through. Does this functionality exist for micropython?



(keywords: 0x03 - ADV_NONCONN_IND - non-connectable undirected advertising)

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Low-Level BLE Sniffing

Post by jimmo » Thu May 07, 2020 2:53 am

silvia wrote:
Wed May 06, 2020 2:48 pm
What is the best approach to listening to non-connectable, undirected BLE advertisements?
Do you see them in a scan? I would have thought you would (as adv_type = 3). (If you see them in bluetoothctl then you should see them from MicroPython).

http://docs.micropython.org/en/latest/l ... E.gap_scan

This works on PYBD and ESP32 currently. nRF in progress.

robertwatts
Posts: 1
Joined: Wed May 20, 2020 2:07 am
Contact:

Re: Low-Level BLE Sniffing

Post by robertwatts » Wed May 20, 2020 3:03 am

jimmo wrote:
Thu May 07, 2020 2:53 am
silvia wrote:
Wed May 06, 2020 2:48 pm
What is the best approach to listening to non-connectable, undirected BLE advertisements?
Do you see them in a scan? I would have thought you would (as adv_type = 3). (If you see them in bluetoothctl then you should see them from MicroPython).

http://docs.micropython.org/en/latest/l ... E.gap_scan

This works on PYBD and ESP32 currently. nRF in progress.
Thank you so much! Lot for me to read to start learning.

Post Reply