User manual
For example, to configure UART1 for Transparent (Wireless Serial) mode, put the following statement in your
SNAPpy startup handler:
crossConnect(DS_UART1, DS_TRANSPARENT)
The following table is a matrix of possible Switchboard connecons. Each cell label describes the “mode”
enabled by row-column cross-connect. Note that the “DS_” prefixes have been omied to save space.
UART0 UART1
TRANSPARE
NT
STDIO PACKET_SERIAL
UART0 Loopback Crossover
Wireless
Serial
Local
Terminal
Local SNAP Connect, Portal,
or another SNAP Node
UART1 Crossover Loopback
Wireless
Serial
Local
Terminal
Local SNAP Connect, Portal,
or Another SNAP Node
TRANSPARENT
Wireless
Serial
Wireless
Serial
Loopback
Remote
Terminal
Remote SNAP Connect
Any given data sink can be the desnaon for mulple data sources, but a data source can only be connected to
a single desnaon. Therefore, if you cross-connect two elements you cannot direct serial data from either of
those elements to addionally go anywhere else, but you can sll direct other elements to be routed to one of
the elements specified in the cross-connect.
The DS_ERROR element is a data source, but cannot be a data sink. Uniconnecng DS_ERROR to a desnaon
causes any error messages generated by your program to be routed to that sink. In this way, you can (for
example) route error messages to Portal while allowing other serial data to be directed to a UART.
You can configure Portal (using the preferences menu) to intercept just errors, non-error text, or both when you
intercept STDIO to the applicaon. Refer to the Portal Reference Manual.
Loopback
A command like crossConnect(DS_UART0, DS_UART0) will setup an automac loopback. Incoming
characters will automacally be sent back out the same interface.
Crossover
A command like crossConnect(DS_UART0, DS_UART1) will send characters received on UART0 out UART1,
and characters received on UART1 out UART0.
Wireless Serial
As menoned previously, a command of: crossConnect(DS_UART0, DS_TRANSPARENT)will send characters
received on UART0 Over The Air (OTA).
Where the data will actually be sent is controlled by other SNAPpy built-ins. Refer to the API secon of the SNAP
Reference Manual regarding the ucastSerial() and mcastSerial() funcons.
22 SNAP® Network Operang System