Difference between revisions of "Debugging"

From MOD Wiki
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
Assuming the unit is able to boot and you have SSH access, the following can be used for dumping information about the unit.
 
Assuming the unit is able to boot and you have SSH access, the following can be used for dumping information about the unit.
  
<code>
+
<pre>
 
sshpass -p mod ssh -o StrictHostKeyChecking=no root@192.168.51.1 "journalctl -m" > syslogs.txt
 
sshpass -p mod ssh -o StrictHostKeyChecking=no root@192.168.51.1 "journalctl -m" > syslogs.txt
</code>
+
</pre>
  
 
=== UART debug ===
 
=== UART debug ===
  
By opening the unit it is possible the locate RX/TX/GND pins on the bottom-board of the unit.
+
By opening the unit it is possible the locate RX/TX/GND pins on the bottom-board of the unit.<br>
 
You can solder pins to these holes in order to read and write to the UART console.
 
You can solder pins to these holes in order to read and write to the UART console.
  
Note that the HMI (device controller) makes uses of this UART interface for a few of its operations, so it will misbehave if you connect something to the TX pin (as this blocks the HMI side from sending data).
+
Note that the HMI (device controller) makes uses of this UART interface for a few of its operations, so it will misbehave if you connect something to the TX pin (as this blocks the HMI side from sending data).<br>
 
Connecting to TX and GND is safe, which allows the HMI to keep working and for us to still listen/read the UART debug logging.
 
Connecting to TX and GND is safe, which allows the HMI to keep working and for us to still listen/read the UART debug logging.
  
Line 30: Line 30:
 
sync; hmi-reset; reboot
 
sync; hmi-reset; reboot
 
</pre>
 
</pre>
 +
 +
The kernel logs will now be sent to the console, allowing to monitor any kernel/boot issues via UART.

Latest revision as of 09:55, 10 July 2023

This page describes how to debug an issue with your MOD unit. Contents apply to both Duo X and Dwarf units.

Logs

Assuming the unit is able to boot and you have SSH access, the following can be used for dumping information about the unit.

sshpass -p mod ssh -o StrictHostKeyChecking=no root@192.168.51.1 "journalctl -m" > syslogs.txt

UART debug

By opening the unit it is possible the locate RX/TX/GND pins on the bottom-board of the unit.
You can solder pins to these holes in order to read and write to the UART console.

Note that the HMI (device controller) makes uses of this UART interface for a few of its operations, so it will misbehave if you connect something to the TX pin (as this blocks the HMI side from sending data).
Connecting to TX and GND is safe, which allows the HMI to keep working and for us to still listen/read the UART debug logging.

For enabling early kernel boot logs, ssh into the unit and run the following:

# mount RW
mount / -o remount,rw

# enable verbose kernel logs
sed -i -e 's/quiet //g' -e 's/loglevel=0/loglevel=9/g' /boot/uEnv-*.txt

# sync and reboot unit
sync; hmi-reset; reboot

The kernel logs will now be sent to the console, allowing to monitor any kernel/boot issues via UART.