X-Git-Url: https://git.rvb.name/openhab-process.git/blobdiff_plain/5b22968fed23a6b2f4438fbe344c52bea5143be7..daa57f38fb9540a14593936b6886d47800abce9c:/mqtt-bt/scan-beacons diff --git a/mqtt-bt/scan-beacons b/mqtt-bt/scan-beacons index 1709e93..b73d674 100644 --- a/mqtt-bt/scan-beacons +++ b/mqtt-bt/scan-beacons @@ -49,7 +49,9 @@ end function mqtt_encode(str) if (str) then str = string.gsub (str, "\n", "") + str = string.gsub (str, ":", "-") str = string.gsub (str, "/", "-") + str = string.gsub (str, " ", "_") end return str end @@ -72,11 +74,12 @@ end function open_dump() - f = assert(io.popen ("hcidump --raw")) - run_command("kill `pgrep hcitool`") - run_command("hciconfig hci0 down") - run_command("hciconfig hci0 up") - f_null = assert(io.popen ("hcitool lescan --duplicates")) + run_command("/bin/kill `/usr/bin/pgrep hcidump`") + run_command("/bin/kill `/usr/bin/pgrep hcitool`") + f = assert(io.popen ("/usr/bin/hcidump --raw")) + run_command("/usr/bin/hciconfig hci0 down") + run_command("/usr/bin/hciconfig hci0 up") + f_null = assert(io.popen ("/usr/bin/hcitool lescan --duplicates")) return f