iBeacon minimal setup w/ Raspberry Pi(PiBeacon)

iBeacon has an enormous list of practical uses, from home to business uses. Some uses of iBeacon could for instance be pinpoint location services, for home automation uses or in-store navigation for different departments, and this is due to basic distance calculation using bluetooth signal strength and its ability to work indoors, compared to GPS. More practical uses exists due to the low power technology, which enables for instance a small iBeacon device to operate for a year or more with a single watch battery like CRC-2032. The range of iBeacon devices practically depends on the environment but is said to work up to 50 meters, which in theory should be cheaper and more efficient for larger and crowded stores or malls to implement than NFC-technology. It can also be used to easily pay in over the counter situations using PayPal without any effort. iBeacon fills the empty void between GPS- and NFS technology, and is more beneficial in certain situations.

The best of all iBeacon can be used on both Apple iOS devices, Macbooks and latest Android devices.

iBeacon-compatible devices

You will need one of these devices to be able to complete this project. I will show how to perform this project with an iPhone(I used an iPhone 5), but also shortly how to do the same on an Android phone.

  • iOS devices with Bluetooth 4.0 (iPhone 4S and later, iPad 3 and later, iPod touch 5, iPad mini and later)
  • Android devices with Bluetooth 4.0 and Android 4.3 and later (Samsung Galaxy S3/S4/S4 Mini, Samsung Galaxy Note II/III, HTC One, Nexus 7 2013 edition, Nexus 4, Nexus 5, HTC Butterfly, Droid DNA)
  • Macintosh computers with OS X 10.9 (Mavericks) and Bluetooth 4.0 using the MacBeacon application from Radius Networks.

For more information about iBeacon, visit this Wikipage.

Before we start

In this project we will setup iBeacon with a Raspberry Pi. We will then test if its working with the use of an iPhone or Android cellphone.

There are a few other guide for this, but they are mostly outdated or not working according to what is promised, so I’ve used them only as guidelines for making it work on my end and with the latest software updates(february 2014), then made a guide of it.

Here are some guides that are well made but outdated and no longer working:

Hardware requirements

  • Raspberry Pi with a working internet connection
  • Bluetooth 4.0 USB Dongle with LE support

Installing the required software

Install the required libraries

sudo apt-get install libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev
sudo apt-get install libical-dev libreadline-dev libical-dev libreadline-dev

Install Bluez

cd ~/
sudo wget https://www.kernel.org/pub/linux/bluetooth/bluez-5.23.tar.gz
sudo tar xzf bluez-5.23.tar.gz
cd ~/bluez-5.23
sudo ./configure --disable-systemd
sudo make
sudo make install

When its finally all installed, do a reboot

sudo reboot

Starting up the bluetooth service

Now connect your bluetooth 4.0 LE USB dongle if you haven’t already and run this code to check if the Pi notices your bluetooth dongle.

sudo ~/bluez-5.23/tools/hciconfig

You should see something like this:

Screen-Shot-2014-02-01-at-17.27.56

 

Notice that it prints out “DOWN” on your Bluetooth dongle, this indicates that the dongle is offline. To enable the device and ready it for iBeacon service, run these commands:

sudo ~/bluez-5.23/tools/hciconfig hci0 up
sudo ~/bluez-5.23/tools/hciconfig hci0 noscan
sudo ~/bluez-5.23/tools/hcitool -i hci0 cmd 0x08 0x0006 A0 00 A0 00 03 00 00 00 00 00 00 00 00 07 00
sudo ~/bluez-5.23/tools/hcitool -i hci0 cmd 0x08 0x000a 01

Now if you run the hciconfig tool again it should say “UP”

Screen-Shot-2014-02-01-at-17.34.20

Adding iBeacon Advertising Data

Now to add the iBeacon Advertising Data.

sudo ~/bluez-5.23/tools/hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 E2 C5 6D B5 DF FB 48 D2 B0 60 D0 F5 A7 10 96 E0 00 00 00 00 C8 00

This line of code sets the UUID MinorMajor and Power of the iBeacon Advertising Data. These values are what the desired iBeacon phone app is looking for in an iBeacon location. What UUID values we set in the previous command was:

UUID: E2C56DB5-DFFB-48D2-B060-D0F5A71096E0
Major: 0
Minor: 0
Power: C8

In the previous line of code the Manufacturer Specific Data was also set, and is identified by FF then 4C 00 which is the Apple company ID(0x004C). This value should always be set to this value even though an Android phone is being used, for iBeacon to function.

So this is how the values should be formatted when used with the command(marked with bold text):

hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 [UUID] [Major] [Minor] [Power]

Running the iBeacon app

Finally now lets see if iBeacon really works.

If you’re on iPhone, download Locate for iBeacon, if you’re on Android download iBeacon Locate.

Press “Locate iBeacons” and  you should now see your iBeacon in the list.

IMG_0184

“Locate for iBeacon” app

It might say “Distance: Unknown” for you. If it does, just press your iBeacon device and choose Calibrate and follow the instructions to fix that.

When you move away from your iBeacon and back,  notifications should appear saying you’ve left and entered the iBeacon area.

Now this guide was a minimal setup for PiBeacon, and doesn’t really fulfill for any practical functions. In the future I might make more guides on how to do more advanced iBeacon setups.

Stopping the iBeacon service

To stop the iBeacon service run this command:

sudo ~/bluez-5.23/tools/hciconfig hci0 noleadv

 

If you have any questions feel free to ask me by using the Contact page or by commenting below.

Prince

A second year computer engineering student at Malmö University in Sweden just having some fun with this blog. Computer Engineering and Mobile IT: Bachelor of Science in engineering

You may also like...

126 Responses

  1. Kathie says:

    I’ve just bookmarked this page, brilliant internet site!

    • diplind says:

      Plus, Each Portion Is Made Exactly For The Dieter, Making Certain The Best Possibility Of Success cbd gummies cvs fort wayne To Stop Shoppers From Becoming Bored Or Dropping Motivation, The Creators Also Be Positive That The Meals And Meals Have A Variety From Everyday If The Consumer Finds That They Are Happy With The Meals, They Ll Integrate The Recipes Into Their Common Consuming Habits When The 8 Week Course Is Over Your Macros Are Your Grams Of Fat, Protein And Web Carbs Not To Be Confused With Calorie Counting buy cialis online without prescription The comparative burden of chronic widespread pain and fibromyalgia in the United States, Caroline Schaefer, Rachael Mann, Elizabeth T Masters, Joseph C Cappelleri, Shoshana R Daniel, Gergana Zlateva, Heather J McElroy, Arthi B Chandran, Edgar H Adams, Annlouise R Assaf, Michael McNett, Philip Mease, Stuart Silverman, and Roland Staud

  2. SandyCix says:

    iHerb promo code 5-80 % off >> https://code-herb.com/

  3. Artificial intelligence creates content for the site, no worse than a copywriter, you can also use it to write articles. 100% uniqueness :). Click Here:👉 https://stanford.io/3FXszd0

  4. I’ve been exploring for a bit for any high quality articles or blog posts on this kind of house . Exploring in Yahoo I eventually stumbled upon this web site. Studying this information So i’m glad to express that I’ve an incredibly just right uncanny feeling I found out exactly what I needed. I most without a doubt will make certain to do not overlook this website and give it a look regularly.

  5. number-Dyefs says:

    denmark toll free number continent telecom

  6. Experience the full power of an AI content generator that delivers premium results in seconds. 100% uniqueness,7-day free trial of Pro Plan, No credit card required:). Click Here:👉 https://stanford.io/3V6fSRi

  7. I am continuously browsing online for ideas that can help me. Thx!

  8. jawaraslot says:

    Hey There. I discovered your weblog the use of msn. That is an extremely smartly written article. I will be sure to bookmark it and come back to read extra of your helpful information. Thanks for the post. I’ll definitely return.

  9. bonanza88 says:

    Heya are using WordPress for your site platform? I’m new to the blog world but I’m trying to get started and set up my own. Do you need any html coding knowledge to make your own blog? Any help would be greatly appreciated!

  10. this website says:

    Enjoyed looking through this, very good stuff, regards.

  11. Great site. A lot of useful information here. I am sending it to several buddies ans also sharing in delicious. And of course, thanks in your effort!

  12. Battery says:

    Everything is very open and very clear explanation of issues. was truly information. Your website is very useful. Thanks for sharing.

  13. I’ve recently started a web site, the info you offer on this website has helped me tremendously. Thank you for all of your time & work.

  14. Great wordpress blog here.. It’s hard to find quality writing like yours these days. I really appreciate people like you! take care

  15. Hello there, simply was aware of your weblog thru Google, and located that it’s really informative. I’m gonna watch out for brussels. I will appreciate in case you continue this in future. Lots of people will likely be benefited out of your writing. Cheers!

  16. I like the helpful information you provide in your articles. I’ll bookmark your blog and check again here regularly. I’m quite certain I will learn many new stuff right here! Best of luck for the next!

  17. I’m no longer sure where you’re getting your information, but great topic. I must spend some time learning more or working out more. Thank you for great info I used to be in search of this info for my mission.

  18. I will right away take hold of your rss feed as I can’t in finding your email subscription link or e-newsletter service. Do you have any? Please allow me realize in order that I may just subscribe. Thanks.

  19. Hello there, I found your site by means of Google whilst looking for a comparable topic, your website came up, it appears great. I have bookmarked it in my google bookmarks.

  20. I am forever thought about this, appreciate it for posting.

  21. fabuloso este conteúdo. Gostei bastante. Aproveitem e vejam este site. informações, novidades e muito mais. Não deixem de acessar para saber mais. Obrigado a todos e até a próxima. 🙂

  22. Really superb information can be found on web site.

  23. Everything is very open and very clear explanation of issues. was truly information. Your website is very useful. Thanks for sharing.

  24. Wonderful beat ! I wish to apprentice even as you amend your web site, how could i subscribe for a blog web site? The account aided me a applicable deal. I were tiny bit acquainted of this your broadcast provided bright clear concept

  25. Jamesenund says:

    https://over-the-counter-drug.com/# cvs over the counter covid test

  26. Fb9 says:

    Rattling clear site, regards for this post.

  27. Fb9 says:

    Right now it appears like Drupal is the top blogging platform out there right now. (from what I’ve read) Is that what you’re using on your blog?

  28. albulty says:

    All patients on Herceptin undergo regular cardiac tests, such as an echocardiogram, to look for possible heart damage diuretic lasix buy Tamoxifen has demonstrated some efficacy has a therapeutic for bipolar mania and is believed to exert these effects through inhibition of protein kinase C PKC

  29. HenryCloge says:

    I can foretell with artistic assurance that these cbd gummies are abundant in the service of travelers because they are tremendous for the benefit of relieving force during flights. Of course I suitor these tried and true hemp cornbread manufacturer gummies the most because they extremely give the complete entourage effect. Turn it and suitable fluke to you!

  30. gate io says:

    Your article helped me a lot. what do you think? I want to share your article to my website: gate io

  31. watch cam says:

    The crux of your writing whilst appearing reasonable in the beginning, did not work very well with me after some time. Somewhere within the sentences you were able to make me a believer but just for a while. I nevertheless have a problem with your leaps in assumptions and you would do nicely to fill in those gaps. In the event you actually can accomplish that, I will definitely be fascinated.

  32. Rickeyhoact says:

    Absolutely you don’t have occasion for to look after online pharmacies to take cbd products like cbd capsules or unguent nowadays. I think it’s pretty agreeable to bump into uncover a mediocre presence that force plan for you with high-quality products like cbd vape juice
    . You don’t orderly fundamental a medicine instead of that so I don’t look upon the heart in buying cbd only in pharmacies since I cogitate on it’s more intelligent to rely on the companies that in the works specifically with cbd.

  33. cbd capsules says:

    I can divulge with leading faith that these are great for travelers because they are great instead of relieving insistence during flights. Of conduct I suitor these tried and verified hemp cornbread manufacturer gummies the most because they extremely hand out the complete entourage effect. Turn it and chaste fortuity to you!

  34. I am no longer certain the place you are getting your info, but good topic. I must spend a while learning more or working out more. Thank you for excellent info I used to be in search of this information for my mission.

  35. Some truly good articles on this internet site, thanks for contribution.

  36. gate io says:

    Thank you, your article has benefited me a lot and helped me a lot. After reading carefully, I still have some doubts, would you like to help me solve it? I’ll be back often and follow up on this comment. thank you for your help.

  37. outlet joyas says:

    Nice read, I just passed this onto a friend who was doing some research on that. And he actually bought me lunch since I found it for him smile Thus let me rephrase that: Thanks for lunch! “Not only is the universe stranger than we imagine, it is stranger than we can imagine.” by Sir Arthur Eddington.

  38. vietluan.com says:

    May I quote some of your posts as long as I provide credit and sources on your site? My blog is very much in the same area of interest as yours, and my users can actually use some of the information you’ve presented here. Let me know if you don’t mind. Thank you! 토토사이트

  39. cbd capsules says:

    I can divulge with gigantic faith that these are abundant for travelers because they are marked for the benefit of relieving make a point of during flights. Of course I suitor these tried and true hemp cornbread type gummies the most because they actually offer the complete entourage effect. Turn it and good luck to you!

  40. online cams says:

    Valuable information. Fortunate me I discovered your website by chance, and I am shocked why this coincidence didn’t came about in advance! I bookmarked it.

  41. The other day, while I was at work, my sister stole my apple ipad and tested to see if it can survive a forty foot drop, just so she can be a youtube sensation. My apple ipad is now broken and she has 83 views. I know this is entirely off topic but I had to share it with someone!

  42. MichaelKamma says:

    Hi there. I characterize as you’ve noticed that a raffle of unlike devices must been invented repayment for cigarette smoking. Iqos vape No matter how they also came up with something interesting with a view cannabis smoking – it’s bong In my opinion story of the finest ways to fully adventure the smoke shop
    status of cannabis and its repercussions on you. If you are a beginner and only scantiness to effort smoking.

  43. I wanted to post you the bit of note just to say thank you over again for your personal pleasant things you have featured on this website. It’s certainly shockingly open-handed of you to deliver openly all that a number of people would’ve offered for sale for an electronic book to generate some bucks for themselves, and in particular considering that you might well have done it in case you desired. These tips also worked to provide a easy way to be certain that many people have the identical dreams just like my own to realize a good deal more in regard to this issue. I am certain there are numerous more enjoyable instances ahead for individuals that take a look at your blog post.

  44. I like this website its a master peace ! Glad I observed this on google .

  45. I agree with your point of view, your article has given me a lot of help and benefited me a lot. Thanks. Hope you continue to write such excellent articles.

  46. Hello There. I found your blog using msn. This is a really well written article. I will be sure to bookmark it and return to read more of your useful info. Thanks for the post. I’ll definitely comeback.

  47. whoah this blog is wonderful i like reading your articles. Stay up the good work! You know, a lot of persons are looking around for this info, you can help them greatly.

  48. Outstanding post, you have pointed out some wonderful points, I likewise believe this s a very good website.

  49. A lot of blog writers nowadays yet just a few have blog posts worth spending time on reviewing.Really thank you! Cool.

  50. I agree with your point of view, your article has given me a lot of help and benefited me a lot. Thanks. Hope you continue to write such excellent articles.

  51. ibet agent says:

    There’s noticeably a bundle to find out about this. I assume you made sure nice points in features also.

  52. Enjoyed looking at this, very good stuff, thanks.

  53. Thanks for sharing superb informations. Your web site is so cool. I am impressed by the details that you’ve on this website. It reveals how nicely you understand this subject. Bookmarked this website page, will come back for extra articles. You, my pal, ROCK! I found just the information I already searched everywhere and just could not come across. What an ideal site.

  54. Excellent site. Lots of useful information here. I’m sending it to some friends ans also sharing in delicious. And obviously, thanks for your effort!

  55. Everything is very open and very clear explanation of issues. was truly information. Your website is very useful. Thanks for sharing.

  56. I have been browsing on-line more than three hours nowadays, yet I never discovered any fascinating article like yours. It is beautiful worth enough for me. In my opinion, if all website owners and bloggers made excellent content material as you did, the net will be much more helpful than ever before. “I think that maybe if women and children were in charge we would get somewhere.” by James Grover Thurber.

  57. bulk sender says:

    I genuinely enjoy studying on this web site, it contains wonderful posts. “One should die proudly when it is no longer possible to live proudly.” by Friedrich Wilhelm Nietzsche.

  58. WONDERFUL Post.thanks for share..extra wait .. …

  59. Thanks for the auspicious writeup. It if truth be told used to be a entertainment account it. Glance advanced to far added agreeable from you! By the way, how can we keep up a correspondence?

  60. There is apparently a bunch to identify about this. I suppose you made certain good points in features also.

  61. We’re a group of volunteers and opening a new scheme in our community. Your web site offered us with valuable info to work on. You have done a formidable job and our entire community will be thankful to you.

  62. Excellent website. Lots of useful information here. I¦m sending it to a few pals ans additionally sharing in delicious. And of course, thank you on your effort!

  63. Thank you for the good writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! By the way, how can we communicate?

  64. I will right away snatch your rss as I can’t in finding your e-mail subscription link or newsletter service. Do you have any? Please let me recognise so that I may subscribe. Thanks.

  65. You really make it seem so easy together with your presentation however I in finding this topic to be actually something that I feel I would by no means understand. It sort of feels too complex and extremely huge for me. I am looking forward to your next put up, I’ll attempt to get the hang of it!

  66. The subsequent time I read a blog, I hope that it doesnt disappoint me as a lot as this one. I imply, I do know it was my choice to learn, however I actually thought youd have something interesting to say. All I hear is a bunch of whining about something that you possibly can repair should you werent too busy in search of attention.

  67. Good write-up, I am normal visitor of one’s web site, maintain up the excellent operate, and It’s going to be a regular visitor for a lengthy time.

  68. We are a bunch of volunteers and starting a brand new scheme in our community. Your site offered us with useful information to paintings on. You’ve performed a formidable job and our entire group will be grateful to you.

  69. social apps says:

    Hola! I’ve been following your website for some time now and finally got the bravery to go ahead and give you a shout out from Lubbock Texas! Just wanted to say keep up the excellent work!

  70. After all, what a great site and informative posts, I will upload inbound link – bookmark this web site? Regards, Reader.

  71. Very nice info and straight to the point. I am not sure if this is really the best place to ask but do you folks have any ideea where to employ some professional writers? Thanks in advance 🙂

  72. I have been exploring for a little bit for any high quality articles or weblog posts in this sort of space . Exploring in Yahoo I finally stumbled upon this web site. Reading this information So i¦m glad to convey that I have a very excellent uncanny feeling I came upon exactly what I needed. I such a lot no doubt will make certain to don¦t put out of your mind this site and provides it a look regularly.

  73. I agree with your point of view, your article has given me a lot of help and benefited me a lot. Thanks. Hope you continue to write such excellent articles.

  74. Absolutely pent content material, regards for selective information. “He who establishes his argument by noise and command shows that his reason is weak.” by Michel de Montaigne.

  75. I truly appreciate this post. I¦ve been looking all over for this! Thank goodness I found it on Bing. You have made my day! Thanks again

  76. Hi there! This post couldn’t be written any better! Reading through this post reminds me of my previous room mate! He always kept talking about this. I will forward this article to him. Pretty sure he will have a good read. Thank you for sharing!

  77. Some times its a pain in the ass to read what website owners wrote but this site is rattling user friendly! .

  78. I really like studying and I conceive this website got some genuinely useful stuff on it! .

  79. I like what you guys are up also. Such clever work and reporting! Carry on the excellent works guys I have incorporated you guys to my blogroll. I think it’ll improve the value of my website 🙂

  80. I believe this internet site has some real good information for everyone :D. “Heat cannot be separated from fire, or beauty from The Eternal.” by Alighieri Dante.

  81. Some genuinely prime content on this website , saved to favorites.

  82. I was curious if you ever considered changing the structure of your site? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having 1 or 2 images. Maybe you could space it out better?

  83. Glad to be one of many visitors on this awesome web site : D.

  84. I do believe all the ideas you have introduced to your post. They’re really convincing and will certainly work. Still, the posts are too brief for starters. May just you please lengthen them a bit from next time? Thank you for the post.

  85. car battery pj says:

    Your style is so unique compared to many other people. Thank you for publishing when you have the opportunity,Guess I will just make this bookmarked.2

  86. Unquestionably believe that which you said. Your favorite justification appeared to be on the internet the easiest thing to be aware of. I say to you, I certainly get irked while people think about worries that they just don’t know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side effect , people can take a signal. Will likely be back to get more. Thanks

  87. Lovely just what I was searching for.Thanks to the author for taking his clock time on this one.

  88. I appreciate, cause I found just what I was looking for. You have ended my four day long hunt! God Bless you man. Have a great day. Bye

  89. I like what you guys are up too. Such clever work and reporting! Carry on the superb works guys I?¦ve incorporated you guys to my blogroll. I think it will improve the value of my site 🙂

  90. Jackpot168 says:

    You can certainly see your skills within the work you write. The arena hopes for more passionate writers like you who are not afraid to say how they believe. Always follow your heart. “History is the version of past events that people have decided to agree upon.” by Napoleon.

  91. Thank you for the good writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! By the way, how can we communicate?

  92. slot gacor says:

    I believe this internet site has got some really good information for everyone. “A kiss, is the physical transgression of the mental connection which has already taken place.” by Tanielle Naus.

  93. A lot of thanks for every one of your labor on this site. Betty take interest in doing investigations and it is easy to understand why. We learn all concerning the powerful manner you present helpful secrets by means of your website and as well as encourage response from others about this subject matter and our favorite daughter is without question studying a lot. Enjoy the rest of the new year. Your doing a fabulous job.

  94. It?¦s in reality a great and helpful piece of information. I?¦m satisfied that you just shared this useful information with us. Please stay us informed like this. Thank you for sharing.

  95. okeplay777 says:

    I’d should check with you here. Which is not something I often do! I take pleasure in studying a put up that will make people think. Additionally, thanks for allowing me to comment!

  96. aladdin138 says:

    That is really interesting, You’re a very professional blogger. I have joined your rss feed and look forward to in search of extra of your excellent post. Also, I have shared your web site in my social networks!

  97. certainly like your website however you have to take a look at the spelling on several of your posts. Several of them are rife with spelling problems and I to find it very troublesome to tell the truth on the other hand I?¦ll definitely come back again.

  98. Simply a smiling visitor here to share the love (:, btw great layout.

  99. I’ve been absent for a while, but now I remember why I used to love this site. Thanks , I will try and check back more frequently. How frequently you update your website?

  100. That’s an interesting observation, Raju. I hadn’t thought of it in quite that way before.

  101. Europa Road says:

    I like this web site so much, saved to my bookmarks.

  102. cbd seo says:

    So, I press cbd shop and I experience make SEO as a replacement for my website! I initiate the best CBD SEO Agency ! They ranking in the TOP in Google USA

    marijuana seo

  103. That’s a great point, Amjad. It’s important to consider the different stakeholders involved in topic and how they might be impacted.

  104. ordita says:

    generic viagra online for sale viagra 100mg street price sildenafil teva

  105. uniobE says:

    sildenafil pronunciation viagra connect cvs viagra over the counter

  106. slittee says:

    buy cheap generic cialis online In effect, the polyene makes a pore in the fungal membrane and the contents of the fungus leak out

Leave a Reply

Your email address will not be published. Required fields are marked *