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 :

Bleuio Firmware Update V2.0.8 with Indication and Notification

BleuIO released a new firmware version 2.0.8 on October 22, 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 has been added to this release 

  • Added support for indication type notifications.
  • You now have more control over indications and notifications. Notifications and indications will only show if you have enabled them. An exception is when connecting to another BleuIO Dongle; it will still enable the required notifications used by the SPS service. You can manually disable them if you want with the AT+CLEARNOTI command.
  • Added a new command AT+SETINDI that will allow you to enable indications.
  • Added a new command AT+CLEARINDI that will allow you to disable indications.
  • Added a new command AT+NOTI that will show a list of enabled notifications and their connection.
  • Added a new command AT+INDI that will show a list of enabled indications and their connection.

Indications and Notifications

Indications and Notifications are a way for a GATT Client to subscribe to data provided by a GATT Server. A client has to configure Indications and Notifications for a characteristic’s value through its client characteristic configuration descriptor to get notified every time a characteristic’s value gets updated on the server.

  • Indications need to be acknowledged by the client. The server does not send the following indication until it gets the acknowledgement back from the client. The client sent a confirmation message back to the server; this way server knows that message reached the client. Hence communication via indications is slower.
  • Notifications don’t need to be acknowledged, so they are faster. Hence, the server does not know if the message reaches the client.

Indications and Notifications are essential mechanisms for receiving server-side data because they are the only and fastest mechanisms for receiving asynchronous server-side updates. Since Bluetooth Low Energy was designed to be energy efficient, this asynchronous method of receiving updates prevents continuous polling of the server by the client and, hence, is a huge energy saver too.

Share this post on :

Bleuio Firmware Update V2.0.7

A new firmware update v 2.0.7 has been released for BleuIO and Smart USB Dongle 2.0. You can download the updated firmware from
 https://www.bleuio.com/getting_started/docs/firmware/

Bugfixes:

  • Problem sending over 99 bytes using AT-commands “AT+GATTCWRITEB” and “AT+GATTCWRITEWRB” resulted in an unexpected behaviour. 

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 :