Testing Commands (test)#

test commands#

test_dtm_end#

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.

C 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;  
}  

Command does not have parameters (for BGAPI headers refer to#

link)

Response Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

result

Command result

Events generated#

Event

Description

test_dtm_completed

Received when the command is processed by the radio and

the test has ended.

test_dtm_rx#

Start a receiver test against a separate Bluetooth tester device. When the command is processed by the radio, a test_dtm_completed event is triggered. This event indicates whether the test started successfully.

Parameter phy specifies which PHY is used to receive the packets. All devices support at least 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.

C 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;  
}  

Command Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint8

channel

Bluetooth channel

Range: 0-39

Channel is (F - 2402) / 2,

where F is frequency in MHz

uint8 | phy | PHY to use

Response Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

result

Command result

Events generated#

Event

Description

test_dtm_completed

This event is received when the command is processed.

test_dtm_tx#

Start a transmitter test against a separate Bluetooth tester device. When the command is processed by the radio, a test_dtm_completed event is triggered. This event indicates whether 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. The parameter phy specifies which PHY is used to transmit the packets. All devices support at least 1M PHY. A special packet type, test_pkt_carrier , 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.

C 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;  
}  

Command Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint8

packet_type

Packet type to transmit

uint8

length

Packet length in bytes

Range: 0-255

uint8 | channel | Bluetooth channel

Range: 0-39

Channel is (F - 2402) / 2,

where F is frequency in MHz

uint8 | phy | PHY to use

Response Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

result

Command result

Events generated#

Event

Description

test_dtm_completed

This event is received when the command is processed.

test events#

test_dtm_completed#

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.

C 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;  
}  

Event Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

result

Command result

uint16

number_of_packets

Number of packets

Only valid for test_dtm_end command.

test enumerations#

test_packet_type#

Test packet types supported by the stack

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

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