BleuIO Firmware update v2.2.2: Enhanced MTU Control and Advanced Scan Filtering

The BleuIO team is excited to announce the release of their latest firmware version, v2.2.2, packed with new features and improvements for Bluetooth Low Energy (BLE) developers. This firmware update aims to provide an enhanced development experience and empower developers with more control over their BLE applications.

What’s new in this firmware :

One of the notable additions in this release is the inclusion of a new command that allows developers to set or query the maximum MTU (Maximum Transmission Unit) size used in MTU negotiation upon connecting to a device. This feature provides flexibility in adjusting the MTU size, enabling better optimization and efficiency in data transmission between devices.

Additionally, the BleuIO firmware v2.2.2 introduces a powerful filtering mechanism for scan results. A new command has been added to apply filters on the outcomes from AT+FINDSCANDATA and AT+GAPSCAN commands. This feature allows filtering based on three different parameters: Local Name, Service UUID, and Manufacturer Specific ID.

It enables the flexibility to activate one filter, two filters in combination, or all three filters simultaneously. Results will only be displayed if the selected filter value is present in the advertising or scan response data. For example, a filter can be set to exclusively show data packets from devices with the Local Name “BleuIO” (either Complete or Shortened) by executing the command AT+SCANFILTER=NAME=BleuIO.

By leveraging these filtering capabilities, developers can easily focus on specific devices or data packets that meet their criteria, streamlining the development and testing process.

To explore the full range of features and improvements introduced in BleuIO firmware v2.2.2, developers are encouraged to visit the official BleuIO documentation at https://www.bleuio.com/getting_started/docs/firmware/. The comprehensive documentation provides detailed information on firmware updates and guides on how to leverage these new features effectively.

The BleuIO team is committed to continuously enhancing the BLE development experience and providing tools needed to build robust and innovative applications. With each firmware release, BleuIO demonstrates its dedication to empowering developers and enabling seamless Bluetooth Low Energy development.

Stay tuned for future updates from the BleuIO team, as they continue to introduce new features and improvements to meet the evolving needs of the BLE developer community.

Share this post on :

BleuIO Python library v1.2.0 includes verbose mode with easier event handling features

BleuIO Python library is updated and supports firmware version 2.2.1 .This update utilizes the new Verbose mode of the dongle and make it a lot simpler to work with Bluetooth Low Energy with Python.
Now the AT commands returns an object with 4 members

  • Command
  • Acknowledge
  • Response
  • End

Each contains a JSON object, except Response. The Response contains a list of JSON objects since a command can have several responses.

This new update of the library makes it easier to get the relevant information without building your own parser.
Status variables : Helpful status variables has been added which helps to keep track of the dongle status ; whether it is scanning, advertising or connected along with the dongle role.
Callback function : A callback function should be registered for both scan results and events. The callback functions will run every time a new event or scan result is detected.

Using the library

List of AT commands are available at https://www.bleuio.com/getting_started/docs/commands/

and how to access these AT commands using python library can be found at
https://pypi.org/project/bleuio/

Before starting to install our library, make sure you have the latest python installed on your system.

If you have never installed a library from PyPI, you must install the pip tool enabling you to download and install a PyPI package. There are several methods that are described on this page.

Now Install the library by running

pip install bleuio

pip automatically downloads and installs the most recent library on your system in the correct directory. To check that the installation went well, you can launch a Python interpreter and run the following lines:

from bleuio_lib.bleuio_funcs import BleuIO
my_dongle = BleuIO()
print(my_dongle.ati().Rsp)

Good luck on creating amazing Bluetooth Low Energy application using BleuIO and Python.

Share this post on :

BleuIO’s new firmware version 2.2.1 increased MTU size to 512 bytes

What is the maximum transmission unit (MTU)?

In networking, maximum transmission unit (MTU) is a measurement representing the largest data packet that a network-connected device will accept.

BleuIO’s new firmware version 2.2.1 increased MTU size from 247 bytes to 512 bytes, which allows more data to fit into fewer packets. This generally results in a faster and more efficient transmission of data.

A new AT command AT+GETMAC is also added to the latest firmware. This will return the MAC address of the BleuIO dongle.

Added features:

  • Increased MTU to 512 bytes.
  • Added an MTU event that shows the negotiated MTU when connected or when changed: (MTU CHANGED: xxx) (using verbose mode: {779:”0000″,”evt”:{“action”:”mtu changed”,”mtu”:xxx}})
  • Added new AT command: AT+GETMAC for getting bleuio mac address.

Bugfixes

  • Fixed format errors of some messages when using verbose mode that doesn’t comform to JSON.

To find out more about the updates of the dongles new firmware 2.2.1, please visit our Getting Started Guide.

Share this post on :

BleuIO’s new firmware version 2.2.0 allows changing the output format

A new AT command has been added that allows the user to see detailed response for every AT commands. This level of details can be helpful for troubleshooting problems as it explains the different error codes, disconnection reason codes and event codes. For that reason, users can take advantage of verbose mode for troubleshooting purposes and turn it off when it’s not needed.

This new mode changes the output to a more structured and unified format which includes command IDs for all command-related messages. The command-related outputs are more easily separatable from the event outputs. The idea is to make the BleuIO output more consistent, easier to use in scripts and generate more useful error messages.

The command to turn this new feature on and off is: ATV1 (on) ATV0 (off).

List of response format and code list is given below.

Response Format

Response TypesDescritonFormat
CCommand response. Assign a response index.{“C”:Command Index,”cmd”:”command“}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D)
AAcknowledgement response.{“A”:Command Index,”err”:error code in hex,”errMsg”:”Error Message String“}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D)
RReply response. Different reply data for different commands. Not all commands have reply data.{“R”:Command Index,Reply data}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D)
EEnd response. Signify end of the command.{“E”:Command Index,”nol”:number of lines belonging to this command (excluding scan responses))}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D)
SScan data response.{“S”:Command Index,”rssi”:rssi value,”addr”:”mac address“,(if available)”name”:”device name”}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D)
SFScan find data response.{“SF”:Command Index,(if AT+SHOWRSSI turned on)“rssi”:rssi value,”addr”:”mac address“,”type”:advertising type,”data”:”data in hex”}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D)
STScan target response.{“ST”:Command Index,(if AT+SHOWRSSI turned on)“rssi”:rssi value,”addr”:”mac address“,”type”:advertising type,”data”:”data in hex”}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D)
SEScan ended response.{“SE”:Command Index,”action”:”scan completed”}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D)
EventsEvent response. Different event response data for different events. All events have event response data.{event code:”Connection Index in hex if any otherwise 0xFFFF“,Event response data}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D)

Error Code List

Error CodeDescription
0x00Success
0x01Generic failure
0x02Already done
0x03Operation already in progress
0x04Invalid parameter
0x05Not allowed
0x06Not connected
0x07Not supported
0x08Not accepted
0x09Busy
0x0ARequest timed out
0x0BNot supported by peer
0x0CCanceled by user
0x0DEncryption key missing
0x0EInsufficient resources
0x0FNot found
0x10No credits available on L2CAP CoC
0x11MTU exceeded on L2CAP CoC
0x12Insufficient bandwidth

Event Code List

Event CodeDescription
256Connection established
258Disconnection event
260Advertising operation completed
263Connection parameters updated
264Pairing request
265Pairing completed
266Security request from peer
268Passkey request
269Security level changed indication
271Set security level failed
272Connection parameters update completed
273Data length changed
276Numeric request
278Long Term Key missing
279SPS Service Event
768Service found during browsing procedure
769Browsing procedure completed
770Service found during discovery
771Included service found during discovery
772Characteristic found during discovery
773Characteristic descriptor found during discovery
774Discovery completed
775Read attribute value completed
776Write attribute value completed
777Value notification received
778Value indication received

Disconnection Reason Code List

Status CodeDescription
0x08Connection timeout
0x13Remote User terminated connection
0x14Remote device terminated connection due to low resources
0x15Remote device terminated connection due to power off
0x16Connection terminated by local host
0x1FUnspecified error
0x3DConnection terminated due to MIC failure

List of AT commands and their sample output can be found at Our Getting Started Guide.

Share this post on :

BleuIO firmware updater is now available for Mac users

BleuIO continues to release firmware versions and adds new features regularly. Therefore, it is important to keep the dongle updated.

BleuIO users were able to update the dongle from Windows and Linux system. This new updater allows updating the dongle from Mac as well.

The BleuIO comes with a bootloader to allow us to update the firmware or flash our own application to the dongle. To flash the dongle we will need an image file containing the new firmware or our own application and the updater script.

How to update a dongle

Requirements:

Steps

  • Download and extract the updater zip file.
  • Place the firmware image file into the same folder. (list of firmware image files are available here).
  • Open the command prompt and go to the extracted folder where bleuio_fw_updater.py is available.
  • Run: python bleuio_fw_updater.py image_file_name.img
  • “Success” message along with the updated firmware version will be shown on the screen once the process is completed.
Share this post on :

BleuIO firmware auto updater is now available

BleuIO continues to release firmware versions and adds new features regularly. Therefore, it is important to update our dongle regularly.

The BleuIO comes with a bootloader to allow us to update the firmware or flash our own application to the dongle. To flash the dongle we will need an image file containing the new firmware or our own application and a host USB loader application.

To update the firmware, we need to select the correct COM port where the BleuIO dongle is connected. Keep in mind that the bootloader only opens for about 10 seconds after inserting the Dongle, then it switches to the main app and the COM port number changes. We cannot use the main app’s Serial Port number to flash the dongles!

To overcome this COM port selection process while updating a firmware, BleuIO team has developed an auto updater. This updater selects the right COM port for the dongle before updating. All we need to do is, run the updater and follow the instructions on the screen.

How to update a dongle using Auto Updater

  • Download and extract the auto updater zip file.
  • Place the firmware image file into the same folder. (list of firmware image files are available here).
  • Open the command prompt as Administrator.
  • Go to the extracted folder where bleuio_auto_updater.py is available.
  • Run: python bleuio_auto_updater.py image_file_name.img
  • Insert dongle when prompted to.
  • “Update done” will be shown on the screen once the process is completed.
Share this post on :

BleuIO Firmware Update V2.1.4

BleuIO released a new firmware version 2.1.4 on March 24, 2022, introducing new features and enhancements to improve productivity. You can download the updated firmware from

https://www.bleuio.com/getting_started/docs/firmware/

Following features and AT commands has been added to this release 

Added features:

  • BleuIO can now toggle on/off the written data echo after a gattcwrite command.
  • It is now possible to set a timer for AT+FINDSCANDATA & AT+SCANTARGET scans just like with AT+GAPSCAN. Just end the command with “=<scan_time>”. Like AT+FINDSCANDATA=123456=5.

Added Commands

  • Added a new command ATEW to Turn WRITTEN DATA echo on/off after GATTCWRITE commands. (On per default).

To meet the demands of users, the BleuIO team will continue to update and add new features. To find out more about the updates of the dongles new firmware 2.0.7, please visit our Getting Started Guide

Share this post on :

Security Modes/Levels of a BLE Connection

Protection of private information is essential for every wireless low energy device, from fitness bands to payment systems. Privacy mechanisms prevent devices from being tracked by untrusted devices.

Secure communications keep data safe while also preventing unauthorized devices from injecting data to trigger the system’s unintended operation.

In Bluetooth Low Energy (BLE), devices connected to a link can pass sensitive data by setting up a secure encrypted connection, which means making the data unreadable to all but the Bluetooth master and slave devices. 

A BLE connection is said to operate at a specific Security mode. Within each mode are several security levels. The required security mode/level of a connection may change from time to time, leading to procedures to increase that level.

To keep it simple, when two devices that initially do not have security wish to do something that requires security, the devices must pair first. This process could be triggered, for example, by a central device that is attempting to access a data value (a “characteristic”) on a peripheral device that requires authenticated access. 

Pairing involves authenticating the identity of two devices, encrypting the link using a Short-Term Key (STKs), and then distributing Long-Term Keys (LTKs) (for faster reconnection in the future, i.e., bonding) used for encryption.

The new security level of the connection is based on the method of pairing performed and this is selected based on the I/O capabilities of each device. The security level of any subsequent reconnections is based on the level achieved during the initial pairing.

Each device’s role is defined in the Security Manager (SM) portion of the BLE stack. They are:

  • Initiator: Always corresponds to the Link Layer Master and the GAP central.
  • Responder: Always corresponds to the Link Layer Slave and the GAP peripheral.

Security by means of encryption contains four levels

  • Level 1: No Security (No authentication and no encryption)
  • Level 2: Unauthenticated pairing with encryption
  • Level 3: Authenticated pairing with encryption
  • Level 4: Authenticated LE Secure Connections pairing with encryption

BleuIO has introduced a security feature into its latest release (firmware v2.1.1 ) which handles all four security levels to establish a secure BLE connection. Users can now use Numeric Comparison, Just Works or Passkey Entry to make data transmission more secure when working with Bluetooth low energy applications using BleuIO. 

  • Numeric Comparison: In this scenario, both devices have a display unit capable of displaying a six-digit number. Both displays output the same number, and the user is asked to confirm that these numbers match. 
  • Passkey Entry: The Passkey Entry is primarily intended for the case that one device has a keyboard, but no display unit and the other device has at least a display unit, for example, a PC and a BLE keyboard scenario. The user is shown a six-digit number (from “000000” to “999999”) on the device with a display and then is asked to enter the number on the other device. If the value entered on the second device is correct, the pairing is successful.
  • Just Works: This model is primarily intended for the most constrained devices in I/O. The Just Works association model uses the Numeric Comparison protocol, but the user is never shown a number, and the application may ask the user to accept the connection. This method doesn’t offer protection against a Man in the Middle (MITM) attack, but it provides the same protection level against passive eavesdropping as the Numeric Comparison.

The table below is a reference for determining the pairing method based on the two devices I/O capabilities and each device’s role in the process.

Source : https://microchipdeveloper.com/wireless:ble-gap-security

Use the following AT commands to make your BLE connection more secure.

AT Commands :

  • AT+SETPASSKEY for setting or querying set passkey for passkey authentication.
  • AT+SECLVL for setting or querying minimum security level used when connected to other devices.
  • AT+NUMCOMPA accepts a numeric comparison authentication request or enables/disabling auto-accepting numeric comparisons.
  • AT+GAPADDRTYPE Sets or queries what address type the dongle will use. Changing address type cannot be done while advertising or while connected to other devices. Read more at https://www.bleuio.com/getting_started/docs/commands/#atgapaddrtype
Share this post on :

BleuIO Javascript library now supports firmware v2.1.0

BleuIO Javascript library is updated and supports firmware version 2.1.0 

Now you can easily access all the BleuIO AT commands from web browser using this library.

Before starting to install our library, make sure you have Chrome 78 or later version installed on your system. You will also need to enable the #enable-experimental-web-platform-features flag in chrome://flags.
To do that, Open chrome://flags/#enable-experimental-web-platform-features in Google Chrome browser and enable this feature.

You can use chrome.serial to create web apps that can access the BleuIO AT commands easily using this library.

Now Install the library by running

npm i bleuio

npm automatically downloads and installs the most recent library on your system in the correct directory. To check that the installation went well, follow the simple readme file from

https://www.npmjs.com/package/bleuio

Follow this video if you find any difficulties.https://www.youtube.com/embed/MZfeV61gjeY?feature=oembed

Good luck on creating amazing Bluetooth Low Energy application using BleuIO

Share this post on :

Bleuio Firmware Update V2.0.9 – enables Device Information Service update

BleuIO released a new firmware version 2.0.9 on November 05, 2021, introducing new features and enhancements to improve productivity. You can download the updated firmware from

https://www.bleuio.com/getting_started/docs/firmware/

Following features and AT commands has been added to this release 

Added features:

  • Added support to set the information in the Device Service Information (DIS). 

Added Commands

  • Added a new command AT+DIS, that is used to view current information used in the Device Information Service (DIS).
  • Added a new command AT+SETDIS that is used to set current information used in the Device Information Service (DIS).

What is Device information service?

Device information service exposes manufacturer and/or vendor information about a device. It is a very good way for the maker of equipment, software and hardware version control, production information disclosure. It is therefore recommended to include this Standard service defined by the Bluetooth SIG at the time of development.

Use the following AT command to set Device information service 

AT+SETDIS=<man_name>=<model_num>=<serial_num>=<hw_rev>=<fw_rev>=<sw_rev>

Manufacturer Name String

The Manufacturer Name String characteristic shall represent the name of the manufacturer of the device.

Model Number String

The Model Number String characteristic shall represent the model number that the device vendor assigns.

Serial Number String

The Serial Number String characteristic shall represent the serial number for a particular instance of the device.

Hardware Revision String

The Hardware Revision String characteristic shall represent the hardware revision for the hardware within the device.

Firmware Revision String

The Firmware Revision String characteristic shall represent the firmware revision for the firmware within the device.

Software Revision String

The software Revision String characteristic shall represent the software revision for the software within the device.

Note that information can only be set before starting advertising. If no custom information is set, the default BleuIO device information will be used. Once advertising is started, the information set to be used will be locked in and cannot be changed during runtime.

To change the device information again, the dongle will need to be restarted, either by unplugging it and plugging it back in or using the ATR command.

Max length is 100 characters per parameter.

Use the AT+DIS AT command to view current Device Information Service to be used. It Will show the default BleuIO information if no custom information has been set.

Share this post on :