Serial1LogHandler logs to the hardware TX pin, not the USB serial port.
If you use SerialLogHandler (not Serial1), then the USB serial port will be used, but you can’t get the detailed trace information for the cellular modem.
In order to get detailed trace information from the modem over USB serial you need to build a monolithic debug build, which can only be done with the gcc-arm toolchain or Particle Workbench.
Could you please give some key in order to build a monolithic debug?
I have installed Particle Workbench, and currently I’m modifying directly the device-os that I downloaded from Particle Workbench (I’m not sure if there are any better way), but this isn’t working (a lot of building errors like “this is not a git repository”).
I have followed the instructions from @rickkas7(this post) and I managed to build a sample with debug using my custom connection.
This is the output I got:
0000005999 [ncp.at] TRACE: > AT+CGDCONT=1,"IP",""
0000006040 [ncp.at] TRACE: < OK
0000006041 [ncp.at] TRACE: > AT+CEREG=2
0000006090 [ncp.at] TRACE: < OK
0000006091 [hal] TRACE: NCP connection state changed: 1
0000006093 [net.pppncp] TRACE: NCP event 2
0000006094 [net.pppncp] TRACE: State changed event: 1 > 0000006095 [ncp.at] TRACE: > AT+COPS=1,2,"21401"
0000006096 [hal] TRACE: PPP thread event LOWER_DOWN > Serial connection closed. Attempting to reconnect...
Serial monitor opened successfully:
0000000404 [hal] TRACE: Cellullar Config -- APN: USER: PASS:
0000000429 [hal] TRACE: Updated file: /sys/cellular_config.bin
0000000458 [system.nm] INFO: State changed: DISABLED -> IFACE_DOWN
0000000461 [system.nm] INFO: State changed: IFACE_DOWN -> IFACE_REQUEST_UP
0000000462 [hal] TRACE: PPP netif -> 8
0000000463 [net.ifapi] INFO: Netif pp3 state UP > 0000000465 [system.nm] INFO: State changed: IFACE_REQUEST_UP -> IFACE_UP
0000001026 [sys.power] TRACE: Battery state CHARGED -> DISCONNECTED > 0000002388 [hal] TRACE: Modem powered off
0000002388 [hal] TRACE: Powering modem on
0000002540 [hal] TRACE: Modem powered on
The modification of device-os I have done is this: from sara_ncp_client.cpp, function registerNet(), line 807 (release v0.8.0-rc.27) I have replaced
r = CHECK_PARSER(parser_.execCommand(3 * 60 * 1000, "AT+COPS=0"));
to
r = CHECK_PARSER(parser_.execCommand(3 * 60 * 1000, "AT+COPS=1,2,"21401""));
NB-IoT vodafone Spain network doesn't use apn, user and password and this is shown in the log. But later the serial connection resets, and we don't know if this is a normal behaviour or not (we don't have any other SIM card to try).
Apparently after a while, the network connection is up but then the modem power off and we don't know why.
It is not possible to use the Boron LTE in LTE Cat NB1 (NB-IoT) mode. Only LTE Cat M1 is supported, and is only recommended in the United States, Canada, and Mexico using the built-in Particle SIM.