This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[Z-Stack Linux Gateway] initialize fail on MIPS platform

Other Parts Discussed in Thread: Z-STACK

hi all,

I have done to sign SLA and got full HA-Gateway source and build for ARM-Based/MIPS-based platform successfully.

But my problem is that NWK daemon(NWKMGR_SRVR_xxx) can't receive any frames from the start_application(main.bin) on the new porting QCA MIPS-based platform.

Can you share any relative porting experiments for me?

Originally, it work fine on QCA ARM-based platform with LITTLE-Endian, but the new QCA MIPS-based platform is BIG-Endian.

Thank you.

  • Can you please provide some more information to help diagnose this issue.

    - Are the servers running correctly, i.e. after calling ./zigbeeHAgw do you eventually see:

    ===================================================
    tracking 4 pids, 2061 2074 2100 2113
    when we see something missing we will send a SIGUSR2 to pid 1976

    - After running the start_application do you see a connection in /servers/NpiLnxLog.txt:

    root@beaglebone:/z-stack_linux_gateway_arm_binaries/servers# cat NpiLnxLog.txt
    [Thu May 15 02:25:18 201] Connected to #5.(127.0.0.1 / ::48e8:92be:90e8:92be). Error: 00000000
    [Thu May 15 02:26:28 201] Connected to #5.(127.0.0.1 / ::48c8:e5be:90c8:e5be). Error: 00000000
    [Thu May 15 02:23:48 201] Connected to #5.(127.0.0.1 / ::48f8:ddbe:90f8:ddbe). Error: 00000000
    [Thu May 15 02:20:01 201] Connected to #5.(127.0.0.1 / ::4858:b8be:9058:b8be). Error: 00000000
    [Thu May 15 02:23:31 201] Connected to #5.(127.0.0.1 / ::38e8:a1be:80e8:a1be). Error: 00000000
    [Thu May 15 02:21:09 201] Connected to #5.(127.0.0.1 / ::4858:ecbe:9058:ecbe). Error: 00000000
    [Thu May 15 02:25:33 201] Connected to #5.(127.0.0.1 / ::4878:c2be:9078:c2be). Error: 00000000
    root@beaglebone:/z-stack_linux_gateway_arm_binaries/servers#

    - Are you running zigbeeHAgw and start_application via a local socket on a MIPS machine, or are you running servers and ARM and Demo Application on MIPS?

    Regards,
    TC.
  • hi TC.

    I have resolved this issue.

    The root-cause is two-bytes length endian convert error in QCA MIPS BIG-Endian platform, ex:
    // Length field endianness conversion to little endian
    hdr->lenL = (uint8) len;
    hdr->lenH = (uint8)( len >> 8 );

    I change two byte length field to uint16 and use standard htons()/ntohs() to convert:
    hdr->len = htonl(len);

    Thank you.