Hello everyone
I am using a cube orange plus and a raspberry pi 5 ( raspion os ) as a companion computer. I want to connect the rpi5 to the cube via telem 2 but the cube never connects via that. I tried using a USB cable and everything works fine and I can even run python scripts on it . I used /dev/ttyACM0 for that. I would like to eliminate the usb cable if possible and use the telem 2 port to do the same things.
Please help
try TX/RX swap in the SERIAL2_OPTIONS
Hi @Joshua_Kordani
Thanks for you reply. I tried it and am still getting the same error.
Connect /dev/ttyAMA0 source_system=255
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/ttyAMA0
MAV> link 1 down.
Try changing the SRn_OPTIONS to force the emission of messages on the telem port youâre using, ensure the baud rates match, and keep switching TX/RX Swap parameter.
I tried changing these settings as well but the problem still exists . Let me give you some more info incase that helps. I am using telem2 port to connect to rpi pins 14 and 15. I have made a custom cable for that using the pic below as a guideline.
and the settings I changed are as follows :
when running ls /dev/ttyAMA* i get /dev/ttyAMA0 and /dev/ttyAMA10
I could never get it work with with my version of linux so I stuck with the USB cable.
Depending on your Pi and settings, the tty dev could be /dev/ttyACM* or /dev/ttyS*.
Double check your Pi pinout. GPIO14 and 15 (which are by default configured to be the primary UART (check your PI docs!) are on physical pins 8 and 10. If you need to use the secondary UART, you likely have to enable it in your boot config, but without knowing your pi or more about your setup thatâs going to be up to you to figure out. Remember that TX on pin 2 of the cube connector will go to the PI RX, and vice versa.
1 Like
I use /dev/ttyACM0 for USB connection and that works fine. the Pi is a raspberry pi 5 running the latest raspion os . I am making a rover that uses cube orange as the primary controller and rpi as a companion computer.My plan is to use an ultrasound sensor for obstacle avoidance such that when an object is detected , full control of the rover is given to the pi and the script it is running. Yes,I am using pins 14 and 15 for the UART and have also enabled them in the config.txt . I have also disabled Bluetooth .
Also my raspberry pi just stopped working completely today and showed a red light even when not powered on , so it might take me a few days to test anything. If anyone knows why the pi suddenly stops working and how to fix it please help me with that as well.
A lot of people on the internet having it working with the setup I am using, so I hope I can get it to work.If left with no option, I will stick to USB.
To be clear, physical pins 14 and 15 are probably not connected to a UART driver on the pi. Do you mean pins 8 and 10?
My apologies, yes I meant GPIO pins 14 and 15 which are physical pins 8 and 10.
If you google for how to properly connect TX and RX on the pi, you should be able to open a terminal on the device and echo back what you type in. This would confirm that youâre using the device that you expect, and that it is working properly. There is a little more to it than just shorting the pins I believe.
That is what I have been doing the whole time . I have googled guides and seen youtube videos on how to connect a raspberry pi with a cube autopilot. The thing is , on google/youtube the people just connect the wires and it starts working , but when I do it , the connection does not want to happen. and I always get a âlink 1 downâ error when I do so
So have you verified that your PI UART works by connecting pins 8 and 10 together, or otherwise tested by connecting to another known good device? Iâve got a stack of pis with malfunctioning UARTs.
Can you please tell me how I can check if the UART pins are working together. if you could tell me the steps or point me towards a guide, that would be great. Thanks
The top answer here describes what I mean, and the rest of the page has instructions for using serial terminal programs to test this
I connected the RX and TX pins via a female-female jumper wire and then from the pi itself used minicom on port /dev/ttyAMA0 to connect. whatever I typed on my keyboard showed up on the console . does that mean the pins are working ?
I am sorry if I am asking silly questions,but I have never done this stuff before and am new to all this.
1 Like
Hey @Joshua_Kordani I have solved the problem. It was a silly mistake on my end . I got the polarity of the connector wrong. It had gnd on the right most end and so on . My mistake was I was connecting the RTS and CTS instead of RX and TX. I did not have to swap RX/TX as well . It works properly now
Thank you for time @Joshua_Kordani. Very much appreciated
1 Like
So the only gotcha to putting tx/rx together and testing echo is that you have to turn echo off in your terminal program. âEchoâ in terminal programs shows you what you type for your convenience, but might not reflect what the receiving side sees. In the case of a local tx/rx connection, if things are working right then you should immediately see what you type with terminal echo off.
Sounds like you did it right though, and Iâm glad everything is working!
1 Like