How to retrieve advertising payload from iBeacon / BLE

前端 未结 3 1064
孤街浪徒
孤街浪徒 2021-01-05 22:32

How do you retrieve the advertising payload for a Bluetooth LE emitter in linux?

Specifically, I\'ve configured arduino\'s and R-PI\'s using hcitool to act as iBeaco

相关标签:
3条回答
  • 2021-01-05 23:25

    At Radius Networks, we put together a set of scripts that parse the iBeacon identifiers out of BLE advertisement detected on Linux. You can find a description of this here.

    If you simply want to see the raw advertisement bytes, you can start scanning on Linux with:

    sudo hcitool lescan --duplicates &
    

    And then see the results with:

    sudo hcidump --raw 
    

    More details are in the answer linked above.

    0 讨论(0)
  • 2021-01-05 23:30
    sudo hcitool lescan --duplicates &
    sudo hcitool spinq
    

    Both commands runs an infinite loop how to run a finite loop and get the data

    0 讨论(0)
  • 2021-01-05 23:32

    Since libpcap-1.0+ now supports Bluetooth capture you can use Wireshark/tshark/tcpdump to capture and display Bluetooth packets - both BTLE and other packet types.

    To capture the LE packets with Wireshark you will still need to tell the Bluetooth interface to query for LE packets, as mentioned in the previous answer:

    sudo hcitool lescan --duplicates &
    

    In addition if you want the adapter to do a periodic query for Bluetooth devices, which are in discoverable mode, you can run (though these queries won't pick up BTLE emissions):

    sudo hcitool spinq
    
    0 讨论(0)
提交回复
热议问题