This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF8001 setup issues

Hello,

I am sending below setup packet to nRF8001, and i don't get any response form nRF8001. ACI as such works fine, i tried sending diff commands and able to receive response, but when i send below packet which i copied from ublue_setup.gen.out.txt, no response. Please help...

0x07,0x06,0x00,0x00,0x03,0x02,0x42,0x07.

  • Can you elaborate on the method you used to verify the ACI. I would suggest that you use the ACI transport layer verification project as a start point github.com/.../ble_aci_transport_layer_verification

  • I am using PIC controller as application controller, am packing the ACI packets and sending over SPI and receving the responses also correctly.

    On power up am receiving device started event, in which the operating mode is "2" which means setup mode. So i took the data generated by gostudio and am trying to send the below packets oen by one continuously without waiting for response, and am expecting success response at the end of last packet, but i received 0x83 response. Why is that am not able to setup nRF8001?

    the packets am sending are

    unsigned char setup1[8] = {0x07,0x06,0x00,0x00,0x03,0x02,0x42,0x07};

    unsigned char setup2[32] = {0x1F,0x06,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00, 0x06,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

    unsigned char setup3[32] = {0x1F,0x06,0x10,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x03,0x90,0x00,0xFF};

    unsigned char setup4[32] = {0x1F,0x06,0x10,0x38,0xFF,0xFF,0x02,0x58,0x0A,0x05,0x00,0x00,0x00,0x10,0x00,0x00,0x00, 0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00};

    unsigned char setup5[6] = {0x05,0x06,0x10,0x54,0x00,0x00};

    unsigned char setup6[32] = {0x1F,0x06,0x20,0x00,0x04,0x04,0x02,0x02,0x00,0x01,0x28,0x00,0x01,0x00,0x18,0x04,0x04, 0x05,0x05,0x00,0x02,0x28,0x03,0x01,0x02,0x03,0x00,0x00,0x2A,0x04,0x04,0x14};

    unsigned char setup7[32] = {0x1F,0x06,0x20,0x1C,0x05,0x00,0x03,0x2A,0x00,0x01,0x52,0x61,0x67,0x68,0x75,0x63,0x73, 0x65,0x6D,0x69,0x2E,0x63,0x6F,0x6D,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04};

    unsigned char setup8[32] = {0x1F,0x06,0x20,0x38,0x05,0x05,0x00,0x04,0x28,0x03,0x01,0x02,0x05,0x00,0x01,0x2A,0x06, 0x04,0x03,0x02,0x00,0x05,0x2A,0x01,0x01,0x00,0x00,0x04,0x04,0x05,0x05,0x00};

    unsigned char setup9[32] = {0x1F,0x06,0x20,0x54,0x06,0x28,0x03,0x01,0x02,0x07,0x00,0x04,0x2A,0x06,0x04,0x09,0x08, 0x00,0x07,0x2A,0x04,0x01,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0xFF,0xFF,0x04,0x04};

    unsigned char setup10[14] = {0x0D,0x06,0x20,0x70,0x02,0x02,0x00,0x08,0x28,0x00,0x01,0x01, 0x18,0x00};

    unsigned char setup11[7] = {0x06,0x06,0xF0,0x00,0x83,0xE2,0x04};

  • and also i have one more question. How can i instruct to save setup data in NVM or RAM? when i see contents of services.h and services_lock.h, both look same

  • Each setup message will generate a command response event which needs to be processed, which appears to be your mis-understanding. See section 24 of the nRF8001 data sheet for the setup command.

    All command responses for the setup will carry the Transaction_continue except the last command response which will have Transaction_complete as the status code. The status codes are listed in the appendix of the nRF8001 datasheet.

    A status of 0x83 means device state is invalid.

    Action: Send a trace of the aci commands and events from chip reset time If that is not possible can you get an SPI capture with an logic analyzer ?

    For placing the Setup in NVM look at these posts

    devzone.nordicsemi.com/.../

    devzone.nordicsemi.com/.../

    [Edited] I notice that you are using the setup format for a C version IC on a D version IC. This will work, but you will lose some features. I suggest that you select the D version in the pulldown in nRFgo studio. nRFgo Studio -> nRF8001 configuration -> Device pulldown

    I suggest that you still take a look at the porting guide for the nRF8001 so you do not miss any of the steps.

    Since you have received the ACI Device Started Event, it looks like the MISO path is ok, but you need to verify the MOSI path. I would suggest that you verify the ACI as suggested in the porting guide and then do the Setup.

  • Hi,

    Thanks for the reply. Unfortunately i dont have way to collect traces. It's through debugging, am looking at the responses received by the NRF8001.

    If i send only first packet of setup and wait for response, the NRF8001 is never sending response.

Related