Overview: How to Integrate OP-BTS/BT Bluetooth Optical Probe with Handheld Devices


Overview

The OP-BTS/OP-BT Bluetooth Optical Head supports Bluetooth 5.0 BLE/SPP dual mode and is compatible with platforms such as Windows, Android, and iOS. However, the connection methods may vary across different platforms, which can be confusing for new users.

Windows

If you already have a dedicated meter reading program and have used a USB optical probe(e.g., OP-USB) for meter reading, you only need to complete the Bluetooth pairing successfully and assign a virtual COM port to the newly paired OP-BTS. Then, select the corresponding COM port in your application to use it normally.

iOS/Android and Other Handheld Device Operating Systems

If you plan to use a meter reading application on Android/iOS, things might not be as straightforward. Since iOS/Android does not have virtual COM ports like Windows, software that connects to the meter reading optical head via a wired USB serial port cannot assign a virtual COM port to the Bluetooth optical head.

To solve this issue, your meter reading application must be modified to connect to the OP-BTS/BT Bluetooth optical head using Bluetooth API.

Two Types of Bluetooth Connections:

  • Bluetooth Classic (BR/EDR): Commonly known as SPP (Serial Port Profile), suitable for Windows and Android platforms. Using SPP Bluetooth, you need to enter a pairing code to pair with the device.
  • Bluetooth Low Energy (BLE): Uses the GATT protocol for reading/writing characteristics and subscribing to notifications, supported by Windows, MacOS, Android, and iOS platforms. Often, devices are selected directly in the application without the need for pairing.

The latest versions of Android support both SPP and BLE. However, iOS only supports BLE for Bluetooth connections. Therefore, to reduce development effort and ensure compatibility, we recommend using BLE for pairing, connecting, and communication.

Preparation for BLE Development

Hardware Environment

  • Smartphone (Android or iOS device)
  • Development computer (Windows/Mac)
  • OP-BTS or OP-BT Bluetooth Optical Probe
  • Meters with optical port

Software Environment

  • Development Environment: Android Studio, Xcode
  • Development Framework: To minimize repetitive development work, we recommend using Flutter for cross-platform compatibility with Android and iOS.
  • Development Languages:
    • Dart (Flutter)
    • Java/Kotlin (Android Native)
    • Swift (iOS Native)
  • SDK Configuration: Flutter SDK, Android SDK, iOS SDK

Technical Requirements

To complete the development of the entire application, you should possess the following technical skills:

  • Basic knowledge of mobile app development.
  • Fundamental concepts of Bluetooth communication.
  • Asynchronous programming and UI interaction design skills.

Development Steps

  1. Create a Project
  2. Add Bluetooth Functionality:
    • Add Bluetooth permissions
    • Implement device scanning
    • Implement device connection
    • Implement data transmission
  3. Business Function Development:
    • Implement meter reading functionality
    • Data parsing and display
    • User interface optimization
  4. Testing and Debugging:
    • Connection stability testing
    • Data accuracy verification
    • Compatibility testing across different devices

Documentation (Coming Soon)

  • Technical Documentation:
    • Step by step guide for setting up development enviroment.
    • Communication protocol documentation
    • Bluetooth service and characteristic descriptions
    • Our practice for reconnection, timeout handling, etc.
  • Code Samples:
    • Flutter sample project
    • Key functionality implementation samples

In addition, we provide technical support for your development work:

  • Development environment setup guidance
  • Bluetooth connection troubleshooting
  • Code implementation consultation

Frequently Asked Questions

  • Differences Between iOS and Android Development: iOS supports BLE only, permission handling and API usage are also differ from Android.
  • Data Transmission Efficiency: BLE has limited transmission rates, so data packet design and transmission strategies need to be optimized.
  • Power Consumption: Recommendations for low-power design to extend device usage time.

Contact Us

For more technical questions or support, please contact us via: