How to resolve a build error in Zephyr while building the Edge Impulse precompiled sample for Thingy 53.

Hi

I was working on an application sample for some days named "Machine learning" which is located at nrf/application, but facing a huge amount of issues connecting the board to edge impulse studio.

So while searching for the answer I found  https://devzone.nordicsemi.com/f/nordic-q-a/93706/nrf-edge-impulse/394830 this ticket, and in this ticket, they have given "edge impulse precompiled for thingy53", link of that is https://github.com/edgeimpulse/firmware-nordic-thingy53 

1. Should I need to use this sample instead of a machine learning sample for working with edge impulse?

I have downloaded and tried to create a build using this sample, but I am facing a build error 

D:/firmware/zephyr/drivers/ipm/ipm_nrfx_ipc.c: In function 'vipm_nrf_0_set_enabled':
D:\firmware\zephyr\include\devicetree.h:305:40: error: 'DT_N_INST_0_nordic_nrf_ipc_IRQ_IDX_0_VAL_irq' undeclared (first use in this function)

D:/firmware/zephyr/drivers/ipm/ipm_nrfx_ipc.c: In function 'gipm_init':
D:\firmware\zephyr\include\devicetree.h:305:40: error: 'DT_N_INST_0_nordic_nrf_ipc_IRQ_IDX_0_VAL_priority' undeclared (first use in this function)

I have not made any changes to the sample and I am unsure why this error is occurring in the default sample.

Can you help me resolve this issue?

Parents
  • Hello, 

    So while searching for the answer I found  https://devzone.nordicsemi.com/f/nordic-q-a/93706/nrf-edge-impulse/394830 this ticket, and in this ticket, they have given "edge impulse precompiled for thingy53", link of that is https://github.com/edgeimpulse/firmware-nordic-thingy53 

    1. Should I need to use this sample instead of a machine learning sample for working with edge impulse?


    The Thingy:53 comes pre-installed with the firmware to work with the nRF Edge Impulse app for iOS and Android. This is the Edge Impulse (edge_impulse_1.0.0_thingy53_nrf5340.zip) found in the precompiled package found under the downloads tab for Thingy:53 product page.

    I was working on an application sample for some days named "Machine learning" which is located at nrf/application, but facing a huge amount of issues connecting the board to edge impulse studio.

    In order to connect this sample to the Edge Impulse Studio you will need to forward data using Edge Impulse own data forwarder. To forward the collected data using Edge Impulse’s data forwarder, you must install the Edge Impulse CLI. See Edge Impulse CLI installation guide for instructions. When building the nRF Machine Learning application for Thingy:53 is requires to use NUS to communicate with an additional development kit that is able to run the Bluetooth: Central UART sample.

    Please see Data Forward Requirements for more information.

    Kind regards,
    Øyvind

  • The Thingy:53 comes pre-installed with the firmware to work with the nRF Edge Impulse app for iOS and Android. This is the Edge Impulse (edge_impulse_1.0.0_thingy53_nrf5340.zip) found in the precompiled package found under the downloads tab for Thingy:53 product page.

    I know, I have heard this many times, but it is actually different in practical

    The already flashed thingy53 is having different hex in it 

    and this precompiled is different, I have tested it. The LEDs are not showing the same behaviour as well as the edge impulse code from the downloaded precompiled code is not even advertising

    In order to connect this sample to the Edge Impulse Studio you will need to forward data using Edge Impulse own data forwarder. To forward the collected data using Edge Impulse’s data forwarder, you must install the Edge Impulse CLI. See Edge Impulse CLI installation guide for instructions. When building the nRF Machine Learning application for Thingy:53 is requires to use NUS to communicate with an additional development kit that is able to run the Bluetooth: Central UART sample.

    .

    I have completed all the steps as described in the https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/machine_learning/README.html

    As well as followed this https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_edge_impulse.html#adding-edge-impulse-model-to-the-ncs

    https://docs.edgeimpulse.com/docs/development-platforms/officially-supported-mcu-targets/nordic-semi-thingy53#updating-the-firmware

    But nothing works for me.
    The error on cmd when I run edge-impulse-daemon is indicating that I am not able to provide the API key, device ID, and device type. 

    And can you please help me in resolving that error too?

  • When I tried to fire the command "edge-impulse-daemon", the following messages and errors came up.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    Microsoft Windows [Version 10.0.22621.1105]
    (c) Microsoft Corporation. All rights reserved.
    C:\Users\sachi>edge-impulse-daemon
    Edge Impulse serial daemon v1.17.0
    Endpoints:
    Websocket: wss://remote-mgmt.edgeimpulse.com
    API: https://studio.edgeimpulse.com
    Ingestion: https://ingestion.edgeimpulse.com
    ? Which device do you want to connect to? COM17 (Microsoft)
    [SER] Connecting to COM17
    [SER] Serial is connected, trying to read config...
    [SER] Retrieved configuration
    [SER] Device is running AT command version 1.0.0
    Setting upload host in device...Error while setting up device Error: Failed to set upload host: p
    at EiSerialProtocol.setUploadHost (C:\Users\sachi\AppData\Roaming\npm\node_modules\edge-impulse-cli\build\shared\daemon\ei-serial-protocol.js:298:19)
    at async setupWizard (C:\Users\sachi\AppData\Roaming\npm\node_modules\edge-impulse-cli\build\cli\daemon.js:601:17)
    at async SerialConnector.connectLogic (C:\Users\sachi\AppData\Roaming\npm\node_modules\edge-impulse-cli\build\cli\daemon.js:478:17)
    [SER] Cannot connect to remote management API using daemon, failed to read apiKey, deviceId or deviceType from device. Restarting your development board might help. Retrying in 5 seconds...
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    But I have already added the API key as cmake argument, and changed the project ID on the URI as well.

Reply
  • When I tried to fire the command "edge-impulse-daemon", the following messages and errors came up.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    Microsoft Windows [Version 10.0.22621.1105]
    (c) Microsoft Corporation. All rights reserved.
    C:\Users\sachi>edge-impulse-daemon
    Edge Impulse serial daemon v1.17.0
    Endpoints:
    Websocket: wss://remote-mgmt.edgeimpulse.com
    API: https://studio.edgeimpulse.com
    Ingestion: https://ingestion.edgeimpulse.com
    ? Which device do you want to connect to? COM17 (Microsoft)
    [SER] Connecting to COM17
    [SER] Serial is connected, trying to read config...
    [SER] Retrieved configuration
    [SER] Device is running AT command version 1.0.0
    Setting upload host in device...Error while setting up device Error: Failed to set upload host: p
    at EiSerialProtocol.setUploadHost (C:\Users\sachi\AppData\Roaming\npm\node_modules\edge-impulse-cli\build\shared\daemon\ei-serial-protocol.js:298:19)
    at async setupWizard (C:\Users\sachi\AppData\Roaming\npm\node_modules\edge-impulse-cli\build\cli\daemon.js:601:17)
    at async SerialConnector.connectLogic (C:\Users\sachi\AppData\Roaming\npm\node_modules\edge-impulse-cli\build\cli\daemon.js:478:17)
    [SER] Cannot connect to remote management API using daemon, failed to read apiKey, deviceId or deviceType from device. Restarting your development board might help. Retrying in 5 seconds...
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    But I have already added the API key as cmake argument, and changed the project ID on the URI as well.

Children
  • Hello, 

    Using the out-of-box configuration of nRF Machine Learning, built for the Thingy:53 and connecting it to my nRF52840DK running Bluetooth: Central UART, I get the following output when connecting to Edge Impulse

    Note that I have tested the connection in the background to a PuTTy terminal to verify data. This is enabled by long pressing the button on the Thingy:53 putting it in Data Forwarder modus.

    Do you have a user on Edge Impulse Studio? If so, do you have a project to where you have collected data and trained your model? Adding the API in your project should download this model and add to your project.


    What version of nRF Connect SDK are you running?

    Kind regards,
    Øyvind

  • I get the following output when connecting to Edge Impulse

    Fabulous, This is what I want. 

    Okay, now I know what will be successful connectivity will look like.

    Please help me more by by sharing

    1. What are the complete steps or add on you have done in the default sample, so that you are not facing the error like API key, deviceID and devicetype.

    2. Please share your prj.conf, and show me the actual line what you have passed as an cmake argument for API key(you can make this ticket private in order to share the confidential  data but I need the actual thing)

    Do you have a user on Edge Impulse Studio?

    Yes, I have and it is private account.

    If so, do you have a project to where you have collected data and trained your model?

    Yes, I named it as 

    What version of nRF Connect SDK are you running?

    ncs v1.9.1

    This is what I get when I tried 

    Your assistance would be greatly valued.

  • Hi, can you please respond fast

  • Hello, 

    sachinrawat said:
    1. What are the complete steps or add on you have done in the default sample, so that you are not facing the error like API key, deviceID and devicetype.

    I built the application following the documentation. No alteration done to the application. 

    sachinrawat said:
    2. Please share your prj.conf, and show me the actual line what you have passed as an cmake argument for API key(you can make this ticket private in order to share the confidential  data but I need the actual thing)

    Please see your applicaiton.

    sachinrawat said:
    ncs v1.9.1

    I used v2.2.0. Is there a reason for using v1.9.1?

    -Øyvind

  • Hi  
    This is a very disappointing answer from a senior resource person.

    I built the application following the documentation. No alteration done to the application. 

    I understand you have followed the documentation, but don't you think that I must also have followed the documentation?
    I understand that there is something that I misinterpret from your documentation that must be you have interpreted correctly. That is why I ask you a favour to tell me for steps.

    Please see your applicaiton.

    I asked you for prj.conf as well as to share what you have provided in cmake argument for API key in actual, and you have answered this.

    BTW Can you tell me what to write in the  -DEI_API_KEY_HEADER:STRING="x-api-key:aadajsjdhdjf"   exactly, by looking at the below image?

    I used v2.2.0. Is there a reason for using v1.9.1?

    As my other project is working on ncs1.9.1 so I choose this version for the machine learning project also.

    I have downloaded and tested using v2.2.0, but still facing the same issues.