Getting U-Boot after uart is enabled and trying to connect pollution sensors to my RPI 3 B+ running Fedora IoT 32 (latest update)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm investigating and trying to make this work for a week now.
I wouldn't bother if I wasn't sure that digging deeper into this issue would take much more time than I have available at the moment.

So this is the scenario:
Hardware: 
 - Platform: RPi 3 B+
 - Sensor (on the board): Pimoroni Enviro+
 - Particulate Matter Sensor (connected to Enviro+): PMS5003
 - SD Card: Sandisk 64Gb
Software: Fedora IoT 32 (just updated to the latest)

State of art:
I've successfully enabled and tested I2C and SPI. Drivers for the Enviro+ board run like a charm on a container manager by Podman.
The particulate Matter Sensor needs urat to be enabled, so I've made the fedora arm installer tool to enable uart for me.
Below the command issued to setup the SD card:
        sudo fedora-arm-image-installer -y --image=/home/abattagl/Downloads/OS/Fedora-IoT-32-20200429.0.aarch64.raw.xz --target=rpi3 --media=/dev/sde --resizefs --addkey=/home/abattagl/.ssh/id_rsa.pub --norootpass --addconsole

I started testing uart from a fresh install and "rpm-ostree update" to avoid previous changes to the system affect the proper fuctioning of the serial port.
After the first boot of Fedora IoT and the system update I've shout id down and connected the Enviro+ sensors board.
The system booted properly after and I could see that both /dev/ttyS1 and /dev/ttyAMA0 are working at a boud rate of 9600:

[root@localhost ~]# stat /dev/ttyAMA0 
  File: /dev/ttyAMA0
  Size: 0         	Blocks: 0          IO Block: 4096   character special file
Device: 6h/6d	Inode: 178         Links: 1     Device type: cc,40
Access: (0660/crw-rw----)  Uid: (    0/    root)   Gid: (   18/ dialout)
Context: system_u:object_r:tty_device_t:s0
Access: 2020-04-01 17:24:15.499999987 +0000
Modify: 2020-04-01 17:24:15.499999987 +0000
Change: 2020-04-01 17:24:15.499999987 +0000
 Birth: -
[root@localhost ~]# stat /dev/ttyS0
  File: /dev/ttyS0
  Size: 0         	Blocks: 0          IO Block: 4096   character special file
Device: 6h/6d	Inode: 1113        Links: 1     Device type: 4,40
Access: (0660/crw-rw----)  Uid: (    0/    root)   Gid: (   18/ dialout)
Context: system_u:object_r:tty_device_t:s0
Access: 2020-04-01 17:24:15.249999987 +0000
Modify: 2020-04-01 17:24:15.249999987 +0000
Change: 2020-04-01 17:24:15.249999987 +0000
 Birth: -
[root@localhost ~]# stat /dev/ttyS1
  File: /dev/ttyS1
  Size: 0         	Blocks: 0          IO Block: 4096   character special file
Device: 6h/6d	Inode: 1145        Links: 1     Device type: 4,41
Access: (0660/crw-rw----)  Uid: (    0/    root)   Gid: (   18/ dialout)
Context: system_u:object_r:tty_device_t:s0
Access: 2020-04-01 17:24:15.599999987 +0000
Modify: 2020-04-01 17:24:15.599999987 +0000
Change: 2020-04-01 17:24:15.599999987 +0000
 Birth: -

The big issues happens when I connect the particulate matter sensor to the sensors board.
The RPi startup phase stops showing the U-Boot command prompt. and, of course, I haven't got the skills to debug/investigate that.
I can just guess I'm missing something.
A side note: using raspbian and the Pimoroni installation script, which, in turn, uses raspi-config to set up the system as the sensor expect, everything works fine and I'm able to query the particulate matter sensor using the python drivers.
I've tried to read the bash code of the raspi-config tool, but I'm not capable to understand ad deeply as I would.


The official documentation for the sensors says (quote):
"Note that if you're using this sensor with Raspberry Pi, then you'll need to make a couple of changes to its configuration. Type sudo raspi-config in the terminal and then under "Interfacing options" and "Serial" disable the login shell and enable the serial port hardware. Edit your /boot/config.txt file and add the lines enable_uart=1 and dtoverlay=pi3-miniuart-bt to the bottom of the file."
https://shop.pimoroni.com/products/pms5003-particulate-matter-sensor-with-cable

here is my config.txt file:
[root@localhost ~]# cat /boot/efi/config.txt 
[pi3]
kernel=rpi3-u-boot.bin
[pi4]
kernel=rpi4-u-boot.bin
[all]
arm_64bit=1
dtparam=i2c_arm=on
dtparam=spi=on
bootcode_delay=1
gpu_mem=32
start_x=1
upstream_kernel=1
dtoverlay=upstream
dtoverlay=pi3-miniuart-bt
dtoverlay=adau7002-simple
mask_gpu_interrupt1=0x100
audio_pwm_mode=0
enable_uart=1

And the kernel args:
[root@localhost ~]# rpm-ostree kargs
net.ifnames=0 modprobe.blacklist=vc4 root=UUID=3111a58e-40ce-4a5d-9314-90d7993c97f9 ostree=/ostree/boot.1/fedora-iot/82e3a6b60b9e57a232d7bcc53ea00d8f7ec28eacc454f0391f8e5c29d671d2ed/0


Could you please provide support on this topic? It's a very interesting and technical detail to me and it's a compulsory step for a meaningful, big project I'm currently running for my company.

Many thanks in advance,

Andrea
_______________________________________________
arm mailing list -- arm@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to arm-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/arm@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM (Vger)]     [Linux ARM]     [ARM Kernel]     [Fedora User Discussion]     [Older Fedora Users Discussion]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Maintainers]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [Linux Apps]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

Powered by Linux