How to solve socket -23 error while creating multiple server in nRF9160

Hi Support team,

I am  using nRF9160 module and i want run two server on the module, one is modbus server and other is CoAP server. so is it possible to run both server simultaneously ?

Thanks,

Dvl

  • Hi Dejan Simonovic,

    "<inf> main: RSP : +CEREG: 0,2, ..." this log means you are not registered into network, please insert good SIM, that has good network coverage around your place.

    Thanks,

    Dvl

  • Hi Dvl,

    With the latest version of your project (for any SIM) there seems to be no registration to the network. With the previous iteration of your project, I was able to get "+CEREG: 0,1, ..." similar to what you showed in your previous log.

    Best regards,
    Dejan

  • Hi Dejan Simonovic,

    will you please do power cycle of DK and flash same version code again and check if it might work.!!

    I have Just tested following latest code and its working CoAPAndTCPServer_v0.1.zip

     

    Thanks,

    Dvl

  • Hi Dvl,

    I have tested again with your latest code. Pressing Reset button on the nrf9160-dk board does not change the output for me. In other words, it is "+CEREG: 0,2, ...". However, when I power cycle the nrf9160-dk board I get ZEPHYR FATAL ERROR shown below.


    Using adddr2line on the faulting address

    ncs\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin> arm-zephyr-eabi-addr2line.exe -e <path_to_your_project>\build\zephyr\zephyr.elf 0x0001de7e

    gives the following output
    C:/Users/desi/ncs/v2.6.0/zephyr/lib/libc/newlib/libc-hooks.c:469

    Can you replicate this on your nrf9160-dk when you power off/on the device?

    Dvls said:
    I have Just tested following latest code and its working

    Can you provide information how it works in your case? Is it working as expected or still gives "<err> main: error: accept: 23, -1"?

    Best regards,
    Dejan

  • Hi Dejan Simonovic,

    1. Working means SIM registrations is working. but i am still getting following error "<err> main: error: accept: 23, -1" .

    2. Will you please provide me the APN of your SIM ? or just replace apn string (apn.static.bell) with your SIM apn in code. i have shared you, updated version v0.2 below. and then try, it might worked now !!


    CoAPAndTCPServer_v0.2.zip

    3. Please share log of AT+CGDCONT? FYI, I have added it, in v0.2 for debug purpose, it will now log every 1 second with network status read command. 

    Thanks,

    Dvl

Related