Hcitool not working

Hi guys
Can someone tell me what im doing wrong.
Im connected to hassio using putty and $ sudo hcitool lescan is not woking.
Im trying seach for a MAC address on a Mi temp unit.
Thanks

core-ssh:~# $ sudo hcitool lescan
-bash: $: command not found
core-ssh:~#


sensor:
  - platform: mitemp_bt
    mac: 'xx:xx:xx:xx:xx:xx'
    name: Kitchen
    force_update: true
    median: 1 
    monitored_conditions:
      - temperature
      - humidity
      - battery

As per the docs, try the following command:

bluetoothctl

2 Likes

Thanks
just the same command not found
it is a raspi4 i wonder if that makes a difference.

Hmm not so familiar with hass.io.

Did you try this suggestion from the docs:

If you can’t use hcitool or bluetoothctl but have access to an Android phone you can try BLE Scanner or similar scanner applications from the Play Store to easily find your sensor MAC address. If you are using Windows 10, try the Microsoft Bluetooth LE Explorer app from the Windows Store.

1 Like

Thank you
Ive download some ios BLE scanners but there not showing the MAC only the UUID
ill try a laptop
Thanks Again

you shouldn’t type the $ symbol.
correct command would be:
sudo hcitool lescan

1 Like

just found this

iOS hides the MAC address of the device and generates a UUID. The UUID on iOS is generated by the iOS device. Different iOS devices will get different UUIDs for the same peripheral. The MAC address is usually based on the hardware. If we both have iPhones and scan the same peripheral, we’ll see different UUIDs. iOS generates the UUID on the device and hides the MAC address. Summary - iOS doesn’t let you get the MAC address of a device, it gives you a random UUID instead.

Source - Is it possible to get the device MAC address on iOS? · Issue #77 · don/cordova-plugin-ble-central · GitHub

As per above study I’ve found that there’s not such a unique way to get connect to the board so far, Every board has a MAC address, which Doesn’t changes and easy to access in (only) Android, while iOS doesn’t allow to access MAC Address of the peripheral, however iOS use this MAC address to create a peripheral identifier (UUID), which is unique on (unique) device only. The peripheral identifier for a single Board is different for different iPhones devices (but unique on single device).

However we can connect to a board by searching with Peripheral’s Bluetooth Service UUID, but this service UUID is same for all the boards of a kind say- “Adafruit Feather M0”. It means the App will look around the BLE boards of the same type (“Adafruit Feather M0”) and will get connect to ANY one of them. In order to connect to a particular user to a specific Board doesn’t seems to be possible so far due to the inaccessibility of MAC and giving the random UUID in iOS.

Wow thanks Mate

I think you misunderstood this. This problem is ONLY if you want to find the MAC address of an IOS device.

Wow, nice catch!