Coder Social home page Coder Social logo

thulefog / ignis Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 50 KB

This is a simple, single view iOS application that illustrates setting up an iOS device such as an old iPhone to broadcast as a beacon, discoverable within a BLE range for which that device version is capable.

License: MIT License

Swift 100.00%

ignis's Introduction

ignis

This is a simple, single view iOS application that illustrates setting up an iOS device such as an old iPhone to broadcast as a beacon, discoverable within a BLE range for which that device version is capable.

The name ignis means beacon, but in Latin. When in doubt - when it comes to a working name - see if the Latin word is workable.

Bluetooth Low Energy

The following key design and implementation aspects are worth noting in the context of brining up a simple beacon.

This key in the info.plist is important to grease the wheels with CoreBluetooth.

  • NSBluetoothPeripheralUsageDescription

Implemening against these delegates is important; notable is getting the device to act as a Peripheral to broadcast and, in turn, behave as a beacon.

  • CLLocationManagerDelegate
  • CBCentralManagerDelegate
  • CBPeripheralManagerDelegate
  • CBPeripheralDelegate

Verify

This open source tool written in Objective-C for OSX was helping in getting the application running to the point that my old iPhone could be verified visible as a running BLE Beacon.

https://github.com/mlwelles/BeaconScanner.git

Once the beacon was indepedently verified by the tool above, I plugged in the UUID and necessary boilerplate code to this iOS application.

https://github.com/thulefog/whereclosest.git

The four state transitions below are described as:

  • old phone acting as beacon located basically touching newer phone

  • old phone acting as beacon moved about 12 inches away from newer phone

  • old phone acting as beacon moved into next room but still in line of sight of newer phone

  • after application exit, so old phone is no longer acting as a beacon

See below, debug area, console output:

,,,
Beacon range: immediate
Beacon range: immediate
...
Beacon range: near
Beacon range: near
...
Beacon range: far
Beacon range: far
...
Beacon range: unknown
Beacon range: unknown

ignis's People

Contributors

thulefog avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.