Hello,
I used the gzll_host_ack_payload_nrf24le project and gzll_device_nrf24le to test the communiction between two nrf24les over Gazell. The result is that the host could receive the data from the device,but the device coule not receive the ack_payload data from the host. I do not know where the problem is!
nrfgo_sdk 2.3.0
The host code as follows:
#define LED P04
uint8_t gzll_ack_payload[2]={0x22,0x33};
void main(void)
{
uint8_t gzll_rx_payload[GZLL_MAX_PAYLOAD_LENGTH];
uint8_t gzll_rx_payload_length=0;
mcu_init();
gzll_init();
P0DIR&=~0x10;
LED=1;
EA=1;
gzll_rx_start();
for(;;)
{
if(gzll_rx_fifo_read(gzll_rx_payload,&gzll_rx_payload_length,0))
{
if((0x88==gzll_rx_payload[0])&&(0x99==gzll_rx_payload[1])&&(2==gzll_rx_payload_length))
{
gzll_ack_payload_write(gzll_ack_payload,2,0);
LED=~LED;
delay_ms(100);
}
}
}
}
The device code as follows:
#define LED P04
void main(void)
{
uint8_t tx_payload[2]={0x88,0x99};
uint8_t rx_payload[10];
uint8_t rx_payload_length=0;
mcu_init();
gzll_init();
PODIR&=~0x10;
LED=1;
EA=1;
for(;;)
{
if(gzll_get_state()==GZLL_IDLE)
{
if(gzll_rx_fifo_read(rx_payload,&rx_payload_length,0))
{
if((0x22==rx_payload[0])&&(0x33==rx_payload[1])&&(2==rx_payload_length))
{
LED=~LED;
delay_ms(100);
}
}
gzll_tx_data(tx_payload,2,0);
}
}
}