Hello!
I’m trying to use the BeagleBone Black to communicate to RS485 and CAN-Devices.
For testing I ordered the Waveshare RS485-CAN Cape. Later on the MAX13487 should be used for RS485 at UART2. CAN works fine using the BB-CAN1 overlay with uEnv.txt (UART1).
But first I tried to communicate from UART1 to UART2, to check if the UARTs are working. I added BB-UART1, BB-UART2 and BB-UART4 to uEnv.txt and connected UART1 RX to UART2 TX and UART1 TX to UART2 RX (Pins 22 and 24/ 26 and 21).
After Reboot, the UARTs are activated:
root@beaglebone:/# ls -l /dev/ttyO* lrwxrwxrwx 1 root root 5 Feb 7 13:55 /dev/ttyO0 -> ttyS0 lrwxrwxrwx 1 root root 5 Feb 7 13:55 /dev/ttyO1 -> ttyS1 lrwxrwxrwx 1 root root 5 Feb 7 13:55 /dev/ttyO2 -> ttyS2 lrwxrwxrwx 1 root root 5 Feb 7 13:55 /dev/ttyO4 -> ttyS4
`
root@beaglebone:/# dmesg | grep tty
[ 0.000000] Kernel command line: console=tty0 console=ttyO0,115200n8 capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART4, BB-UART5 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait coherent_pool=1M quiet cape_universal=enable
[ 0.001090] console [tty0] enabled
[ 0.001109] WARNING: Your ‘console=ttyO0’ has been replaced by ‘ttyS0’
[ 3.929029] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
[ 3.941849] console [ttyS0] enabled
[ 22.142299] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 189, base_baud = 3000000) is a 8250
[ 22.154538] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 190, base_baud = 3000000) is a 8250
[ 22.165780] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 191, base_baud = 3000000) is a 8250
`
Most tutorials using an older Debian version are using ttyOx to access the serial ports (old OMAP-driver?), but based on this output I have to use ttySx with the newer 8250 driver for my commands instead?
I tried to send/receive messages between the UARTs using minicom, screen and python scripts, but i can’t see any messages at the receiving interface. Measuring the sending UARTs TX with an oscilloscope I also can’t see any signals.
At the moment I am running Debian Image 2016-05-13 with Kernel 4.9.8-bone-rt-r4, I also tried everything with the original Kernel of this Image (4.4.9?) and a fresh Debian IoT Image 2016-12-09 and also with UART2+UART4.
Is there any missing configuration I have to do to get it working?