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