Reading /dev/ttyS4 from a BeagleBone running Debian 10 not what is written
0
votes
1
answer
224
views
I am pulling my hears trying to make ttyS4 up and running on a Beaglebone black.
I have set up UART4 in my /boot/uEnv.txt (see it at the bottom of my question).
On the Beaglebone I have the comms cape and the RS-485 A/B are wired to the battery BMS device.
The comms are 9600 bauds 8N1.
To sniff the content I do:
(stty -F /dev/ttyS4 9600 cs8 -cstopb -parenb; cat -v /dev/ttyS4) | od -t x1
And what I notice in the logs is that it is no the expected stream of bytes: I should have something starting with A5 01 90 08 XXXX for 13 bytes.
What might have made the bytes different?
What should I do to troubleshoot this?
0000000 4d 2d 27 5e 41 21 5e 48 5e 42 58 5e 40 5e 40 5e
0000020 40 5e 40 5e 40 5e 40 4d 2d 51 5e 40 4d 2d 27 5e
0000040 41 21 5e 48 5e 42 58 5e 40 5e 40 5e 40 5e 40 5e
0000060 40 5e 40 4d 2d 51 5e 40 5e 40 4d 2d 27 5e 41 21
0000100 5e 48 5e 42 58 5e 40 5e 40 5e 40 5e 40 5e 40 5e
0000120 40 4d 2d 51 5e 40 4d 2d 27 5e 41 21 5e 48 5e 42
0000140 58 5e 40 5e 40 5e 40 5e 40 5e 40 5e 40 4d 2d 51
My uEnv.txt:
cat /boot/uEnv.txt
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0
uname_r=4.14.108-ti-r131
#uuid=
#dtb=
###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
#uboot_overlay_addr0=/lib/firmware/BB-UART1-00A0.dtbo
#uboot_overlay_addr1=/lib/firmware/BB-UART2-00A0.dtbo
#uboot_overlay_addr2=/lib/firmware/BB-UART4-00A0.dtbo
#uboot_overlay_addr3=/lib/firmware/BB-UART5-00A0.dtbo
###
###Custom Cape
#dtb_overlay=/lib/firmware/.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
disable_uboot_overlay_wireless=1
disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.14.x-ti kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_rproc (4.19.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks... (60000 = 384KB)
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###
cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet
#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet video=HDMI-A-1:1024x768@60e
##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
Asked by Stéphane de Luca
(173 rep)
Feb 22, 2022, 11:20 AM
Last activity: Feb 22, 2022, 03:30 PM
Last activity: Feb 22, 2022, 03:30 PM