{"id":1462,"date":"2017-03-03T12:59:28","date_gmt":"2017-03-03T12:59:28","guid":{"rendered":"https:\/\/www.beaconzone.co.uk\/blog\/?p=1462"},"modified":"2023-05-05T08:35:39","modified_gmt":"2023-05-05T08:35:39","slug":"detecting-beacons-on-linux-devices","status":"publish","type":"post","link":"https:\/\/www.beaconzone.co.uk\/blog\/detecting-beacons-on-linux-devices\/","title":{"rendered":"Detecting Beacons on Linux Devices"},"content":{"rendered":"\n<p>Beacons don&#8217;t just work with smartphones. They can work with any other devices that have Bluetoooth LE. This includes Single Board Computers (SBCs) such as the Raspberry Pi 3 and new $10 Pi Zero W that include Bluetooth 4.1.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"564\" height=\"295\" src=\"https:\/\/www.beaconzone.co.uk\/blog\/wp-content\/uploads\/2017\/03\/pizerow.jpg\" alt=\"\" class=\"wp-image-1464\" srcset=\"https:\/\/www.beaconzone.co.uk\/blog\/wp-content\/uploads\/2017\/03\/pizerow.jpg 564w, https:\/\/www.beaconzone.co.uk\/blog\/wp-content\/uploads\/2017\/03\/pizerow-300x157.jpg 300w\" sizes=\"(max-width: 564px) 85vw, 564px\" \/><\/figure><\/div>\n\n\n<p class=\"has-text-align-center\">Pi zero Wireless<\/p>\n\n\n\n<p>If you take a look at our article on <a href=\"https:\/\/www.beaconzone.co.uk\/BeaconImplementationTypes\" target=\"_blank\" rel=\"noopener noreferrer\">Implementation Types<\/a>, the smartphone app or gateway in each scenario could&nbsp;equally be&nbsp;a SBC.<\/p>\n\n\n\n<p>For <a href=\"https:\/\/www.beaconzone.co.uk\/BeaconsForTheInternetOfThings\" target=\"_blank\" rel=\"noopener noreferrer\">sensing and RTLS applications<\/a>, the SBC can do additional pre-processing to extract and\/or filter sensor data. It can also do post processing to aggregate data and\/or reformat for specific IoT platforms. Another advantage of a SBC over a <a href=\"https:\/\/www.beaconzone.co.uk\/Gateways\" target=\"_blank\" rel=\"noopener noreferrer\">gateway<\/a> is that data can be cached when WiFi or Internet connectivity isn&#8217;t available and queued for sending later so that the data isn&#8217;t lost.<\/p>\n\n\n\n<p>The starting place for evaluating use of Linux-based SBCs is usually the command line hcitool. This can be used to <a rel=\"noopener noreferrer\" href=\"http:\/\/joost.damad.be\/2013\/08\/experiments-with-bluetooth-low-energy.html\" target=\"_blank\">scan for and connect to beacons<\/a> and <a rel=\"noopener noreferrer\" href=\"http:\/\/stackoverflow.com\/questions\/32300008\/scan-bluetooth-low-energy-using-hcitool\" target=\"_blank\">save data to a file<\/a>. There&#8217;s also a script available to <a rel=\"noopener noreferrer\" href=\"https:\/\/gist.github.com\/elliotlarson\/1e637da6613dbe3e777c\" target=\"_blank\">scan and decode advertising data<\/a>.<\/p>\n\n\n\n<p>Implementations usually use the <a href=\"http:\/\/www.bluez.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Bluez library<\/a> that can be programatically accessed via languages&nbsp;such as <a href=\"https:\/\/github.com\/glock45\/intel-edison-playground\/blob\/master\/scan.c\" target=\"_blank\" rel=\"noopener noreferrer\">c<\/a>, <a href=\"https:\/\/github.com\/karulis\/pybluez\" target=\"_blank\" rel=\"noopener noreferrer\">Python<\/a> and <a href=\"https:\/\/github.com\/sandeepmistry\/noble\" target=\"_blank\" rel=\"noopener noreferrer\">Javascript (node.js)<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Beacons don&#8217;t just work with smartphones. They can work with any other devices that have Bluetoooth LE. This includes Single Board Computers (SBCs) such as the Raspberry Pi 3 and new $10 Pi Zero W that include Bluetooth 4.1. Pi zero Wireless If you take a look at our article on Implementation Types, the smartphone &hellip; <a href=\"https:\/\/www.beaconzone.co.uk\/blog\/detecting-beacons-on-linux-devices\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Detecting Beacons on Linux Devices&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[136,135],"tags":[],"_links":{"self":[{"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1462"}],"collection":[{"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=1462"}],"version-history":[{"count":9,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1462\/revisions"}],"predecessor-version":[{"id":8684,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1462\/revisions\/8684"}],"wp:attachment":[{"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=1462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=1462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=1462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}