ncp host simple gateway connection problem

Hi

I've recently been working on the ncp host example provided by nordic. after downloading the standalone version from the site, I tried programming the 2 nRF 52840 dk boards of mine with the provided USB-communication firmware in the downloaded file. As it is mentioned in the user guide, there exist a test script procedure, which I followed  through. that is, I built a bulb application as a ZR on one board and a simple_gw application as ZC on the other. the log files of the both applications are provided in the attachments. for your information I use an ubuntu 21 on my VMware and my host os is windows 10. 

As I'm really new to this things, I can't be sure of the connections both between my ubuntu host and the boards and between the two nodes.it is appreciated if you can guide me through this. Do the provided log files confirm the connections? 

furthermore, I'd like to know what things I should expect as an output of this demonstration. will the provided expected outputs in the test script section be written on these same log files or there exist some other additional files which I can't find them or they are not being created, where these infos are written to.

In addition, is there a close relationship between ncp sample and the provided firmware? should building the ncp sample do the same thing as the provided standalone firmware? if  so, I'm also unable to build that ncp sample, too. it will be great to have your guidance in these problems.

thanks

p.s. : in the log files there exist some ERROR parts. these errors seem to be caused by the fact that I turned the corresponding board off and on. 

p.s.  I downloaded the standalone file from this link : developer.nordicsemi.com/.../ncp_host_v2.2.0.zip

bulb.txtsimple_gw.txt 

Parents Reply Children
  • hi dear sigurd,

    for some clarifications I followed these steps:

    1. I created a ncp application in vscode (nRF connect SDK v. 2.0.0)

    2. I created a build configuration 

    3. in the process of building the configuration for my nRF 52840 dk I got  this error:

    In file included from low_level/zbncp_mem.c:47:
    low_level/zbncp_debug.h:73:3: error: static assertion failed: "Static assertion failed"
       73 |   _Static_assert((cond), "Static assertion failed");
          |   ^~~~~~~~~~~~~~
    low_level/zbncp_mem.c:49:1: note: in expansion of macro ‘ZBNCP_DBG_STATIC_ASSERT’
       49 | ZBNCP_DBG_STATIC_ASSERT(sizeof(void*) <= sizeof(zbncp_uintptr_t))
          | ^~~~~~~~~~~~~~~~~~~~~~~
    make[1]: *** [../../src/Options:138: low_level/zbncp_mem.o] Error 1
    make[1]: Leaving directory '/root/nrf/src/ncp'
    make: *** [Makefile:69: bldall] Error 2

    4. I tried to add the path in the compiler settings as well as the Cmake file but there was no use do it.

    I gave up building the ncp application in  VSCode soon after I found the standalone ncphost zip files in the nordic site at the link I provided in this ticket.( as of now I call this standalone ncp host file as "X")

    5. I extracted X

    6. in X/ncp_fw directory there exist some binary firmware for supported boards. I used the nrf52840dk one with USB CDC ACM connection

    7. I programmed both of my nRF52840dk boards with the mentioned firmware by the use of this command:  

    nrfjprog –program ncp_fw/<firmware.usb> –chiperase –reset

    8. here I build the ZBOSS libraries and sample applications by the use of make command

    9.I used the built simple_gw application on one of the boards by this command:

    NCP_SLAVE_PTY=/dev/ttyACM0 ./application/simple_gw/simple_gw

    10. I used the built bulb application on the other board by this command:

    NCP_SLAVE_PTY=/dev/ttyACM1 ./application/light_sample/dimmable_light/bulb

    11. after that the terminals get blocked which means the applications are running. two log files are generated which I save them as a text file and uploaded them here next to this ticket : "bulb.txt" for bulb and "simple_gw.txt" for simple_gw

    12. at the first glance it seems ok and the applications are running but the thing is neither of the LEDs on neither of the boards even turns on for even a single time let alone blinking etc.

    here is some of my questions:

    1.  in both of the log files, after initialization process, there exist some TX, RX status. what are these two refer to. is TX my computer and RX the boards? or is the TX simple_gw board and RX the bulb board?

    2. next to these TX, RX status there is time out part with a really large number ( it seems an overflow occurred ) is that normal?

    3. then there is a "ACK size" part which is set to zero. is that normal??

    4. why didn't any of the LEDs blink?

    5. when I turn the bulb board off and then on with the physical switch on the board, nothing printed in the simple_gw log file. should something get printed here? the bulb log file prints error indicating the board gets disconnected, though.

    6.  when I turn the simple_gw board off and then on with the physical switch on the board, nothing printed in the bulb log file. should something get printed here? the simple_gw log file prints error indicating the board gets disconnected, though.

    7. I added a single line of code to the simple_gw application code:

    zb_uint32_t firmw = ncp_host_get_firmware_version();
    printf("%u \n", firmw);

    and then it prints 0. could a firmware version really be 0?

    my observation is that there is a connection problem;  Either the connection between my computer and the board or the connection between the two boards can't be established well. other possibility is that either of the firmware or the application source files have problem which seems rather strange. 

    I'd be happy if you guide me through the parts I did wrong.

    regards

    farbod

  • Hi,

    Seems like something went wrong in your SDK install. I would recommend checking out v.2.1.0, and use the latest Toolchain Manager to install it.

Related