eellak / epidose

Privacy-preserving epidemic dosimeter based on DP-3T contact tracing
Apache License 2.0
52 stars 6 forks source link

Enable serial console on boot #63

Open konasimakopoulos opened 3 years ago

konasimakopoulos commented 3 years ago

The RPi serial port is user accessible on the final PCB. If the Ansible script was modified to enable it and thus allow shell access, it would significantly help with debugging.

dspinellis commented 3 years ago

@stefanos1316 please make it happen.

stefanos1316 commented 3 years ago

@konasimakopoulos I find that adding this variable from /boot/config.txt will enable it enable_uart=1. I guess this is what you need, right?

dspinellis commented 3 years ago

@stefanos1316 : Please work on each on a separate branch, so that multiple PRs can be open together.

konasimakopoulos commented 3 years ago

@stefanos1316: Yes, that should be all that is needed (but please also check the cmdline.txt file to make sure that the kernel is configured to output console messages on the serial port).

stefanos1316 commented 3 years ago

@dspinellis ok, I have submitted a PR on a different branch.

stefanos1316 commented 3 years ago

@konasimakopoulos according to this document there are two serial ports for RPi Zero. I guess I should enable/configure the primary (PL011), right?

konasimakopoulos commented 3 years ago

Yes, that is correct!

stefanos1316 commented 3 years ago

@konasimakopoulos according to some guides that I read (1) by just adding the mentioned line will do the magic. Also, what you need in cmdline.txt is this "console=serial0,115200 console=tty1". I have checked RPi3 and RPi Zero, and both of them has it enabled. Unfortunately, I do not have a port to test it out. Any idea if I can do it in a different way?

konasimakopoulos commented 3 years ago

Just checked on a RPi Zero (SD with 2020-12-02-raspios-buster-armhf-lite). Just appending "enable_uart=1" to /boot/config.txt will enable the serial port after a reboot.

stefanos1316 commented 3 years ago

Great, thanks @konasimakopoulos . I have submitted a PR addressing this issue.