CommandFusion Wiki

Documentation Resources

User Tools

Site Tools


hardware:cflink:on-board-rs232-port-protocol

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

hardware:cflink:on-board-rs232-port-protocol [2015/07/02 05:02]
jarrod
hardware:cflink:on-board-rs232-port-protocol [2015/07/02 05:09] (current)
jarrod [SPR - Serial Port Read]
Line 27: Line 27:
 </​sxh>​ </​sxh>​
  
-See the [[#SPC|''​SPC''​ command]] for details on each returned data parameter.+See the [[#spc-serial-port-configuration|''​SPC''​ command]] for details on each returned data parameter.
  
 === Example === === Example ===
Line 46: Line 46:
 ==== SPC - Serial Port Configuration ==== ==== SPC - Serial Port Configuration ====
  
-The ''​SPC''​ (Serial Port Configuration) command is used to configure the properties of the serial port such as Port ModeBaud rate, Flow Control, etc.+The ''​SPC''​ (Serial Port Configuration) command is used to configure the properties of the serial port such as port modebaud rate, flow control, etc.
  
 === Data === === Data ===
Line 57: Line 57:
     * ''​OFF''​ (Disabled) means the serial port is turned off, disabled entirely.     * ''​OFF''​ (Disabled) means the serial port is turned off, disabled entirely.
     * ''​PGM''​ (Program Mode) means incoming data must be valid CFLink formatted commands, and allows you to send data to any device on the CFLink network via RS232. All CFLink data received by the device will also be sent out the RS232 port in this mode.     * ''​PGM''​ (Program Mode) means incoming data must be valid CFLink formatted commands, and allows you to send data to any device on the CFLink network via RS232. All CFLink data received by the device will also be sent out the RS232 port in this mode.
-    * ''​232''​ (RS232 Mode) means incoming data is sent only to devices that are configured via the TGT command. The incoming RS232 data will be wrapped in a SPR reply before being sent to the target devices. Data is sent to the RS232 port using the SPW command when in this mode. +    * ''​232''​ (RS232 Mode) means incoming data is sent to devices that are configured via the ''​TGT'' ​command, as well as any network sockets on the device itself. The incoming RS232 data will be wrapped in a SPR reply before being sent to the target devices. Data is sent to the RS232 port using the SPW command when in this mode. 
-    * ''​TCP''​ **SOLO ONLY** (RS232 Mode with TCP Server) is the same as ''​232''​ mode, except that a TCP Server socket is opened (TCP port 10208 for Serial Port 1, TCP port 10209 for Serial Port 2). Up to 4 TCP Clients can connect to each port, and data is simply piped between the TCP Client and the RS232 port. This is essentially turning the [[hardware:​solo|Solo]] into an RS232 to Ethernet adapter.+    * ''​TCP''​ **SOLO ONLY** (RS232 Mode with TCP Server) is the same as ''​232''​ mode, except that a TCP Server socket is opened (TCP port 10208 for Serial Port 1, TCP port 10209 for Serial Port 2). Up to 4 TCP Clients can connect to each port, and data is simply piped between the TCP Client and the RS232 port. This is essentially turning the [[hardware:​solo|Solo]] into an RS232 to Ethernet adapter. Data does NOT need to be wrapped in CFLink packets to be sent/​received in this mode. The data received via the TCP Socket is piped directly to the RS232 port unchanged.
   * **<​BAUD>​** = The baud rate of the RS232 port:   * **<​BAUD>​** = The baud rate of the RS232 port:
     * 100     * 100
Line 177: Line 177:
 === Data === === Data ===
 <sxh cflink; light: true> <sxh cflink; light: true>
-< [F2]<​ID>​[F3]R<​DEVICE>​SPR[F4]<​DATA>​[F5][F5]+< [F2]<​ID>​[F3]R<​DEVICE>​SPR[F4]<​PORT>:​<​DATA>​[F5][F5]
 </​sxh>​ </​sxh>​
 +
 +  * **<​PORT>​** = Only present if the device has more than one on-board RS232 port, such as the [[hardware:​solo|Solo]].
 +  * **<​DATA>​** = The data that was received.
  
 === Example === === Example ===
Line 187: Line 190:
 < [F2][04][F3]RMINSPR[F4]Hello World!\x0D[F5][F5] < [F2][04][F3]RMINSPR[F4]Hello World!\x0D[F5][F5]
 < [F2][07][F3]RMINSPR[F4]Hello World!\x0D[F5][F5] < [F2][07][F3]RMINSPR[F4]Hello World!\x0D[F5][F5]
 +
 +// An incoming message "Hello World!"​ followed by a carriage return is received on the first on-board serial port of a Solo on CFLink ID [03].
 +// The Solo is configured to send incoming RS232 data to all CFLink ID's.
 +< [F2][FF][F3]RSOLSPR[F4]P01:​Hello World!\x0D[F5][F5]
 </​sxh>​ </​sxh>​
hardware/cflink/on-board-rs232-port-protocol.1435813341.txt.gz · Last modified: 2015/07/02 05:02 by jarrod