Here is my BB info:
`
root@beaglebone:~# uname -a && cat /sys/devices/platform/bone_capemgr/slots
Linux beaglebone 4.1.15-ti-rt-r43 #1 SMP PREEMPT RT Thu Jan 21 20:13:58 UTC 2016 armv7l GNU/Linux
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
5: P-O-L- 0 Override Board Name,00A0,Override Manuf,BB-UART4
root@beaglebone:~/pyy# cat /boot/uEnv.txt
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0
uname_r=4.1.15-ti-rt-r43
##uuid=
#dtb=
##BeagleBone Black/Green dtb’s for v4.1.x (BeagleBone White just works…)
##BeagleBone Black: HDMI (Audio/Video) disabled:
dtb=am335x-boneblack-emmc-overlay.dtb
##BeagleBone Black: eMMC disabled:
#dtb=am335x-boneblack-hdmi-overlay.dtb
##BeagleBone Black: HDMI Audio/eMMC disabled:
#dtb=am335x-boneblack-nhdmi-overlay.dtb
##BeagleBone Black: HDMI (Audio/Video)/eMMC disabled:
#dtb=am335x-boneblack-overlay.dtb
##BeagleBone Black: wl1835
#dtb=am335x-boneblack-wl1835mod.dtb
##BeagleBone Green: eMMC disabled
#dtb=am335x-bonegreen-overlay.dtb
cmdline=coherent_pool=1M quiet cape_universal=enable
#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M quiet cape_universal=enable video=HDMI-A-1:1024x768@60e
##Example v3.8.x
#cape_disable=capemgr.disable_partno=
#cape_enable=capemgr.enable_partno=
##Example v4.1.x
#cape_disable=bone_capemgr.disable_partno=
#cape_enable=bone_capemgr.enable_partno=
#capemgr.enable_partno=BB-DCAN1,BB-UART2
cape_enable=bone_capemgr.enable_partno=BB-DCAN1,BB-UART4
##Disable HDMI/eMMC (v3.8.x)
#cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G
##Disable HDMI (v3.8.x)
#cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
##Disable eMMC (v3.8.x)
#cape_disable=capemgr.disable_partno=BB-BONE-EMMC-2G
##Audio Cape (needs HDMI Audio disabled) (v3.8.x)
#cape_disable=capemgr.disable_partno=BB-BONELT-HDMI
#cape_enable=capemgr.enable_partno=BB-BONE-AUDI-02
##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
##cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
uuid={removed_from_paste}
`
and here is what I’ve tried
SENDER | RECEIVER | Status
BB UART-4 > Arduino = Fails
Arduino > BB UART-4 = Success
I have tried to transmit from BB both in python (code below) as well after following setup:
stty -F /dev/ttyS4 9600 echo "test" > /dev/ttyS4 echo test > /dev/ttyS4 sudo echo "test" > /dev/ttyS4 sudo echo test > /dev/ttyS4
but nothing appears on Arduino side
I have tested UARTs on Arduino so they do get/read data, with 2 arduinos connected to eachother and it all works.
Tho transmitting from BB does not. I dont have any logic analyzer to verify BB side unfortunately
For additional info, heres my python2 script on BB:
`
root@beaglebone:~/pyy# cat ser.py
import time
import serial
ser = serial.Serial(
port=’/dev/ttyS4’,
baudrate=9600
)
ser.isOpen()
out=[]
while 1 :
if ser.inWaiting() > 0:
for c in ser.read():
if c != ‘\x02’ and c != ‘\x06’ and c != ’ ':
out.append©
if c == ‘\n’:
cmd=’’.join(map(str,out))
print cmd
if cmd==“quit\r\n”:
ser.close()
print “closing…”
exit
ser.flushInput()
ser.write(“test”)
ser.write(‘test1\n\r’)
out=[]
`
And Arduino is set to read and transmit, Pins are correctly setup
`
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
int debug = 0;
void setup() {
mySerial.begin(9600);
Serial.begin(9600);
pinMode(13,OUTPUT);
mySerial.println(“Hello, world?”);
}
void loop() { // run over and over
mySerial.listen();
char nn = mySerial.read();
if(nn > -1){
Serial.println(nn,HEX);
return;
}
}
`
And here’s the schematic:
Really thankful for guidance since ive probably fried UART-2 pins as i accidentaly had levelshifter A-side powered from 5V and UART-1 is occupied by can-tranceiver.