4

I have just bought an Arduino Uno R3 and I would like to view the Serial Monitor using my Raspberry Pi via SSH.

I have looked around on forum sites but cannot seem to find the proper software or commands. I recently saw the I could use screen on the Pi but no clue where to use it. Also how do I go about finding the UART address under /dev/tty on my Pi which is connected to my Arduino.

Thanks!

  • 1
    I may be wrong but I'd be surprised if an Arduino supports SSH. Where does the Raspberry Pi fit in? – joan Jul 18 '14 at 8:02
  • 1
    Confirming Joan: Arduino does not support SSH. SSH is a software protocol of communication, it requires baudrates higher than USART can provide. Anyway, the EEPROM of arduino will not be able to contain the sshd. – jlandercy Jul 18 '14 at 14:11
  • While you are technically trying this on a Raspberry Pi, this question isn't on-topic here. You may want to ask this on Arduino, as that site is meant specifically for Arduino. – RPiAwesomeness Jul 20 '14 at 23:14
  • 2
    This question is not off topic. The OP is using a Pi GPIO, Software on the Pi and the Pi OS. The answer is also only based on what to do on the PI. Please vote to reopen. – Piotr Kula Jul 21 '14 at 9:14
3

I think the OP wants to SSH into the Pi and read the UART from the Arduino! :)

You first need to work out which UART to look on. The Pi has 2 UART's but only 1 is availble, which by default is in use by the console. You need to turn this off first and reboot! Unless you are using a USB serial port.

A roboust serial manage is minicom!

sudo apt-get install minicom

And since you are using the UART port you just disabled you know its called AMA0. You just need to know what baud the Arduino is running at, its usually setup to default at 9600. But, you may have changed it to 115000 - With the Pi the 115kbs might not work and its better to start of at 9600, then work up if you need more speed. But usually only binary data needs higher baud, which I don't think you are doing.

minicom -b <baud> -o -D /dev/ttyAMA0

Now you can write text by typing as usual, and it will go to your Arduino via minicom, or just read the output if you logging stuff on the Arduino and dumping it to serial

You are correct, you can use screen on the Pi while on a SSH session. screen is used to execute things in a separate "screens". You can use many screens running and switch between them via one SSH session.

sudo apt-get install screen

and then again just run it like

screen /dev/ttyAMA0 <baud>
  • 1
    Thank you good sir! This is exactly what I was looking for! Brilliant! – Some Random User Jul 19 '14 at 4:04
  • You are most welcome! – Piotr Kula Jul 19 '14 at 10:58
1

I have writen a program where the Arduino connects itself to the Raspberry by serial SSH and send commands to the RPI.
I used the SerialSoftware command in order not to interfere with the TX and RX used by the Arduino by the USB to PC (useful during the test).
I also used WinSCP for the development for looking at the files inside the RPI. You'll get the Arduino program at f6kbf.free.fr in the TVA & DATV drawer .
The explanations are in the Arduino program. If it helps....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.