6

Hello there guys i have been trying to use hcitool on mac os terminal but whenever i type hcitool scan the following error is appeared -bash: hcitool: command not found i have tried pip install hci and pip install hcitool but the following error is shown

  ERROR: Could not find a version that satisfies the requirement gatttool (from versions: none)

ERROR: No matching distribution found for gatttool

please help me with this

Tanay Kumar
  • 81
  • 1
  • 2
  • 7

2 Answers2

5

Commands such as hcitool, gatttool, hciconfig, etc. are part of the BlueZ package which works on Linux only. MacOS on the other hand is UNIX-core and therefore the commands will not run on a MacOS operating system. There have been hacks before to get some sort of functionality on MacOS OSs but the solution is always incomplete.

Your next best bet will be to use a Virtual Machine running a Linux guest (e.g. Ubuntu) and then use the BlueZ commands from within that VM OS.

I hope this helps.

Youssif Saeed
  • 11,789
  • 4
  • 44
  • 72
0

Get yourself a Docker container up and running. You can write scripts that you keep in a shared volume between the host and the container (meaning you don't have to log into the container). You can then execute those scripts from your OSX terminal, to run in the container.

HTH

Paul Allsopp
  • 622
  • 1
  • 9
  • 23