This is an application written to create a terminal-like application to send and receive shell commands over XBee while both nodes are connected to a POSIX-compliant device (e.g.: An embedded Linux device). This code is strongly based on the original 'terminal_client' posix example from the Digi XBee ANSI C Library here.
Application has been tested on an XBee PRO S3B 900HP module and can send simple terminal commands that don't depend on reading complex input data such as file contents for example.
The application take two arguments: (1) XBee module physical device path and (2) terminal mode.
- Pass the module physical device path. e.g.: /dev/ttyUSB0
- Pass either "host" or "client" to the second argument. Default mode is "host".
- While in CLIENT mode, application reads a command and sends it to be executed on the remote node host system.
- While in HOST mode, application sends received commands to the local terminal and sends the command output back to the remote node.
Command example: ./transparent_terminal /dev/ttyUSB0 client
Before starting a terminal communication, you must set the targets on both ends.
You can either use the command target
followed by the remote node NI value or set a manually mac address using the command mac, which will create a virtual NI based on the target node MAC address.
Example using target command (bold commands are typed by the user):
target my_node
Example using mac command (bold commands are typed by the user):
nd
(nd is the command for Node Discovey, in case nodes aren't scanned when application starts)
Address:0013a200-40eaeabc 0xfffe PARENT:0xfffe Router NI:[]
mac 0013a200-40eaeabc
Address:0013a200-40eaeabc 0xfffe PARENT:0x0000 Coord NI:[40EAEABC]
target 40EAEABC
target: Address:0013a200-40eaeabc 0xfffe PARENT:0x0000 Coord NI:[40EAEABC]
Type help from the application to get further assistance and more useful commands.
Project is built on GNU Make. Just run make
to compile it. You must have the usual buildtools for your platform in order to compile.
This project is distribuited under the GPL v3 license. Please read the LICENSE file for further details.
- Provide a tool to deal with complex commands which reads data from files such as
cat
ordd
, for example. - Write unit tests for current implementation
- Test on various embedded platforms to find any particularities.