swabadge-ble

Custom BLE circuit, 3d printed case and button, and sample iOS code

https://github.com/southwestair/swabadge-ble

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.6%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Custom BLE circuit, 3d printed case and button, and sample iOS code

Basic Info
  • Host: GitHub
  • Owner: SouthwestAir
  • License: bsd-3-clause
  • Language: G-code
  • Default Branch: main
  • Size: 15 MB
Statistics
  • Stars: 6
  • Watchers: 8
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

📛 SWABadge

License

Anurag's GitHub stats

Sketch Xcode Swift iOS

Custom BLE circuit, 3d printed case and button, and sample iOS code

💡 Concept

Creation of a wearable Bluetooth "badge" to receive urgent notifications, and respond immediately via a tap.

📜 Background

During our recent prototype testing in the lobby, we rolled out a feature enabling our Customer Service Agents (CSAs) to access tools via their mobile devices. We noticed that, especially during interactions with passengers, their iPads would accumulate numerous notifications.

We designed and built a Bluetooth button that vibrates for essential notifications, such as a passenger requiring assistance. With a simple press, CSAs can acknowledge and signal their response, effectively communicating, "Yes, I'm on it!" Leveraging our 3D printing capabilities and existing IoT expertise, we crafted a BLE circuit for this solution.

Our four-step build process was:

  1. Build the BLE circuit
  2. Integrate into the chat code
  3. 3d print a case
  4. Assemble and test!

Integration into the chat code

We used the chat code from our previous open source project SWAChat:

After following the instructions (setting up and connecting to a Firebase instance) we will have a basis for adding our Bluetooth connectivity.

The first thing we need to do is modify the Info.plist to ask permission to use Bluetooth.

You can do this one of two ways:

a) In your Info.plist, add the row for "Privacy - Bluetooth Always Usage Description", and add a string that is something like "This app requires the use of Bluetooth to connect to our cool comm badge."

b) If you prefer to modify the plist via the "Open as source code" method, add this inside the parent <dict></dict> fields:

<key>NSBluetoothAlwaysUsageDescription</key> <string>This app requires the use of Bluetooth to connect to our cool comm badge.</string>

Then you can copy or add a new file "NewToothManager.swift" found in this repository (in the 02-Chat-code folder). That file connects and manages the comm device.

(This was built with the assumption that only one comm device will be used at a time, to make this simpler to implement. There are only two basic features for this device, although that could be enhanced as well.)

To integrate this feature into a ViewController, there are two features to implement.

The first is to notify a user when something requires their attention. The badge will vibrate when this message is successfully sent:

// BLE Message sent to SWABadge device if available NewToothManager.shared.sendBuzz(msg: "notify user")

(If using the ChatDemo, this can be added to the reloadCurrentChatMessages method of the ChatViewController-Messages.swift file, within the if channel == currentChatRoom code block.)

The second feature is to accept a response from the wearer. We do this by subscribing to an in-app notification, via the NotificationCenter singleton:

NotificationCenter.default.addObserver( self, selector: #selector(self.swaBadgeTapped(_:)), name: Notification.Name.swaBadgeTapped, object: nil )

And we will need to do something with that message, like the following:

``` @objc func swaBadgeTapped(_ notification: Notification) { // do something when the badge button is tapped

} ```

(If using the ChatDemo, this can be added to the ChatViewController-Form.swift file. Add the notification in setupForm(), paste the swaBadgeTapped method in the file, and replace the TODO with something like sendMessage(self, message: "On it! (sent via SWABadge)").)

Then build and test, to make sure this feature is working with the circuit.

🚀 Future ideas

We had a number of enhancements that we've come up with, using this badge as a base. For example, we were thinking about adding a speaker and microphone to allow the wearer to hear a message (i.e. "help needed at gate C15", respond with their voice, and then use speech-to-text on their phone to submit it as a chat message). This would be complicated by having to send audio via a bytestream through Bluetooth.

💻 Contributors

The following members of Technology Innovation contributed to this project:

| Jeffrey Berthiaume | | :---: | | Jeffrey Berthiaume | | @jeffreality | | jeffreality | | jeffrey-berthiaume |

| Brady Trexler | | :---: | | E. Brady Trexler, PhD | | bradytrexler |

📖 Citations

Reference to cite if needed:

``` @software { title = {SWA Badge}, author = {Technology Innovation}, affiliation = {Southwest Airlines}, url = {https://github.com/SouthwestAir/SWABadge}, month = {09}, year = {2023}, license: {BSD-3-Clause} version: {1.0} }

```

Owner

  • Name: Southwest Airlines
  • Login: SouthwestAir
  • Kind: organization
  • Location: United States of America

Southwest Airlines Open-Source Initiative

Citation (CITATION.cff)

cff-version: 1.2.0
title: SWA Badge
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - name: Technology Innovation
    affiliation: Southwest Airlines
identifiers:
  - type: url
    value: 'https://southwest.com'
    description: Southwest Airlines
repository-code: 'https://github.com/SouthwestAir/SWABadge/'
url: 'https://southwest.com'
abstract: >-
  Creation of a wearable Bluetooth "badge" to receive urgent notifications, 
  and respond immediately via a tap.
keywords:
  - iOS
  - Swift
  - Chat
  - IoT
  - Bluetooth
license: BSD-3-Clause
version: '1.0'
date-released: '2023-09-08'

GitHub Events

Total
  • Watch event: 3
Last Year
  • Watch event: 3