Skip to content

Makes it possible to link to another linux-system, not running with #1583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 21, 2013
Merged

Makes it possible to link to another linux-system, not running with #1583

merged 1 commit into from
Sep 21, 2013

Conversation

cow77
Copy link

@cow77 cow77 commented Sep 20, 2013

250000 (not Yun, but f.i. an Arduino mega2560 with a modified/expanded
WR703N).

The default could stay at 250000 (Yun).

250000 (not Yun, but f.i. an Arduino mega2560 with a modified/expanded
WR703N).

The default could stay at 250000 (Yun).
@cmaglie
Copy link
Member

cmaglie commented Sep 21, 2013

The mega2560 (or whatever CPU) and the Atheros must be set to the same speed. How can you do that on the Atheros side?

C

@cmaglie
Copy link
Member

cmaglie commented Sep 21, 2013

Ok, sorry, now I got it. I should read better before replying.

C

cmaglie added a commit that referenced this pull request Sep 21, 2013
Makes it possible to link Bridge to another linux-system.
@cmaglie cmaglie merged commit 43477bd into arduino:ide-1.5.x Sep 21, 2013
@toggio
Copy link

toggio commented Oct 13, 2013

Hi Cow77,
i tried it, but i don't know how to configure it on Linux side.
I tried YunBridge library but i don't understand where to change serial port for communicating with mega2560.
Can you explain this? I think it would be very interesting for many users to use bridge library to connect other Arduino board to different Linux Embedded Boards.

@barbudor
Copy link

+1

I would love also to be able to use it with WR703N/OpenWRT or RasPi

Barbudor

2013/10/13 toggio notifications@github.com

Hi Cow77,
i tried it, but i don't know how to configure it on Linux side.
I tried YunBridge library but i don't understand where to change serial
port for communicating with mega2560.
Can you explain this? I think it would be very interesting for many users
to use bridge library to connect other Arduino board to different Linux
Embedded Boards.


Reply to this email directly or view it on GitHubhttps://github.com//pull/1583#issuecomment-26223399
.

@cow77
Copy link
Author

cow77 commented Oct 13, 2013

Setting the tty speed for the system console in OpenWRT is not easy: most of the time you has to make a new kernel. See "http://wiki.openwrt.org/doc/recipes/serialbaudratespeed".

I used a USBtoSerial converter, and set the speed for that tty to the desired baudrate.
But for 250 Kbps you have to use very short lines (with the Yun they are automatic very short).
Or use a lower speed. That's why I needed to be able to set the speed within the Bridge software on the Arduino part.
That way I had a stable connection and I could see some data going if I used a bridge example.

But my installed packages, etc on the Openwrt side are not correct as far as I can see.

That's why I'm still trying to build a Linino kernel (using the Arduino/Linino branch) for my W703N with larger flash and ram (the SLBoat-version).
But up-till-now I get a board error (witch results in "Kernel Panic").

Please keep me informed on your results so together we will get it working.

@toggio
Copy link

toggio commented Oct 14, 2013

OK, thank for the info,
i'm not using wrt, i'm using debian on raspberry pi.
I've a usb-serial adapter (ttyUSB0), but i don't know where choose the right port in bridge python library...
Have u idea?

@cow77
Copy link
Author

cow77 commented Oct 14, 2013

The Python bridge part on the linux side is started by the Arduino BridgeClass f.i.:
Bridge.begin(115200); // make contact with another (linux) processor with 115200 bps

The Arduino Bridge function wait for the u-boot/kernel part to finish and after that it triggers the command shell processor used on the linux-tty where it's connected to, so it starts a shell for that tty-port.
(that means you have to define a command-shell for your tty device (without login))
After that it send a command to the linux processor ("run-bridge").

Run-bridge is a small shell-script:
"#!/bin/sh
cd /usr/lib/python2.7/bridge
exec python bridge.py 2> /tmp/bridge.py-stderr.log"

So the Python bridge is started on the used tty-port and is able to read from and write to that port (=console for the used command shell).

There is nothing to change on the Linux part (except on the avrdude-part, etc!), the bridge should work if delay timings are correct/usable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants