I have created my own custom openwrt build of Arduino YUN, and want to run my own C application on the openwrt that can communicate with the arduino side of YUN over the serial port.
My C program running on openwrt needs very fast serial communication with another program on the arduino side of the YUN, with low overhead/low latency (few micro seconds at most).
So my questions are:
Should I bypass the bridge system on both openwrt side and arduino side to achive fast communcation?
How can it be bypassed?
If bypassed, which serial device should my C program open on the openwrt to communicate with arduino side, is that ttyUSB0?
If I do not bypass bridge, how can my C program running on openwrt communicate using bridge with arduino?
Q:My C program running on openwrt needs very fast serial communication with another program on the arduino side of the YUN, with low overhead/low latency (few micro seconds at most).
A: The serial communication( <1Mb) is no longer count as fast communication, if you are working on PHY 100Gb then C is even too slow, The assembly language is the way to go. Plus to make C work at Yun openwrt we need either cross compile or load gcc into Yun. Last thing, python or lua use c extension to access serial port and no speed lost here.
So my questions are:
Should I bypass the bridge system on both openwrt side and arduino side to achive fast communcation?
A: Yes and No, if speed is goal then bypass the bridge system.
My C program opens /dev/ttyATH0 at only 300 baud, I also open serial1 on arduino at 300 baud, but communications is flaky, most of the time it doesnt work. I commented out the line in inittab on the linux side,
#ttyATH0::askfirst:/bin/ash --login
that may cause some other process opening the port and gumming up the works, but still I cant even communicate at 300 baud reliably, it fails to send and receive the bytes correctly over 90% of the time.
Does anybody have any program that can send data back and forth between a program running on YUN and the Arduino without using the internet and all that overhead which I'm not using.
Can I use the bridge with a local program running on the linux side of YUN that can send bytes toarduino side without using internet?
I'm using C program on the linux side,want to send data over serial to arduino side, keep getting lots of errors, wrong bytes received bytes came in out of sequence etc.