OP-BTS Device Development Guide


OP-BTS Device Development Guide

Table of Contents

Development Environment Setup

Hardware

  • OP-BTS Bluetooth optical probe device
  • USB Type-C cable
  • Development computer (Windows/Linux/Mac)
  • Test meter (optional)

Software

  • Serial debug tool (e.g. SSCOM, PuTTY)
  • Development environment (choose based on your language):
    • Flutter: Flutter SDK 3.0+ and Dart 2.17+
    • Python: Python 3.6+ and pyserial library
    • C/C++: MinGW/GCC compiler and serial port library
    • Java: JDK 8+ and RXTX/jSerialComm library
    • Corresponding development environment for other languages
  • Bluetooth debug tool (e.g. Bluetooth serial assistant)

Communication Protocol Overview

OP-BTS devices support communication with a host via serial port or Bluetooth. The protocol uses a JSON-like format; total command length must not exceed 150 characters.

Communication Methods

  • Wired: Connect to a PC via USB Type-C and communicate through a virtual serial port
  • Bluetooth:
    • SPP mode: for Android and Windows devices
    • BLE mode: for Android and iOS devices

Flutter Development Guide

Environment Setup

  1. Install Flutter SDK

    • Download and install the latest Flutter SDK from the Flutter website
    • Configure environment variables so the flutter command is available
    • Run flutter doctor to verify the environment
  2. Development tools

    • Visual Studio Code or Android Studio is recommended
    • Install Flutter and Dart plugins
  3. Bluetooth plugin installation

    • Add flutter_bluetooth_serial (SPP communication)
    • Add flutter_blue_plus (BLE communication)