Production Testing

Last Updated on : 2024-08-12 06:28:11download

Integration of standard Bluetooth Low Energy (LE) protocol helps you test Bluetooth LE functionalities and data pass-through. This applies to production tests on PCBAs and end products to guarantee the device quality and performance during the manufacturing process.

Overview

After you have tested the basic features, you can perform functionality testing separately or integrate it into the end product test to verify the wireless performance. You can define how a test is triggered as needed.

Scenarios:

  • You are advised to perform Bluetooth radio frequency (RF) tests on almost all Bluetooth LE products to ensure product quality after shipment.
  • This solution applies to devices that need to implement wireless production testing solutions through Bluetooth modules.
  • This solution applies to all products integrated with the standard Bluetooth LE protocol.

Features:

  • Bluetooth RF test.
  • Data pass-through test on Bluetooth devices.
  • Tuya provides supporting production test host software and technical support.
  • This solution is suitable for production tests of Tuya-enabled products. Tuya offers both the host software and dongle. If you have this requirement, please feel free to contact Tuya.
  • Bluetooth production tests does not require a physical connection, making it convenient, fast, and efficient.

Production test protocol

RF test (0x0E)

Perform the received signal strength indicator (RSSI) test on modules to measure the RF performance.

Test tool:

  • Bluetooth beacon (provided by Tuya)
  • Purpose: Broadcast an identifier named ty_mdev.

Test steps:

  1. Put the beacon around 0.5 meters away from the module.
  2. The MCU sends the RF test command to the module to initiate a test.
  3. The module will search for the designated identifier and return the RSSI. If the RSSI is greater than -70 dBm, the RF performance is acceptable.

Some chip models such as BK3431Q and BK3432 do not support scanning for a designated beacon. You need to perform an RF test with a dongle.

  • Test tool: A Bluetooth dongle. Purpose: Connect to the device under test and return the RSSI.
  • Test steps:
    1. Put the dongle around 0.5 meters away from the module.
    2. The MCU sends the RF test command to the module to initiate a test.
    3. The dongle will connect to the module and return the RSSI. If the RSSI is greater than -70 dBm, the RF performance is acceptable.
      The module must be unbound and operate in the standard power mode.

The MCU sends the following data.

No. Bytes Field Description
0
1
2 Header 0x55
0xAA
2 1 Version number 0x00
3 1 Command (CMD) 0x0E
4
5
2 Data length 0x00
0x00
6 1 CRC8 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder

The module returns the following data.

No. Bytes Field Description
0
1
2 Header 0x55
0xAA
2 1 Version number 0x00
3 1 Command (CMD) 0x0E
4
5
2 Data length (Len) Upper 8 bits
Lower 8 bits
6 to 6+Len-1 Len Data See the following table
6+Len 1 CRC8 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder

Data format

Data Description
{“ret”:true,“rssi”:“-55”} The RSSI is -55 dBm.
{“ret”:false} The designated signal is not found.

Testing data pass-through (0xF0)

With the data pass-through testing service, the module enables a connection to the Bluetooth host software (including dongle or mobile app). Also, the module and the MCU exchanges data. When the MCU needs to implement production tests over Bluetooth, this command can be used for the MCU to communicate with the host software or mobile app.

Module <-> MCU:

No. Bytes Field Description
0
1
2 Header 0x66
0xAA
2 1 Version number 0x00
3 1 Command (CMD) 0xF0
4
5
2 Data length (Len) Upper 8 bits
Lower 8 bits
6 1 Protocol type 0x03
7 to 7+Len-1 Len DATA Includes the subcommand and data for the pass-through protocol
7+Len 1 CRC8 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder

FAQs

Q: Which production testing method is recommended?

A: Typically, beacon testing is the simplest way to test Bluetooth functionalities and can basically ensure that Bluetooth functionalities work as expected.

The dongle test or data pass-through method is better for testing firmware functionalities in an all-round way, including the Bluetooth functionalities and more. The specific testing method depends on the production testing needs of the product.

Q: When using the data pass-through service, the mobile app often fails to connect to the device. What are the possible reasons?

A:

  1. Make sure the Bluetooth module is in the unbound state, because the production test can only be implemented in the unbound state.

  2. Make sure you select the correct Service UUID in the mobile app. Some earlier firmware might use UUID 0x1910, while newer firmware might use UUID 0xFD50. You can use the nRF Connect app to connect the mobile app and device. Observe and check whether they are connected.