portapack-mayhem / mayhem-firmware

Custom firmware for the HackRF+PortaPack H1/H2
GNU General Public License v3.0
3.23k stars 530 forks source link

BLE RX - add MAC address filtering option #1623

Open NotherNgineer opened 9 months ago

NotherNgineer commented 9 months ago

I tried entering a simple hex value for the "Filter" in the BLE RX app, such as "5" or "50".

I was expecting to be able to filter by MAC address, but the existing filter is looking for bytes in the whole unprocessed data packet, causing entries to pop up on the screen and quickly disappear the next time a packet is received from the same device.

Because the filter is looking at the raw packet data, devices are disappearing from (or never appearing on) the list even when their MAC address contains the string entered.

I propose to change the "filter" definition (and update the Wiki) so that the filter only looks at the MAC address and the device name strings, versus looking at the entire unprocessed packet.

NotherNgineer commented 9 months ago

Seems that the searching for nibbles in the raw packet data is useful after all, so filtering by MAC address would need to be a new filter option. The code in PR #1625 may be usable if it were made conditional and still allowed filtering of raw packet data.

NotherNgineer commented 9 months ago

Perhaps the filter could be enhanced to support special keywords such as "MAC:" to enable searching for digits in a MAC address.