BleuIO

BleuIO

  • Back to Site
  • Buy Now
  • Manual
  • AT Commands
  • Help

›Python library

Manual

  • How it works
  • How to use
  • Verbose Mode
  • Known Issues
  • Firmware Updates
  • Release History
  • Troubleshooting

AT-Commands

  • List of AT Commands

Scripts & Tutorials

  • Python: iBeacon
  • Python: Eddystone Beacon
  • Python: Scan
  • Python: Scan and Store
  • Python: SPS Script
  • Python: File transfer Script
  • Python: Repeater Script
  • Javascript: Google chrome.serial Beacon
  • C# Console App Example
  • C# WFA Example

Script using libraries

    Python library

    • Eddystone example using Python library
    • IBeacon example using Python library
    • Scan example using Python library
    • Scan and store example using Python library
    • SPS example using Python library
    • Security Example using Python library

    JS library

    • Eddystone example using Javascript library
    • IBeacon example using Javascript library
    • Scan example using Javascript library
    • Security Example using Javascript library
    • Get Device Distance

STM32 Example

  • STM32 Example
  • Smart Bulb Example

Arduino Example

  • Arduino Example

Beaglebone Example

  • Beaglebone Example

Build Your Own Firmware

  • Build Your Own Firmware
  • Advertising Example

More

  • Links

IBeacon example using Python library

Introduction

iBeacon technology allows Mobile Apps to understand their position on a micro-local scale, and deliver content to users based on location. It is a Bluetooth Low Energy technology. Here is an example of how you can setup the BleuIO to advertise as an iBeacon.

from bleuio_lib.bleuio_funcs import BleuIo
import time

my_dongle = BleuIo()
my_dongle.start_daemon()

print("\n\nConnected to Dongle.\n")
print("\nWelcome to the iBeacon example!\n\n")

success = ""
while True:
    if not success:
        new_input = input(
            "Enter the iBeacon UUID (x) string with Major (j), "
            "Minor (n) and TX (t)\n"
            "Example: ebbaaf47-0e4f-4c65-8b08-dd07c98c41ca0000000000\n>> "
        )
    success = my_dongle.at_advdatai(new_input)
    time.sleep(0.1)
    if "OK" in str(success):
        advstart = my_dongle.at_advstart()
        print(advstart)
        if not input("Press any key to exit."):
            my_dongle.at_advstop()
            break
    else:
        print("Error, try again.")
        success = ""

Full source also available on GitHub.


← Eddystone example using Python libraryScan example using Python library →
  • Introduction
Docs
ManualAT CommandsHelp
Community
YouTubeLinkedInFacebook
More
BleuIOSmart Sensor DevicesGitHub
Copyright © 2022 BleuIO. A product of Smart Sensor Devices