no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | cybiko:serialrelay [2009/11/27 17:54] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Serial Relay====== | ||
+ | {{serialrelay.gif }} The serial relay project allows the serial ports on a Cybiko Classic to be virtually linked with another, in full-duplex mode. | ||
+ | {{ cybiko: | ||
+ | |||
+ | The program runs in a point-to-point mode, that is only communication between two Cybiko' | ||
+ | |||
+ | It doesn' | ||
+ | {{ cybiko: | ||
+ | This would allow a computer to remotely monitor a GPS unit that is moving around sending back it's coordinates. | ||
+ | |||
+ | When used with [[RFTerm]] the remote VT100 terminal emulator you can get serial access to any device. | ||
+ | {{ cybiko: | ||
+ | This would show all the [[atmel: | ||
+ | |||
+ | <note important> | ||
+ | This program will only work on the [[ClassicHardware|Classic]] as it requires an RS232 port. You will also need the {{: | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ======Usage====== | ||
+ | From the main screen several keyboard options are available, this help is also available by pressing the **?** key on the cybiko. | ||
+ | |||
+ | ^Key ^ Description ^ | ||
+ | ^Select | locate other Cybiko | | ||
+ | ^Enter | For options screen - Options are described below | | ||
+ | ^I | Information | | ||
+ | ^L | Toggle line numbers when in debug mode | | ||
+ | ^C | Clear console | | ||
+ | ^D | Toggle debugging mode | | ||
+ | ^Esc | to exit.| | ||
+ | |||
+ | This program has been tested with [[http:// | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | =====SerialRelay to RFTerm Walkthrough===== | ||
+ | |||
+ | In this demonstration we will be connecting two cybiko to each other using [[RFTerm]] and SerialRelay. | ||
+ | {{ cybiko: | ||
+ | |||
+ | ====Step 1==== | ||
+ | Starting up SerialRelay on green. | ||
+ | When you first run the program you will see a screen similiar to that below. | ||
+ | |||
+ | {{ cybiko: | ||
+ | |||
+ | |||
+ | ====Step 2==== | ||
+ | Start hyperterminal or some other serial communication program on the PC, make sure you select the correct port that you have wired up the green cybiko to. | ||
+ | The following hyperterminal settings match those of the default serial relay startup. | ||
+ | {{ cybiko: | ||
+ | |||
+ | To verify that you at least have connectivity and all the serial port parameters are set correctly. | ||
+ | |||
+ | {{ cybiko: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ====Step 3==== | ||
+ | Now to get some connectivity happening, on a 2nd cybiko (purple) fire up the [[RFTerm]] program and press the **SELECT** button. | ||
+ | This will present you with a dialog of all other cybiko that are running. | ||
+ | Once you have done this the cybiko running serialRelay (green) will show some information about this connection. | ||
+ | |||
+ | {{ cybiko: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ====Step 4==== | ||
+ | Proving the connection works. | ||
+ | Now return to the hyperterminal session once more we type the string **hello** this time as serialrelay now has a connection with RFTerm the characters will be transported from the cybiko connected to the PC onto the cybiko running RFTerm. | ||
+ | |||
+ | SerialRelay(Green) -> {{cybiko: | ||
+ | RFTerm(Purple) -> {{cybiko: | ||
+ | |||
+ | Now that it is all working press **D** to turn off debug mode. There is a slight overhead when running in debug mode that will throttle your effective baud rate. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ======Options====== | ||
+ | * **Partner Type** - Either serialrelay or repeater. | ||
+ | * **Baud Rate** - Communication speed with host: 110, 300, 600, 1200, 2400, 4800, 7200, 9600, 14400, 19200, 38400, 57600, 115200. | ||
+ | * **Data Bits** - Size of word size: 5,6,7,8 - Defaults to 8. | ||
+ | * **Stop Bits** - 1,1.5,2 - Defaults to 1. | ||
+ | * **Parity** - even, odd, none - Default to NONE. | ||
+ | * **Handshake** - none, CTS, XON/XOFF - Default to NONE. | ||
+ | * **Power Mode** - Invokes an RF power hack to increase a units range. | ||
+ | * **Duplex Mode** - Full, Tx Only, Rx Only. | ||
+ | * **AutoJoin** - Autojoin affect the process of the < | ||
+ | * **Reboot Mins** - The unit will automatically reboot itself after this many minutes have elapsed. | ||
+ | * **Reboot Send** - After a given number of bytes are transmitted via RF the unit will auto reboot. | ||
+ | * **Reboot Rcvd** - After a number of bytes have been received via RF reboot. | ||
+ | * **Poll Freq(ms)** - This option Allows the frequency as which the serial port is polled to be adjusted. | ||
+ | * **RF silence** - that amount of time in minutes that has to elapse after RF activity before the unit can be considered ready for reboot. | ||
+ | * **Partner quit notify** (v1.10) - Should a dialog be displayed when the partner cybiko quits. on/off - Default on. | ||
+ | |||
+ | |||
+ | |||
+ | ======Comments====== | ||
+ | |||
+ | - I'm assuming that the scrolling output on the screen has no //' | ||
+ | - If these units are to be deployed in //' | ||
+ | - Idea. We have a tuneable parameter, //' | ||
+ | - Thought. How about a function call that prints the available free RAM of the cybiko to the screen, this would help when trying to find out where leaks are coming from. | ||
+ | - Also, a client initiated //' | ||
+ | - A hardware based solution. We can find out how to cause the little LED on the cybiko to flash from red to yellow (wireless traffic does this anyway). Our app would flash this LED every so often, like it was servicing a watchdog timer. Have a little RC circuit that notices if the LED stops flashing. If it sees this, it just pushes the //' | ||
+ | - Point of interest. Whilst running serialrelay, | ||
+ | - DK to introduce hard logging (with time/ | ||
+ | - The fact that these ran with continual 2-way serial data traffic for (at least) over 6 hours is actually very encouraging. | ||
+ | - Point from Brett - Perhaps explore the use of the vibrator function to act as a way to drive the reset line on the Cybiko. | ||
+ | - If this project is still alive, what about writing a ' | ||
+ | |||
+ | |||
+ | ======Code====== | ||
+ | ^ Code ^ | ||
+ | | {{serialrelay.zip}} v1.11| | ||
+ | | {{serialrelay-v10.zip}} v1.10| | ||
+ | | {{serialrelay_1.9.zip}} | | ||
+ | |||
+ | =====Feature Request===== | ||
+ | *The enhanced debug more that displays control chars and allows line numbers is great. How about another debug option to display the time at which the message was sent/ | ||
+ | *Auto restart. As we know, there are leaks in the CyOS serial port management code. An option to force a conmplete reset of the unit after a given uptime was exceeded would be very handy for ' | ||
+ | | ||
+ | *An option to cause an XOFF to be sent just before a unit does a reboot, and another option to cause an XON to be sent when a unit is recovering from a reset. | ||
+ | |||
+ | |||
+ | |||
+ | =====Change Log===== | ||
+ | ===22-Oct 1.11=== | ||
+ | * Publish / Subscriber implementation - this means that multiple clients can connect to a single serial relay cybiko. | ||
+ | * Connecting partners now display CYID as printed on the back of the units. | ||
+ | ===4-Oct 1.10=== | ||
+ | * Partner quit dialog option setting - useful when you are running serial relay and the partner can come and go, without having to acknowlege the fact. Programs such as [[wmpremote]] and [[cameracontrol]] | ||
+ | * Partner quit did not clear the partner_info.id flag so serial relay would continue to try and send messages even thou it knows the partner has gone. | ||
+ | ===18-Jun 1.9=== | ||
+ | * Repeater connectivity added | ||
+ | * Alternative reboot vector for different model classics | ||
+ | ===14-Jun 1.8=== | ||
+ | * Auto reboot functionality with partner restablishment | ||
+ | * Adjustable polling frequency | ||
+ | * Streamlined option saving (internal only) | ||
+ | * ' | ||
+ | ===6-Jun 1.7=== | ||
+ | * Configuration file is now held externally | ||
+ | * Added Full/Tx Only/Rx Only duplex setting. | ||
+ | * Enhanced GUI & Feedback messages, expanded ctrl chars in debug mode | ||
+ | * Missing partner detection (don't loopback messages) | ||
+ | ===3-Apr 1.6=== | ||
+ | * Adjusting baud setting takes affect without needing app restart | ||
+ | * Additional message PARTNER_IDENT to allow other programs to use it as a gateway. | ||
+ | ===14-Mar 1.5=== | ||
+ | * Increased buffers from 80 to 256 | ||
+ | * Complete re-write of option setting page using modular components. | ||
+ | ===13-Mar 1.4=== | ||
+ | * Increased buffers from 32 to 80 bytes to prevent buffer overruns when transmitting GPS data at 4800 baud. | ||
+ | |||
+ | =====Documentation===== | ||
+ | This is a {{serialrelay.chm|Window CHM}} file generated automatically by http:// | ||
+ | {{tag> |