Error receiving 0x41 ack

error receiving 0x41 ack

Then next serial data sequence is "0001_0000", no "ACK" received, I want to know whether or not it's my HDL code problem or the board. When we run I2C probe command for listing the connected devices in the Bus, we are getting acknowledgement at 0x0C along with the slave devices. replacing I'm getting server failures(10%) below are the error I had added a reg entry SavePnpc to 0x41 for Qlogic2200 card and it.

Sorry: Error receiving 0x41 ack

40 error 017 undefined symbol gzinfo
Mlx0 physical drive error log
Error receiving 0x41 ack

Error receiving 0x41 ack - speaking

Hey Forum

I'm working on extending the deviationTx firmware to implement telemetry via the logging framework and I'm wanting to do some prototyping via the crazyradio and the python library for the crazyradio. I'm intentionally hooking in at a very low layer (the crazyradio.py library directly instead of the full crazyflie python library built on top of it) since I'm trying to use the radio directly as I will in deviationTx.

I'm having some trouble with the data field in the ack packet returned by send_packet(). My code is below.

Code: Select all

So essentially I'm just sending two commander packets back to back. The first with zero thrust to unlock the commander, and the second with thrust set to 5000 so I can see the motors spin up a little bit. In the ACK payload, I expect to see the 'empty' ACK which is really the RSSI ack packet. Byte 0 alternates between 0xF7 and 0xF3, byte 1 is always 0x01, and the byte 2 is RSSI. I've also extended it to include vBat, so byte 3 is always 0x02, and bytes 4, 5, 6, and 7 are the vBat. So in summary, I should see an ack that looks something like this (where 'N' is a value that changes):
"0xF7 0x01 0xNN 0x02 0xNN 0xNN 0xNN 0xNN" or "0xF3 0x01 0xNN 0x02 0xNN 0xNN 0xNN 0xNN"

Here's the sample output when I run the code. The motors *do* spin up on the second packet, so my transmission is in fact making it to the copter.

Code: Select all

Any clues what's up with that ACK packet? It looks like garbage data to me. The payload length varies wildly as I re-run the script.

http://www.thejumperwire.com
Tips, tutorials, and science about DIY electronics, drones, and embedded software.

NRF24LE1 pipe1 to 5 ACK failed to be received

I have tried many different initialize setting, however the ACK could not be received in pine 1 to 5. The PRX can receive all of the 6 pipes. It works for pipe 0 only. Would anyone please help?

My rf_init() of PRX is as below:

RFCE = 0; RFCKEN = 1; RF = 1; delay(1000);

SPI_RW_Reg(WRITE_REG + EN_AA, 0x03f); SPI_RW_Reg(WRITE_REG + EN_RXADDR, 0x3f); SPI_RW_Reg(WRITE_REG + SETUP_AW,0x03); SPI_RW_Reg(WRITE_REG + SETUP_RETR, 0x1f); SPI_RW_Reg(WRITE_REG + RF_CH, 0);
SPI_RW_Reg(WRITE_REG + RF_SETUP, 0x0f); SPI_Write_Buf(WRITE_REG + RX_ADDR_P0, TX_ADDRESS0, TX_ADR_WIDTH); SPI_Write_Buf(WRITE_REG + RX_ADDR_P1, TX_ADDRESS1, TX_ADR_WIDTH); SPI_Write_Buf(WRITE_REG + RX_ADDR_P2, TX_ADDRESS2, 1); SPI_Write_Buf(WRITE_REG + RX_ADDR_P3, TX_ADDRESS3, 1); SPI_Write_Buf(WRITE_REG + RX_ADDR_P4, TX_ADDRESS4, 1); SPI_Write_Buf(WRITE_REG + RX_ADDR_P5, TX_ADDRESS5, 1); SPI_Write_Buf(WRITE_REG + TX_ADDR, TX_ADDRESS0, TX_ADR_WIDTH);
SPI_RW_Reg(WRITE_REG + DYNPD, 0x3f); SPI_RW_Reg(WRITE_REG + FEATURE, 0x06);

I set the address 0 of PTX to be

SPI_Write_Buf(WRITE_REG + RX_ADDR_P0, TX_ADDRESS1, TX_ADR_WIDTH);

SPI_Write_Buf(WRITE_REG + TX_ADDR, TX_ADDRESS1, TX_ADR_WIDTH);

The 6 address are as below, the rf_init of PTX is the same as that one in PRX, I have tried different EN_RXADDR, EN_AA and also tried to set RX_PW_P0 as my payload width but the results all the same.

uint8_t const TX_ADDRESS0[TX_ADR_WIDTH] = {0x46,0x47,0x46,0x47,0x46}; uint8_t const TX_ADDRESS1[TX_ADR_WIDTH] = {0x41,0x45,0x49,0x45,0x48}; uint8_t const TX_ADDRESS2[TX_ADR_WIDTH] = {0x42}; uint8_t const TX_ADDRESS3[TX_ADR_WIDTH] = {0x43}; uint8_t const TX_ADDRESS4[TX_ADR_WIDTH] = {0x44}; uint8_t const TX_ADDRESS5[TX_ADR_WIDTH] = {0x45};

WRITE_BIT, ACK_CHECK_EN);
i2c_master_write_byte(cmd_handle,dev_addr.device_block_id, ACK_CHECK_EN);
i2c_master_write_byte(cmd_handle, dev_addr.device_block_id, ACK_CHECK_EN);
i2c_master_write_byte(cmd_handle, dev_addr.reg_offset_id, ACK_CHECK_EN);
// i2c_master_stop(cmd_handle);
// i2c_set_timeout(I2C_NUM_0,40000);// set time out 100 ms
ret_val = i2c_master_cmd_begin(I2C_NUM_0, cmd_handle,1000 / portTICK_PERIOD_MS );
i2c_cmd_link_delete(cmd_handle);

if(ret_val==ESP_FAIL){
ESP_LOGE(TAG,"I2C command write failed %s \n",esp_err_to_name(ret_val));

cmd_handle = i2c_cmd_link_create();
i2c_master_stop(cmd_handle);
i2c_master_cmd_begin(I2C_NUM_0, cmd_handle, 1000 / portTICK_PERIOD_MS);
i2c_cmd_link_delete(cmd_handle);
return ESP_FAIL;
} else if(ret_val==ESP_OK)
{
cmd_handle = i2c_cmd_link_create();
/*I2C master to generate a restart signal*/
i2c_master_start(cmd_handle);
i2c_master_write_byte(cmd_handle, ( dev_addr.device_id<< 1) READ_BIT, ACK_CHECK_EN);
for (size_t i = 0; i<size-1; i++) {
i2c_master_read_byte(cmd_handle, read_buff + i, ACK_VAL);
}

i2c_master_read_byte(cmd_handle, read_buff + size-1, NACK_VAL );
i2c_master_stop(cmd_handle);
ret_val = i2c_master_cmd_begin(I2C_NUM_0, cmd_handle, 1000 / portTICK_PERIOD_MS);
i2c_cmd_link_delete(cmd_handle);
printf("ret_val of data read operation R:%d, %u (%d, %d)\n", ret_val, counter++, ESP_ERR_TIMEOUT, ESP_FAIL);
return ret_val;
} else
{
ESP_LOGI(TAG,"i2c command write failure %s\n",esp_err_to_name(ret_val));
return ret_val;
}

}


void app_main()
{
//i2c code part
esp_err_t ret;
ret = i2c_master_initialize();

if (ret != ESP_OK) {
printf("Master init failed");
}

ESP_LOGW("LOG","Master intialized successfully %d",ret);
device_addr_t dev_addr3 = {.device_id = ESP_SLAVE_ADDR, .device_block_id = 0xFE, .reg_offset_id = 0x00};
for (int i = 0; i < DATA_LENGTH; i++) {
data_rd = 0;
}
while(1)
{
memset(data_rd,0,d_size);
ret = i2c_master_read_operation(dev_addr3, data_rd, d_size);
if(ret==ESP_OK) {
ESP_LOGI("main:","Read operation completed successfully\n");
disp_buf(data_rd, d_size);
// vTaskDelay(100 / portTICK_PERIOD_MS);
} else if (ret == ESP_ERR_TIMEOUT) {
ESP_LOGE("main:", "I2C Timeout");
} else {
ESP_LOGW("main:", " I2C %s...\n",esp_err_to_name(ret));
}

}
}

screenlog.o :
---------------------
Boot
[0;33mW (30322) LOG: Master intialized successfully 0[0m
ret_val of data read operation R:0, 0 (263, -1)
[0;32mI (30342) main:: Read operation completed successfully
[0m
04 03 02 01 08 07 06 05 0c 0b 0a 09 10 0f 0e 0d
14 13 12 11 15 19 18 17 16 1d 1c 1b 1a 1e 22 21
20 1f 26 25 24 23 27 2b 2a 29 28 2f 2e 2d 2c 30
34 33 32 31 38 37 36 35 39 3d 3c 3b 3a 41 40 3f
3e 45 44 43 42 49 48 47 46 4d 4c 4b 4a 51 50 4f
4e 52 53 57 56 55 54 5b 5a 59 58 5f 5e 5d 5c 63
62 61 60 6b 6a 69 68 67 66 65 64 6c 6e 6d 6f 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00
ret_val of data read operation R:263, 0 (263, -1)
[0;31mE (30392) main:: I2C Timeout[0m
[0;32mI (31392) i2c: i2c command write failure ESP_ERR_TIMEOUT
[0m
[0;31mE (31392) main:: I2C Timeout[0m
[0;32mI (32392) i2c: i2c command write failure ESP_ERR_TIMEOUT
[0m
[0;31mE (32392) main:: I2C Timeout[0m
[0;32mI (33392) i2c: i2c command write failure ESP_ERR_TIMEOUT
[0m
[0;31mE (33392) main:: I2C Timeout[0m
[0;32mI (34392) i2c: i2c command write failure ESP_ERR_TIMEOUT
[0m
[0;31mE (34392) main:: I2C Timeout[0m
[0;32mI (35392) i2c: i2c command write failure ESP_ERR_TIMEOUT
[0m
[0;31mE (35392) main:: I2C Timeout[0m
[0;32mI (36392) i2c: i2c command write failure ESP_ERR_TIMEOUT
[0m
[0;31mE (36392) main:: I2C Timeout[0m
[0;32mI (37392) i2c: i2c command write failure ESP_ERR_TIMEOUT
[0m
[0;31mE (37392) main:: I2C Timeout[0m
[0;32mI (38392) i2c: i2c command write failure ESP_ERR_TIMEOUT
[0m