Are there serial pins on the expansion dock?



  • Ok, well, inching towards (hopefully) success.

    I've squeezed the TX and RX wires in the Omega's docking headers, and connected them to Arduino's RX and TX pins, respectively. And the GND's, of course, are connected.

    Since the USB cable is not attached, there's no need to deal with conflicting serial traffic.

    I've installed screen command on the Omega:

    $ opkg update
    $ opkg install screen
    

    Now, I fail to establish successful comms with Arduino. Under the /dev, there are three tty entries:

    tty
    ttyATH0
    ttyS0
    

    I can connect only to the ttyATH0, any attempt to connect to others fails:

    $ screen /dev/ttyATH0 9600
    

    I get blank screen and try to type but the Arduino does not seem to receive anything. I have set up simple echo program on the Arduino that just writes back any character it receives.

    I think the /dev/ttyS0 is the one I should connect to, but I can't get the connection to work:

    $ screen /dev/ttyS0 9600
    /var/run/utmp: No such file or directory
    [screen is terminating]
    

    It could well be that the problem is at the Arduino end, but I can't come up with idea how to diagnose it. At least, I know the Arduino part works if I communicate with it via USB serial.


  • administrators

    @Pavils-Jurjans right, i forgot to mention, it will definitely be /dev/ttyATH0, I've actually tried this on the Arduino Dock.

    Try setting the Arduino sketch to use 115200 baud and just to print characters to the serial. Then on the Omega, run screen /dev/ttyATH0 115200. You should see the characters coming in from the Arduino.



  • Well, no luck for now.

    I ran the screen command as you say, but no characters, just blank screen.

    root@Omega0:/dev# screen /dev/ttyATH0 115200 
    /var/run/utmp: No such file or directory
    [screen is terminating]
    

    Before the blank screen appears, the "No such file or directory" error is output (see below), perhaps that has something to do with it? I went ahead and did

    root@Omega0:/dev# touch /var/run/utmp
    

    after what the "No such file or directory" error disappears.

    I connected the Arduino's RX and TX wires to see if the comms failure is at the Arduino's end, but this loopback test was successful. I did the same with the Omega's RX and TX wires, and at first it did not work. The device even failed to reboot. If I disconnected the RX and TX pins, it booted up ok, and connecting them afterwards resulted in successful loop back test.



  • Hmm, are you sure your pin layout diagram is correct? In despair, I connected the top right 5th pin (TX in diagram) to the Arduino Micro TX pin (3rd from the nearest corner), and the RX-RX respectively, and got the comms working!

    Shouldn't then the 5th pin in the diagram be RX and 6th pin TX?


  • administrators

    @Pavils-Jurjans that seems odd, since the Omega uses these pins when connected to the Expansion Dock or Mini Dock to communicate with the USB to Serial chip to provide the serial terminal.

    Can you send a photo of the working setup?



  • Here's a lousy photo:

    ledomega.jpg

    The TX wire connects the Arduino's 3rd leftside pin to the Omega's 5th pin (counting from the right side);
    The RX wire connects the Arduino's 4th leftside pin to the Omega's 6th pin (counting from the right side);

    The wire labels are linked to the Omega's diagram. The "problem" is, though, that the Arduino's 3rd pin is TX, and 4th is RX.



  • @Pavils-Jurjans I don't know a lot about the TX/RX pins, but one thing that strikes me from your photos is that I don't see any common ground connection between the Omega and the Arduino - it may be off shot, but will definitely be needed



  • Of course, the ground must be common for all the connected devices (the power source, RGB LED strip are off shot). They wouldn't work, if the ground would not be connected, and there's a good chance to fry stuff that way.



  • Hi,

    It's amazing the power of comunicating arduino and omega, but I have a situation I don't understand. Probably I'm missing something :-)

    I've connected my arduino with omega this way:

    ard tx -> omg tx
    ard rx -> omg rx
    ard vin -> omg 5v
    ard gnd -> omg gnd

    Then I ssh omega and "screen /dev/ttyATH0 115200" (I configured arduino serial to 115200 to).

    Then everything works fine. I receive some data from my dht11 connected to arduino.

    la foto 1(4).JPG
    screenshot.png

    So I had the idea of cutting a USB cable and wiring omega usb to arduino this way:

    omg usb 5v -> ard 5v
    omg usb gnd -> ard gnd
    omg usb d+ -> ard tx
    omg usb d- -> ard rx

    I've tried "usb d+ -> ard rx" and "usb d- -> ard tx" too.

    And when I "screen /dev ttyATH0 115200" on my omega I get nothing.

    So my question is: Should I receive something? Am I doing something wrong? Any Idea? :-)

    la foto 2(4).JPG


  • administrators

    Hi @Rubén-Vizcaya
    Cutting the USB cable and connecting the USB data lines to the Arduino serial pins will not work since the USB data lines will be communicating in the USB protocol and the Arduino will be expecting a simple serial protocol.

    The Expansion Dock (and Mini Dock) have a USB-to-Serial chip between the microUSB port and the Omega that converts the protocols.



  • @Lazar-Demin Thanks for the info... I was suspecting something like that :-)



  • @Lazar-Demin For anyone that comes along this post later I just want to clarify that the TX and RX for the serial diagram are wrong here. They are correct on the official pinout page.


  • administrators

    Thanks @Kevin-Sidwar
    Yep, we've updated the Pinout diagram to fix where the Serial RX and TX pins are found.
    I've gone back and updated my post above.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.