SWRA750 September 2022
The BER meter test can be performed using two Wilink_X devices. One of the devices will be classified as the TX board, and the other as the RX board.
Step 1:
Run the INIT script on each board.
Step 2:
Start the BER function on the RX board using the following script example:
$l10
count = 0
#DH5, 339 packet size x 8 bits x 590 packets = 1.6Mbits
#BD address = that of the TX board
Send_HCI_VS_DRPb_BER_Meter_Start 0xFD8B, 0, 0, 0x222222222222, 1, 0x5, 339, 590, 0x1FF, 0x1
Wait_HCI_Command_Complete_VS_DRPb_BER_Meter_Start_Event 5000, any, HCI_VS_DRPb_BER_Meter_Start, 0x00
#
$l11
Sleep 100
count++
Send_HCI_VS_DRP_Read_BER_Meter_Status 0xFD5B
Wait_HCI_Command_Complete_VS_DRP_Read_BER_Meter_Status_Event 5000, any, HCI_VS_DRP_Read_BER_Meter_Status, 0x00, &synched, &finished, any, &total_bits, &bit_errors, &packets
if finished== 0 then
if synched == 0 then
log"not synced yet %d count",count
#Fail "no SYNC"
else
log"not finished yet %d packets, coutn %d",packets,count
endif
goto $l11
else
BER = 1000000*bit_errors/total_bits
log"BER is %d e-6 (%d bits out of %d)",1000000*bit_errors/total_bits,bit_errors,total_bits
if BER > 100 then
Fail "BER is too high"
else
pause "Finished"
endif
endif
#pause""
goto $l10
Step 3:
The BD addresses between the TX and RX boards need to match in order for the BER Meter to function. Set the BD_ADDR on the TX board using the following command:
BD_ADDR="222222222222"
Send_HCI_VS_Write_BD_ADDR 0xFC06, BD_ADDR
Wait_HCI_Command_Complete_VS_Write_BD_ADDR_Event 5000, any, HCI_VS_Write_BD_ADDR, 0x00
Step 4:
Send TX packets with the TX board using the following commands:
Send_HCI_VS_DRPb_Enable_RF_Calibration_Enhanced 0xFDFB, 1, 0xFF, 0x00000000, 0x01
Wait_HCI_Command_Complete_VS_DRPb_Enable_RF_Calibration_Enhanced_Event 5000, any, HCI_VS_DRPb_Enable_RF_Calibration_Enhanced, 0x00
sleep 1000
# Sent Tx Packets
Send_HCI_VS_DRPb_Tester_Packet_TX_RX 0xFDCC, 0x5, 3, 2402, 0xFFFF, 5, 0, 339, 5, 1, 0x01FF
Wait_HCI_Command_Complete_VS_DRPb_Tester_Packet_TX_RX_Event 5000, any, HCI_VS_DRPb_Tester_Packet_TX_RX,