Using Serial and Bridge at the same time

So, I have this Leonardo-based serial sniffer that saves all serial data received on the RX pin to an SD card.

When my Yún arrived, I decided to migrate it and add some cool new internet features. But I'm stuck trying to reproduce what I already have on the Leonardo. Serial is only for USB communication, and Serial1 is used for Bridge, which I need to save my files.

Is there any way to get old-fashioned RX/TX Serial communication and the Bridge working at the same time?

SoftwareSerial? http://www.arduino.cc/en/Reference/SoftwareSerial

If you try make sure you pay attention to this:
Not all pins on the Leonardo support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).

A USB to TTL?
I have my serial port connected to linino and use serial and bridge at the same time.
I guess if you have a USB to ttl converter you can simply use serial as you did before.
Best regards
Jantje

I've been working on a project where I'm doing something similar, communicating with a device over serial and then sending the results to another device over wifi.

The only solution I've found is to stop the serial communication with Serial1.end(), start up the bridge, transmit my info, then start serial back up again. It works, but I'm encountering stability problems after running for 12+ hours. They might be unrelated, though.

Maybe this could help:
http://linino.org/doku.php?id=wiki:spidriverstream#the_spi_tty_driver_and_the_stream_spi

@mamu: that article mentions the driver but doesn't supply a link; do you happen to know where/how it can be downloaded/installed? Thanks.

kind regards,

Jos

cornwd:
The only solution I’ve found is to stop the serial communication with Serial1.end(), start up the bridge, transmit my info, then start serial back up again. It works, but I’m encountering stability problems after running for 12+ hours. They might be unrelated, though.

What I did was lots simpler.
Just plug in a usb cable between linino and leonardo.
After installing some packages you can simply read the serial with a simple redirect on linino <</dev/ttyACM0 or with minicom

opkg install kmod-usb-acm
opkg install minicom

Best regards
Jantje

@Jantje: I though the TO wonted to know this for doing communication between the Arduino and the Leinino site of Yun. But I could be wrong.

@JosAH: I thought it would be easy when aging our Linino build chain and make the following mode

CONFIG_PACKAGE_kmod-spi-tty-ds=y

And then build your own Linino image. But I haven't done it but am very interested in your findings.

mamu:
@Jantje: I though the TO wonted to know this for doing communication between the Arduino and the Leinino site of Yun. But I could be wrong.

I am talking about the usb of linino and the usb of the leonardo on yun. It is kind f wierd to connect 2 USB's on the same card but it works fine.

Jantje:

mamu:
@Jantje: I though the TO wonted to know this for doing communication between the Arduino and the Leinino site of Yun. But I could be wrong.

I am talking about the usb of linino and the usb of the leonardo on yun. It is kind f wierd to connect 2 USB's on the same card but it works fine.

Ah, that sounds interesting. Haven't thought about this.
How did you use it in the Arduino sketch? By SoftwareSerial? If yes with what parms?

just use serial
the bridge uses serial1

I´m showing my stupidity here, I´m sure, but if the two processsors can ommunicate over Serial1/-dev/ttyATH0, what´s the use for a second line?

kind regards,

Jos

JosAH:
I´m showing my stupidity here, I´m sure, but if the two processsors can ommunicate over Serial1/-dev/ttyATH0, what´s the use for a second line?

kind regards,

Jos

No stupidity. I wanted to use /-dev/ttyATH0 first to. I actually never got an answer on my how to question How to extend the bridge? - Arduino Yún - Arduino Forum
So if you have some code that uses Serial and you have some code to parse the outcome of the Serial it may be easier to just continue using this code and have the connection between the 2 usb ports on the yun than to modify the code and bridge.

Best regards
Jantje