Reboot Reason, how to?

Hello,
is it possible to get in some file… some sort of dump or the reboot reason?
i can see in cm info a very simpple user request as reason… but i cant understand why the system is rebooting/crashing
I’m developing on mangoh yellow.

Regards,
Gianmaria

…also…

this is my cm info:
Device: WP7702
IMEI: 352653090194176
IMEISV: 5
FSN: 4L931388970810
Firmware Version: SWI9X06Y_02.35.02.00 5208b3 jenkins 2020/06/10 00:30:12
Bootloader Version: SWI9X06Y_02.35.02.00 5208b3 jenkins 2020/06/10 00:30:12
MCU Version: 002.014
PRI Part Number (PN): 9909138
PRI Revision: 001.001
Carrier PRI Name: SIERRA
Carrier PRI Revision: 001.036_001
SKU: 1104405
Last Reset Cause: Power Down
Resets Count: Expected: 251 Unexpected: 0

I read a reset counts to 251 but 0 unexpected… so i think this is not kernel or system error…

this are the apps with status running at moment:

[running] NtagDhubIf
[running] atAirVantage
[running] atQmiLinker
[running] atService
[running] audioService
[running] avcService
[running] battery
[running] bluetoothServices
[running] button
[running] buzzer
[running] cellNetService
[running] dataConnectionService
[running] dataHub
[running] environment
[running] fwupdateService
[running] gpioService
[running] imu
[running] modemService
[stopped] ntag
[running] portService
[running] positioningService
[running] powerMgr
[running] qmiAirVantage
[running] secStore
[stopped] smsInboxService
[stopped] spiService
[stopped] tools
[running] vegasMode
[stopped] voiceCallService
[running] wifiService
[running] locMonitor (my app).

Maybe some app is issuing a restart and i cant see it??? In logread -f i cant read anything… just a brutal reboot.

I’m using the network too (2G), so first think i focused on was the current, so i attached a powerbank (2.4 A out) to the usb port to give a stable alim. But problem is still here…

I’ve looked in /var/log/ but there isnt nothing here i can use.

Any suggest is super appreciated.

Gianmaria

Do you see anything in the uart console?
If it reboots suddenly without any message, probably this is related to insuffient current or voltage.

Upgrading modem firm to WP77xx Firmware Release 14.1, seems solved the problem. Indeed my problems started when i start transimission over a socket and network is low.

Naturally… not everything is “free”… after this update… my GPIO21 wont come up to signal movement… same code… different firmware… no more alert on movement. Some ideas about it?

Gian

What is the return of
At+wiocfg?

You can check whether gpio21has been set to usable in linux correctly

Modem Command produces this output:

AT
OK
At+wiocfg?
+WIOCFG: 2,16,0,0,1,0,0
+WIOCFG: 4,3,0,0,1,0,0
+WIOCFG: 6,0,0,0,1,0,0
+WIOCFG: 7,16,0,0,1,0,0
+WIOCFG: 8,16,0,0,1,0,0
+WIOCFG: 13,16,0,0,1,0,0
+WIOCFG: 21,16,0,0,1,0,0
+WIOCFG: 22,16,0,0,1,0,0
+WIOCFG: 23,16,0,0,1,0,0
+WIOCFG: 24,16,0,0,1,0,0
+WIOCFG: 25,16,0,0,1,0,0
+WIOCFG: 28,16,0,0,1,0,0
+WIOCFG: 29,16,0,0,1,0,0
+WIOCFG: 30,16,0,0,1,0,0
+WIOCFG: 31,16,0,0,1,0,0
+WIOCFG: 32,16,0,0,1,0,0
+WIOCFG: 33,16,0,0,1,0,0
+WIOCFG: 35,16,0,0,1,0,0
+WIOCFG: 42,16,0,0,1,0,0

OK

In linux it’s correctly exported and…
root@swi-mdm9x28-wp:~# cat /sys/class/gpio/gpio21/direction
in
root@swi-mdm9x28-wp:/sys/devices/1000000.pinctrl/gpio/gpio21# cat active_low
0
root@swi-mdm9x28-wp:/sys/devices/1000000.pinctrl/gpio/gpio21# cat edge
both

Maybe i’ve to enable something on AT?
Regards + thanks,
gian

Is /sys/class/gpio/gpio21/value aligning with signal movement?

Do you recompile your app with wp77 r14.1 package?

If i move the device and at same time read value… it doesnt change… it remains 1. Before update it worked changing from 0 to 1 and so on based on movement.

What do you mean by “recompile your app with wp77 r14.1 package” ?

See image… that’s all i’ve done about compile…

Gian

If "cat /sys/class/gpio/gpio21/value " does not work probably you don’t need to test legato api …

Btw does gpio output work?

You might check if this is fw regression.
E.g. does problem happen in r13 r12

I’ve triend to downgrade to r13 qnd r12 but it’s the same… is there a know gpio for example for leds i can try to change manually with echo exporting in linux? My board is mangoh yellow.

gian

I found on my system i dont have the BMI160 drivers working… i dont have anything about accel/gyro under

/sys/bus/i2c/devices/

How can i load the driver now? :(:frowning:

gian

That is why I suggest you to manually change state of GPIO21 and see if the state of "cat /sys/class/gpio/gpio21/value " changed.

BTW, you need to build mangoh yellow layer for the BMI driver

Everything right… yellow recompiled and system works perfectly.
How can i say thank you jyijyi ???

my best regards
Gianmaria

Finally I’m at a clear point. My app uses network communication in intensive mode (c socket). If i use latest WP77xx Firmware Release 14.1, everything goes ok, i can work with network without any problem but with this firmware i dont have access to BMI160 driver, my accelerometer doesent work..
On the other side if i use latest mangoH build, all operations following this link:

I have accelerometer working, but an unstable system. During network operations it reboots without cause and without any visible (or logged) error.

So i think i have to start from firm 14.1 and add support for BMI160 (kernel drivers to enable?). NAturally i dont need all the OCTANE stuff at all.
Any hint on how to create a version of 14.1 with BMI160 Accel support?

Regards,
Gianmaria

you can use leaf to download SDK swi-wp77_5.0.1 which is using FW 14.1.
After that you can download the mangoh source and compile it inside the leaf shell.

More or less just the same as the instruction here:

thanks… but I see as latests:

mangOH-yellow-wp77xx_0.7.0 │ mangOH yellow wp77xx (Modem=R13, Legato=19.11.3-1-g8c030edad, Octave=3.1.0-mangOH-0) │ latest,installed,mangOH,yellow,Octave,wp77xx

This is modem firmware version R13? Or not…

this are all my choices:
mangOH-yellow-wp76xx_0.7.0 │ mangOH yellow wp76xx (Modem=R16, Legato=19.11.3-1-g8c030edad, Octave=3.1.0-mangOH-0) │ latest,mangOH,yellow,Octave,wp76xx │
│ mangOH-yellow-wp77xx_0.2.3 │ SDK for mangOH yellow with wp77xx, based on Legato version 19.07.0 and wp77xx release 12 │ installed,mangOH,yellow,wp77xx,Octave │
│ mangOH-yellow-wp77xx_0.3.0 │ SDK for mangOH yellow with wp77xx, based on Legato version 19.10.0 and wp77xx release 12 │ mangOH,yellow,wp77xx,Octave │
│ mangOH-yellow-wp77xx_0.4.0 │ SDK for mangOH yellow with wp77xx, based on Legato version 19.10.1 and wp77xx release 12 │ mangOH,yellow,wp77xx,Octave │
│ mangOH-yellow-wp77xx_0.5.0 │ SDK for mangOH yellow with wp77xx, based on Legato version 19.11.0 and wp77xx release 12 │ mangOH,yellow,wp77xx,Octave │
│ mangOH-yellow-wp77xx_0.6.0 │ SDK for mangOH yellow with wp77xx, based on Legato version 20.04.0 and wp77xx release 12 │ mangOH,yellow,wp77xx,Octave │
│ mangOH-yellow-wp77xx_0.7.0 │ mangOH yellow wp77xx (Modem=R13, Legato=19.11.3-1-g8c030edad, Octave=3.1.0-mangOH-0) │ latest,installed,mangOH,yellow,Octave,wp77xx

None of them is based on r14 …,

I see… This is a big trouble indeed. Any idea? Maybe the Accel is not working cause device tree simply missing the declaration… Don’t know, really how to go ahead.

Why don’t you use swi-wp77_5.0.1 which is using FW 14.1?

Sorry, I misunderstood your previous answer. I used swi-wp77_5.0.1 and now I’m in this condition:

Device: WP7702
IMEI: 352653090194176
IMEISV: 6
FSN: 4L931388970810
Firmware Version: SWI9X06Y_02.36.06.00 63d944 jenkins 2020/12/10 19:12:28
Bootloader Version: SWI9X06Y_02.36.06.00 63d944 jenkins 2020/12/10 19:12:28
MCU Version: 002.015
PRI Part Number (PN): 9909138
PRI Revision: 001.001
Carrier PRI Name: GENERIC
Carrier PRI Revision: 001.071_001
SKU: 1104405
Last Reset Cause: Reset, User Requested
Resets Count: Expected: 317 Unexpected: 0
root@swi-mdm9x28-wp:~# uname -r
3.18.140
root@swi-mdm9x28-wp:~# legato version
19.11.3-1-g8c030edad_b767d8aec6f54e3de675ad4d08970d8d_modified

Am I running the right modem firmware? I’ve a dubt on legato version… It seems not be updated to 19.11.5. Maybe I’m missing some steps on updating the legato framework?

Regards,
Gianmaria