Onomondo static profile with nrf9161 custom board not working

Hi,

I'm working with a custom board build with an nrf9161, I've created my board from nrf9161dk board (change some pin and defintion), I'm able to flash and build? I can use my custom led, my i2c bus, so I thought my custom board is well defined.

Right now I'm trying to use onomondo softsim profile, but ùy softsim never connect. To debug I've tried to do this here but same result not working. Just to know I have tried my source code with nordic nrf9160dk and it's working I'm able to have lte event and I can see my sim connected on onomondo, so the bug is not on my code...

Here is AT command I have tried :

[00:00*** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
[00:00:00.326,324] <inf> nrf_modem: Initializing libmodem 2.6.1-lte-11b6ed4846a8
[00:00:00.570,983] <inf> nrf_modem: RPC ready
[00:00:00.619,964] <inf> gcg: Waiting for LTE connect event.

> AT
OK
> AT+CEREG?
+CEREG: 5,4
OK
+CEREG: 2,"E29D","09891B07",7
[00:03:30.427,307] <inf> gcg: LTE cell changed: Cell ID: 159980295, Tracking area: 58013 //always got only this event only, and look strange this event take always some time to come..

> AT+CEREG?
+CEREG: 5,2,"E29D","09891B07",7  // should have +CEREG: 1,5 from onomondo tutorial
OK

> AT+CESQ
+CESQ: 99,99,255,255,16,58
OK

> AT+CEREG=1
OK
> AT+COPS?
+COPS: 0
OK
> AT+CGDCONT=1,"IP","onomondo"
OK
> AT+CGACT=1,1
ERROR

> AT+CGMR
mfw_nrf91x1_2.0.1
OK

I can upload my board definition, tell me. Don't understand why it's working on 9160dk and not on my board, maybe bad board definition, I hope it's not an hardware issue with my custom board

Thanks for help

Parents
  • Hello Simon,
    1. Your code works well when it is running on the nRF9160DK. Is it waiting for some event somewhere that is available on the kit but not on your custom board?
    2. The are you using log or debugging the device at the same time? What sort of steps are you reading out from the log as being completed? Are you seeing error messages there?
    3. A common challenge with new custom boards are often component and layout mismatch that compromise RF performance. Is the custom board packed into something? Are you able to share details about your custom board?
    Best regards
    Asbjørn
  • Thanks  

    1. Yes my code works well on nRF9160 DK. I can reach Onomondo, I can see my sim connected. On my custom board I have an issue I think about softsim, I get only this  LTE event after nothing

    [00:03:30.427,307] <inf> gcg: LTE cell changed: Cell ID: 159980295, Tracking area: 58013

    I also have this event on my DK board the difference is on my DK I got other event after. and this event come faster on my DK board.

    2. For debbuging I tried to do this from Onomondo. As I said above all comands works exept

    AT+CEREG=1

    I got an ERROR, and the result coming from

    AT+CEREG?

    returns

    +CEREG: 5,2,"E29D","09891B07",7

    and if i believe the Onomondo tutorial I should have the result +CEREG: 1,5.

    3. for my custom board, I was 98% inspired by the circuit dojo feather nrf9160, for the modem and LTE it's totally the same. The only difference is the nrf9161. To create my custom board I copied the nrf9161DK and change some pin definition.

    circuitdojo

    EDIT: after boot if I try this AT command AT+CEREG? return

    +CEREG: 5,4
    OK

    Onomondo said :

     
    The “x” in the x,4 or x,5 part indicates the URC status and is not important for this step.
    
    With Onomondo SIMs, you will always be roaming, which is why the response x,5 is always expected.


    But me, I always got 4 never 5 it's look like my nrf never roaming.
    If I'm waiting LTE_LC_EVT_CELL_UPDATE

    +CEREG: 2,"D2FD","09891C10",7
    [00:03:26.265,625] <inf> GCG_DNV: LTE cell changed: Cell ID: 159980560, Tracking

    And redo AT+CEREG? I got
    +CEREG: 5,2,"D2FD","09891C10",7
    OK

  • Hi Simon,
    I've had a little discussion with some others here and there was a couple of comments. 
    1. CEREG: 5,2 means "2 – Not registered, but UE is currently trying to attach or searching an operator to register to"

                It looks to me that device gets deregistered from the network after the cell change.

                He could try AT+CEREG=5 before AT+CGDCONT=1,"IP","onomondo"

    1. Which application is running on his board?

    2. Are you able to compare the logs from the nRF91 on both the DK and the Onomondo board? When do they differ in output?
    Best regards
    Asbjørn
Reply Children
  • Hi,

    I've tried AT+CEREG=5 before AT+CGDCONT=1,"IP","onomondo" without change, same error when I try AT+CGACT=1,1.

    My application is like the onomodo softsim static profil example here.

    The difference beetwen the code on my custom board and nrf9160dk is LTE event, for example here is the output on my DK (nrf9160dk_nrf9160_ns) with exactly the same code :

    *** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
    [00:00:00.350,646] <inf> GCG_DNV: Hello DNV!
    [00:00:00.639,923] <inf> GCG_DNV: Waiting for LTE connect event.
    
    +CEREG: 2,"9682","01628305",7
    [00:00:10.022,705] <inf> GCG_DNV: LTE cell changed: Cell ID: 23233285, Tracking area: 38530
    +CSCON: 1
    [00:00:10.088,348] <inf> GCG_DNV: RRC mode: Connected
    
    +CEREG: 5,"9682","01628305",7,,,"11100000","11100000"
    [00:00:15.484,436] <inf> GCG_DNV: Network registration status: Connected - roaming
    [00:00:15.484,619] <inf> GCG_DNV: LTE connected!
    
    [00:00:15.485,504] <inf> GCG_DNV: PSM parameter update: TAU: 3240, Active time: -1
    [00:00:15.488,739] <err> GCG_DNV: Opened device with return code -8
    +CSCON: 0
    [00:00:18.961,669] <inf> GCG_DNV: RRC mode: Idle

    As you can see the fisrt LTE event come quickly and I'm connected to LTE. And now the same code running on my custom board: (first and only one LTE event and take some time to come compare to DK)

    *** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
    [00:00:00.327,423] <inf> GCG_DNV: Hello DNV!
    [00:00:00.327,453] <inf> nrf_modem: Initializing libmodem 2.6.1-lte-11b6ed4846a8
    [00:00:00.584,747] <inf> nrf_modem: RPC ready
    [00:00:00.648,284] <inf> GCG_DNV: Waiting for LTE connect event.
    
    +CEREG: 2,"9682","01628305",7
    [00:03:27.493,621] <inf> GCG_DNV: LTE cell changed: Cell ID: 23233285, Tracking area: 38530

    The only difference I think is the modem firmware. On my custom board

    > AT+CGMR
    mfw_nrf91x1_2.0.1
    OK

    And on DK board

    > AT+CGMR

    mfw_nrf9160_1.3.5
    OK

    I would like to add modem trace but when I try to add CONFIG_NRF_MODEM_MOB_TRACE=y to my prj.conf I have an error when I build

    Existing handler 0x85cbb, new handler 0x85cbb
    Has IRQ_CONNECT or IRQ_DIRECT_CONNECT accidentally been invoked on the same irq multiple times?

    Maybe I have an issue with my custom board definition devicetree

    EDIT: just test with the last nrf modem fw for nrf9161 version 2.0.2 same result

    EDIT 2: ok I can build with CONFIG_NRF_MODEM_LIB_TRACE it was a conflict with CONFIG_NRF_MODEM_LIB_TRACE, but I'm not able to get some trace with cellular monitor, if I start the process I got :

    17:05:25.369
    Tried to send AT command to device, but no serial port is open
  • Hi Simon,
    So you have one nRF9160 DK and one nRF9161 SiP on your custom board with different mfw versions. 
    The modem trace documention:
    You were able to add the modem trace service, but how did you connect the trace output pins to the terminal? You can send AT commands directly to the modem FW, but the trace traffic raises an error? Is the error message you pasted into your previous reply the only output from the modem trace you get? Do you see or receive anything else from the modem trave interface?
    Are you building the onomondo application for the right device? If it works for nRF9160 are you building a different application for the custom board that contains the nRF9161? 
    The Onomondo softsim_static_profil works with the nRFG9160DK, it is the same application you are trying to run?
    Best regards
    Asbjørn
  • So you have one nRF9160 DK and one nRF9161 SiP on your custom board with different mfw versions

    Yes one nrf9160 DK board and one custom board with nrf9161 sip (inspired by circuit dojo feather nrf9160 design)

    service, but how did you connect the trace output pins to the terminal? You can send AT commands directly to the modem FW, but the trace traffic raises an error?

    I don’t know if I’m right but to activate the traces I only have to add the CONFIG_NRF_MODEM_LIB_TRACE, And output will come on uart? Should I do something else ? I’m using vscode and nrf plugin. My custom board look like very similar to circuit dojo feather nrf9160 (same uart pin, I2c,…) So for my uart I have the same wiring, using cp21 and USB port with pin P0.05/06 for UART on SIP.

    Yes I can send AT commands to my custom board over serial monitor. So if I sent AT via UART my board return OK.

    Are you building the onomondo application for the right device?

    yes I’m building for my custom board ans another build for DK board. All build are made on ns board version. 

    The Onomondo softsim_static_profil works with the nRFG9160DK, it is the same application you are trying to run?

    Yes exactly

  • Are you enabling the trace in the build configuration in NCS? See the "Snippets" section of the screen shot.

    With this and the UART connected to a terminal, you don't see any output on a serial terminal on either the DK nor your custom boards?

    Best regards

    Asbjørn

  • Thanks  

    Are you enabling the trace in the build configuration in NCS?

    I haven't add the snippet sorry. But now I got an error when I'm trying to compile for my custom board :

    devicetree error: 'pinctrl-0' is marked as required in 'properties:' in /opt/nordic/ncs/v2.5.0/zephyr/dts/bindings/serial/nordic,nrf-uarte.yaml, but does not appear in <Node /soc/peripheral@40000000/uart@9000 in '/opt/nordic/ncs/v2.5.0/zephyr/misc/empty_file.c'>

    However I've defined pinctrl-0 in my common dtsi file and declared uart0 in pinctrl file

    &pinctrl {
    	uart0_default: uart0_default {
    		group1 {
    			psels = <NRF_PSEL(UART_TX, 0, 6)>,
    				<NRF_PSEL(UART_RX, 0, 5)>;
    		};
    	};
    
    	uart0_sleep: uart0_sleep {
    		group1 {
    			psels = <NRF_PSEL(UART_TX, 0, 6)>,
    				<NRF_PSEL(UART_RX, 0, 5)>;
    			low-power-enable;
    		};
    	};
    
    	i2c1_default: i2c1_default {
    		group1 {
    			psels = <NRF_PSEL(TWIM_SDA, 0, 26)>,
    				<NRF_PSEL(TWIM_SCL, 0, 27)>;
    		};
    	};
    
    	i2c1_sleep: i2c1_sleep {
    		group1 {
    			psels = <NRF_PSEL(TWIM_SDA, 0, 26)>,
    				<NRF_PSEL(TWIM_SCL, 0, 27)>;
    			low-power-enable;
    		};
    	};
    
    	spi3_default: spi3_default {
    		group1 {
    			psels = <NRF_PSEL(SPIM_SCK, 0, 11)>,
    				<NRF_PSEL(SPIM_MOSI, 0, 9)>,
    				<NRF_PSEL(SPIM_MISO, 0, 28)>;
    		};
    	};
    
    	spi3_sleep: spi3_sleep {
    		group1 {
    			psels = <NRF_PSEL(SPIM_SCK, 0, 11)>,
    				<NRF_PSEL(SPIM_MOSI, 0, 9)>,
    				<NRF_PSEL(SPIM_MISO, 0, 28)>;
    			low-power-enable;
    		};
    	};
    }

    &uart0 {
    	status = "okay";
    	current-speed = <115200>;
    	pinctrl-0 = <&uart0_default>;
    	pinctrl-1 = <&uart0_sleep>;
    	pinctrl-names = "default", "sleep";
    };

    I'm not an expert with devicetree and zephyr custom board zephyr, should I've missed a configuration somewhere ? Can I use uart0 for trace because if I look in nrf91-modem-trace-uart/modem-trace-uart.overlay I see

    /* Enable uart1 for tracing. */
    &uart1 {
    	status = "okay";
    	current-speed = < 1000000 >;
    };
    
    / {
    	chosen {
    		nordic,modem-trace-uart = &uart1;
    	};
    };
    

    EDIT ; ok I've added an overlay to use uart0 and the snippet for trace modem. Now I got this error

    [00:00:01.209,625] <inf> nrf_modem: Initializing libmodem 2.6.1-lte-11b6ed4846a8
    [00:00:01.468,566] <inf> nrf_modem: RPC ready
    [00:00:01.468,933] <err> modem_trace_backend: Cannot set callback: -88
    [00:00:01.468,933] <err> nrf_modem_lib_trace: trace_backend: init failed with err: -14
    [00:00:01.468,963] <err> nrf_modem_lib_trace: Failed to initialize trace backend, err: -14
    [00:00:01.582,458] <inf> GCG_DNV: Waiting for LTE connect event.

Related