testing commands (test)#
Commands#
test_dtm_end#
This command can be used to end a transmitter or a receiver test. When the command is processed by the radio and the test has ended, a test_dtm_completed event is triggered.
Command#
Byte | Type | Name | Description |
---|---|---|---|
0 | 0x20 | hilen | Message type: Command |
1 | 0x00 | lolen | Minimum payload length |
2 | 0x0e | class | Message class:testing commands |
3 | 0x02 | method | Message ID |
Response#
Byte | Type | Name | Description |
---|---|---|---|
0 | 0x20 | hilen | Message type: Response |
1 | 0x02 | lolen | Minimum payload length |
2 | 0x0e | class | Message class:testing commands |
3 | 0x02 | method | Message ID |
4-5 | uint16 | result | Command result |
API#
/* Function */
struct gecko_msg_test_dtm_end_rsp_t *gecko_cmd_test_dtm_end();
/* Response id */
gecko_rsp_test_dtm_end_id
/* Response structure */
struct gecko_msg_test_dtm_end_rsp_t
{
uint16 result
}
Events generated#
Event | Description |
---|---|
test_dtm_completed | This event is received when the command is processed. |
test_dtm_rx#
This command can be used to start a receiver test. The test is meant to be used against a separate Bluetooth tester device. When the command is processed by the radio, a test_dtm_completed event is triggered. This event indicates if the test started successfully.
Parameter phy specifies which PHY is used to receive the packets. All devices support at least the 1M PHY.
The test may be stopped using the test_dtm_end command. This will trigger another test_dtm_completed event, which carries the number of packets received during the test.
Command#
Byte | Type | Name | Description |
---|---|---|---|
0 | 0x20 | hilen | Message type: Command |
1 | 0x02 | lolen | Minimum payload length |
2 | 0x0e | class | Message class:testing commands |
3 | 0x01 | method | Message ID |
4 | uint8 | channel | Bluetooth channel Range: 0-39 Channel is (F - 2402) / 2, where F is frequency in MHz |
5 | uint8 | phy | PHY to use |
Response#
Byte | Type | Name | Description |
---|---|---|---|
0 | 0x20 | hilen | Message type: Response |
1 | 0x02 | lolen | Minimum payload length |
2 | 0x0e | class | Message class:testing commands |
3 | 0x01 | method | Message ID |
4-5 | uint16 | result | Command result |
API#
/* Function */
struct gecko_msg_test_dtm_rx_rsp_t *gecko_cmd_test_dtm_rx(uint8 channel, uint8 phy);
/* Response id */
gecko_rsp_test_dtm_rx_id
/* Response structure */
struct gecko_msg_test_dtm_rx_rsp_t
{
uint16 result
}
Events generated#
Event | Description |
---|---|
test_dtm_completed | This event is received when the command is processed. |
test_dtm_tx#
This command can be used to start a transmitter test. The test is meant to be used against a separate Bluetooth tester device. When the command is processed by the radio, a test_dtm_completed event is triggered. This event indicates if the test started successfully.
In the transmitter test, the device sends packets continuously with a fixed interval. The type and length of each packet is set by packet_type and length parameters. Parameter phy specifies which PHY is used to transmit the packets. All devices support at least the 1M PHY. There is also a special packet type, test_pkt_carrier , which can be used to transmit continuous unmodulated carrier. The length field is ignored in this mode.
The test may be stopped using the test_dtm_end command.
Command#
Byte | Type | Name | Description |
---|---|---|---|
0 | 0x20 | hilen | Message type: Command |
1 | 0x04 | lolen | Minimum payload length |
2 | 0x0e | class | Message class:testing commands |
3 | 0x00 | method | Message ID |
4 | uint8 | packet_type | Packet type to transmit |
5 | uint8 | length | Packet length in bytes. Range: 0-255 |
6 | uint8 | channel | Bluetooth channel Range: 0-39 Channel is (F - 2402) / 2, where F is frequency in MHz |
7 | uint8 | phy | PHY to use |
Response#
Byte | Type | Name | Description |
---|---|---|---|
0 | 0x20 | hilen | Message type: Response |
1 | 0x02 | lolen | Minimum payload length |
2 | 0x0e | class | Message class:testing commands |
3 | 0x00 | method | Message ID |
4-5 | uint16 | result | Command result |
API#
/* Function */
struct gecko_msg_test_dtm_tx_rsp_t *gecko_cmd_test_dtm_tx(uint8 packet_type, uint8 length, uint8 channel, uint8 phy);
/* Response id */
gecko_rsp_test_dtm_tx_id
/* Response structure */
struct gecko_msg_test_dtm_tx_rsp_t
{
uint16 result
}
Events generated#
Event | Description |
---|---|
test_dtm_completed | This event is received when the command is processed. |
Events#
test_dtm_completed#
This event indicates that the radio has processed a test start or end command. The result parameter indicates the success of the command.
After the receiver or transmitter test is stopped, the number_of_packets parameter in this event indicates the number of received or transmitted packets.
Event#
Byte | Type | Name | Description |
---|---|---|---|
0 | 0xa0 | hilen | Message type: Event |
1 | 0x04 | lolen | Minimum payload length |
2 | 0x0e | class | Message class:testing commands |
3 | 0x00 | method | Message ID |
4-5 | uint16 | result | Command result |
6-7 | uint16 | number_of_packets | Number of packets. Only valid for test_dtm_end command. |
API#
/* event id*/
gecko_evt_test_dtm_completed_id
/* event structure*/
struct gecko_msg_test_dtm_completed_evt_t
{
uint16 result,
uint16 number_of_packets
}
test enumerations#
test_packet_type#
Test packet types
Number 3 corresponding to unmodulated carrier packet type is deprecated. Valid number is 254.
Enumerations#
Value | Name | Description |
---|---|---|
0 | test_pkt_prbs9 | PRBS9 packet payload |
1 | test_pkt_11110000 | 11110000 packet payload |
2 | test_pkt_10101010 | 10101010 packet payload |
3 | test_pkt_carrier_deprecated | Unmodulated carrier - deprecated |
4 | test_pkt_11111111 | 11111111 packet payload |
5 | test_pkt_00000000 | 00000000 packet payload |
6 | test_pkt_00001111 | 00001111 packet payload |
7 | test_pkt_01010101 | 01010101 packet payload |
253 | test_pkt_pn9 | PN9 continuously modulated output |
254 | test_pkt_carrier | Unmodulated carrier |
test_phy#
Test PHY types
Enumerations#
Value | Name | Description |
---|---|---|
1 | test_phy_1m | 1M PHY |
2 | test_phy_2m | 2M PHY |
3 | test_phy_125k | 125k Coded PHY |
4 | test_phy_500k | 500k Coded PHY |