Develop Bluetooth LE application easily with JAVA and BleuIOMarch 8, 2022
This article is a guide for creating Java applications that can write AT commands to BleuIO and access nearby Bluetooth Low Energy devices. This example project will be helpful to create BLE application easily.
About the Project
The script has a COM port settings section. This section shows connected devices to the COM port. Using jSerialComm we get the list of COM ports and show it on a dropdown menu to select.
The connect and disconnect buttons manages the connection of the dongle.
Once we are connected to the BleuIO dongle, we will be able to write AT commands to the dongle using serial port write command.
We have a button at the bottom right to stop on going process. This button is effective when we write AT+GAPSCAN. The BleuIO dongle will keep scanning for nearby BLE devices unless we stop the process.
The response will be available on the output panel.
List of AT commands are available at https://www.bleuio.com/getting_started/docs/commands/
Step 1: Clone the project
- Get the source code from
- Now open the project using NetBean.
- Select jSerialComm library to resolve the issue. jSerialComm is available at dist/lib folder. You can also download it from https://fazecast.github.io/jSerialComm/
Step 2 : Run the project
Connect BleuIO dongle into the computer.
Run the project using NetBean play button.
Alternatively we can open the project using command line interface by going to the root folder of the project and type
java -jar "dist/JavaBleuIO.jar"
The output will look like this.
Lets select a COM port where the BleuIO dongle is connected and click connect.
Now we will be able to write AT commands and see the response from the dongle on output screen.