Skip to content

andrexlenx/ble-messaging-client

Repository files navigation

MyGram3 - BLE Messaging Client

MyGram3 is a cross-platform mobile application (built with Flutter) that acts as the user interface for an ipotetic mesh network.

This application connects to an Arduino Nano ESP32 via Bluetooth Low Energy (BLE) to send and receive messages across a wider IoT network.

🔗 Companion Firmware: https://github.com/andrexlenx/Esercitazione-messaggistica-zigbee

System Architecture

The app serves as the "Client" in the following communication chain:

[Smartphone App] <--(BLE)--> [Nano ESP32 Node] <--(Zigbee)--> [Other Nodes]

Supported Platforms

  • Android
  • iOS
  • macOS
  • Linux
  • web

Features

  • BLE Scanning: integrated BLE scanner.
  • Connection Management: pairing and connection status monitoring.
  • Real-time Messaging: Send text payloads to the connected node for Zigbee routing.
  • Live Feed: Display incoming messages received from the mesh network.

Prerequisites

  • Flutter SDK: https://docs.flutter.dev/get-started/install
  • Physical Device: An Android or iOS device.
    • Note: Android Emulators / iOS Simulators generally do not support Bluetooth. You must deploy to a real phone.
  • Hardware: An Arduino Nano ESP32 flashed with the companion firmware.

🛠 Build Instructions

1. Clone the Repository

git clone https://github.com/YOUR_USERNAME/ble-messaging-client.git
cd ble-messaging-client

2. Install Dependencies

on the root of the project (ble-messaging-client) run:

flutter pub get

4. Build Release Binaries

To generate installable files, run the following commands:

  • Android (APK)
flutter build apk

Output: ./build/app/outputs/flutter-apk/app-release.apk

  • iOS (IPA)

Note: Requires Xcode for building an IOS/Mac app.

flutter build ipa

Output: ./build/ios/ipa

  • macOS
flutter build macos

Output: ./build/macos/Build/Products/Release/mygram3.app

  • Linux
flutter build linux

Output: ./build/linux/x64/release/bundle/

  • Web

Note: Browser support for Bluetooth is limited.

flutter build web

Output: ./build/web/

Important Note on Permissions

To scan for BLE devices, this app requires specific location and bluetooth permissions.

  • Android: Grant "Location" (Fine Location) and "Nearby Devices" permissions when prompted.
  • iOS: Grant "Bluetooth" access when prompted.

Security & Privacy Disclaimer

Note: In its current state, this application does not implement any form of authentication or data encryption. All messages are transmitted in cleartext.

This project is intended solely for educational environments and should not be used for sensitive communications.

📄 License

MIT License / Academic Use

About

Mobile interface made in flutter for the https://github.com/andrexlenx/Esercitazione-messaggistica-zigbee network. Connects smartphones to Arduino Nano ESP32 nodes via BLE to send messages over a Zigbee mesh.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors