Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

📛 SWABadge

License

Sketch Xcode Swift iOS

Custom BLE circuit, 3D printed case + button, and sample iOS integration code

A wearable Bluetooth “badge” that vibrates for urgent notifications and lets the wearer acknowledge with a single tap.

SWABadge demo (short loop)

🧭 What’s in this repo

💡 Concept

Creation of a wearable Bluetooth badge to receive urgent notifications, then respond immediately via a button press.

📜 Background

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

So we designed and built a Bluetooth badge that buzzes for the notifications that matter (e.g., a passenger needing assistance). With a single press, CSAs can acknowledge and signal, “Yes — I’m on it!”

🖼️ Build gallery

Parts
Parts
Soldering
Soldering
Case blueprint
Case blueprint
Circuit diagram
Circuit diagram
PCB layout diagram
PCB layout
SEEED XIAO ESP32-C3 pins
ESP32-C3 pin map
Build + assembly
Build + assembly

🎥 Short build/demo clip: screenshots/02-09-video.mp4

🧠 How it works (high level)

  1. The iOS app connects to the badge over BLE (see NewToothManager.swift).
  2. When the app needs the wearer’s attention, it sends a message to the badge → the badge vibrates.
  3. When the wearer taps the button, the iOS app receives a callback via NotificationCenter.

🔌 Integration into the chat code (SWAChat / ChatDemo)

We used the chat code from our previous open source project SWAChat as the baseline.

1) Add Bluetooth permission to Info.plist

Add this key/value:

<key>NSBluetoothAlwaysUsageDescription</key>
<string>This app requires Bluetooth to connect to the SWABadge device.</string>

2) Add the BLE manager

Copy NewToothManager.swift into your project.

Notes:

  • This implementation assumes only one badge is connected at a time.
  • The prototype exposes two basic behaviors: buzz and button press.

3) Buzz the badge for important notifications

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

⚠️ If you’re using the ChatDemo: a simple place to call this is inside reloadCurrentChatMessages in ChatViewController-Messages.swift (within the if channel == currentChatRoom block).

4) Listen for button taps

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

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

⚠️ If you’re using the ChatDemo: add the observer in setupForm() in ChatViewController-Form.swift, paste the swaBadgeTapped method into the file, and replace the TODO with something like sendMessage(self, message: "On it! (sent via SWABadge)").

🧩 Hardware + 3D print details

🚀 Future ideas

  • Add a speaker/microphone: play a short prompt (e.g., “Help needed at gate C15”), then respond by voice.
  • Multi-badge environments: support multiple wearables, distance/RSSI filtering, and per-user pairing.
  • Better “notification semantics”: vibration patterns for urgency/type, LED colors, haptic “OK” confirmation.
  • A tiny enclosure revision for faster assembly and easier charging/battery swap.

💻 Contributors

The following members of Technology Innovation contributed to this project:

Jeffrey Berthiaume
Jeffrey Berthiaume
X · LinkedIn · Stack Overflow
E. Brady Trexler, PhD
E. Brady Trexler, PhD
LinkedIn

📖 Citation

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}
}

About

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

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

7 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages