# Data Format All data sent over the SeaSense data link should conform to the following format: Data Bits: 8 Start Bits: 1 Stop Bits: 1 Parity: None Flow Control: None # Baud Rate The following baud rates are available: 9600 bps 19200 bps 57600 bps The baud rate can be set using the BAUD command. # Format Start-of-Frame (SoF) 1 “!” Yes Station Address (STN) 3 “010” Yes Address Separator (A/S) 1 “:” Yes Command ID (CMD ID) 4 “lout” Yes Access Code (ACS) 1 “=” Required for most commands Data Payload <16 “100” Required for some commands Data Separator (D/S) 1 “*” Required for checksum Checksum (CS) 2 “A8” Optional End-of-Frame (EoF) 2 Yes # Access Code WRITE “=” Sets the parameter referenced by the Command ID to the value in the following Data field READ “?” Queries the parameter referenced by the Command ID INCREMENT / ADD “+” For Command IDs which modify system parameters “+” will INCREMENT the parameter by the value in the data field. If no value is passed then a coarse increment value is implied (nominally 10%). For Command IDs which access parameter lists, “+” is used to ADD items to the list. DECREMENT / REMOVE “-“ For Command IDs which modify system parameters “-” will DECREMENT the parameter by the value in the data field. If no value is passed then a coarse decrement value is implied (nominally 10%). For Command IDs which access parameter lists, “-” is used to REMOVE items from the list. IMMEDIATE1 -OMITTED- Immediate access type commands have no data payload and trigger a specific immediate behavior in the target node. No access code or data shall be sent. # Checksum The optional checksum field is comprised of a 2-character ASCII encoded hexadecimal value. This value represents the lower 8-bits of the running numeric total of the preceding characters up to and including the data separator. In critical applications it provides additional data validation and a means for the receiving peripheral device to detect bit errors that may otherwise go undetected. See 6.4Error! Reference source not found. for more information and xamples of calculating checksum values. If the checksum feature is not used, omit the Data Separator and any characters between the end of the data field and the End-of-Frame marker. # End-of-Frame Marker (EoF) Each command string shall end with the End-of-Frame marker comprised of a Carriage Return (, [0x0D]) followed by a Line Feed (, [0x0A]). # Node Response Format There are only three valid responses from a networked node to the bus host: acknowledge (ACK), acknowledge with data, and not acknowledge (NAK). ACK – confirms the receipt, proper interpretation, and execution of a valid message by the node at the command message’s station address. ACK is represented by the EoF marker, a Carriage Return (, [0x0D]), character followed by a Line Feed (, [0x0A]). ACK with data – Node addressed commands with the READ, “?”, access type will be followed by a data string. The message will consist of alphanumeric ASCII characters containing the requested data followed by an End-of-Frame marker comprised of a Carriage Return (,[0x0D]) followed by a Line Feed (,[0x0A]). Note that using a READ access type with broadcast or group addressed commands is not permitted and thus will not be responded to by any node. NAK – Not acknowledged will be returned if a node receives a properly addressed and formatted command that the node was unable to carry out. This may indicate that the Command ID is not recognized by the node that received it or an invalid or out of range data payload was received. A NAK response is comprised of a “?” [0x3F] character followed by the EoF marker: “?” + . NOTE: Commands containing checksum errors, even if addressed and otherwise properly formatted, will not be responded to. # Common Configuration Commands Command: Type: Description Access Broadcastable: Type: User Preset: “ADDR” Common read or set the node station ADDRess ?, = NO NO “ADGR” Common set or read ADdress GRoup associations ?, =,+,- YES NO “BAUD” Common set or read the peripheral BAUD rate ?, = YES NO “BOOT” Common BOOT up configuration at power on ?, = YES NO “INFO” Common request device INFOrmation string ? NO NO “PSET” Common set node PreSET configuration ?, =,+,- YES NO “RSET” Common factory configuration ReSET ?, = NO NO “STAT” Common Read device STATus string ? NO NO “STBY” Common enter or exit STandBY power mode ?, =,+,- YES YES “TEMP” Common request internal system TEMPerature ? NO NO # Read the station address back from the node at “010” !010:addr?*F0 # Set the station address of the node at “010” to “001” !010:addr=001*7F #adgr: Group Address Associations The “adgr”, address group association command provides an interface for setting and reading node group addressing modes. See Appendix B for more information on group addressing modes.Set or read group address associations READ: ? “001–255” - WRITE: =,+,- “001–255”, GRP “301” – “332” Read the active group addresses for the node at “010” !010:adgr? # Read the baud rate setting for the node at “010” !010:baud? Change the baud rate of the node at “010” to 57600 !010:baud=3 Baud Codes 9600 1 19200 2 57600 3 # boot: Power On Boot Mode Configuration Query the power up mode for the node at “010” !010:boot? Set the node at “010” to boot up in factory default mode !010:boot=0*37 Set the nodes in group “301” to boot up with preset 1 !301:boot=1*3B # info: Peripheral Device Information Read the information string from the node at “010” !010:info?*01 STN: Station Address – 3-digit station address FAM-MODEL: Product Family – Model – DeepSea product family and model number S/N: Serial Number – Unique factory programmed serial number PCB VER.: PCB Version – Interface PCB version FW VER.: Firmware Version – RS-485 interface firmware version OPTION 1-N: Configuration optional fields – Product options fields, number and definition vary per product EoF: End of Frame – End of frame marker to indicate the end of the information string. # pset: Node Configuration Presets # Query the node at “010” to list all configured preset states !010:pset?*11 #Recall preset 1 for node “010” !010:pset=1*40 #Recall preset 2 for group “301” !301:pset=2*44 #Save the current state of node “010” to preset 16 !010:pset+16*64 #Clear the node configuration state saved at preset 3 !010:pset-3*32 # rset: Factory Settings Reset WARNING: A node reset will restore the node back to the factory set configuration. All user editable parameters, such as the baud rate, station address, and group address associations, will be reset and any saved presets will be lost. A factory setting reset can be initiated by first querying a node for a unique one-time use 4-character reset key and then immediately writing that key back to the node before issuing any other commands. The factory reset will be unsuccessful if another command is issued to the node in between a reset key query and the reset command and the reset sequence will need to be restarted. After transmitting a valid reset key the node will first respond back with an acknowledge message and then immediately perform the factory reset operation. # Query the node at “010” for the reset key !010:rset?*13 # Write the reset password to the node at “010” !010:rset=4a93*DF # stat: Device Status Data !000:stat? # stby: Standby Power State Control Read the standby state of the node at “010” (full power) !010:stby? Put the node at “010” into standby power mode !010:stby=1 Put all nodes in group “301” into standby power mode !301:stby+*06 Put all nodes in the network into standby power mode !000:stby=1*45 Wake up all nodes in group “301” from standby mode !301:stby-*08 Wake up the node at “010” from standby power mode !301:stby=0*48 Wake up all nodes in the network from standby mode !000:stby=0*44 # temp: Peripheral Device Temperature Read the temperature from the node at “010” !010:temp?*0B # lout: Light Output Level Read the light output set point from the node at “010” !010:lout?*19 Coarse increment the light output at node “005” !005:lout+*09 Set the output of lights in address group “301” to “50” !301:lout=50*7F Increment the light output at node “010” by “2” !010:lout+2*37 Set the output of lights in address group “301” to “50” !301:lout=50*7F ############## Testing # request status !000:stat? # request info !000:info? # read boot mode !000:boot? # read light output !000:lout? # set light output level (0-100) !000:lout=50 # coarse increment light output level !000:lout+ # increment light output level !000:lout+2 # decrement light output level !000:lout-2 # wake from stby !000:stby=0