You are on page 1of 46

Aquacomm2.

4K User and Programming Manual

Prepared By DSPComm Pty Ltd


Level 1 9 Collingwood Street Osborne Park, WA 6017 Australia

Rev Date 18th Jun 2010 Revision 1

Table of Contents
Introduction........................................................................................................................5 Underwater two way communications requirements........................................................6 Communications path.........................................................................................................6 Data communications modes........................................................................................8 Host-Modem interface...................................................................................................9 Data mode - DAT mode .............................................................................................9 Power save data mode - PSAVRX.............................................................................10 Switching between modes..........................................................................................13 Command mode (COM mode)..................................................................................14 The Command mode packet structure.......................................................................14 Command mode protocol...........................................................................................15 Command...................................................................................................................16 Length........................................................................................................................17 Payload.......................................................................................................................17 Data transfer commands.............................................................................................18 TRANSMIT DATA - 01................................................................................18 RECEIVE DATA - 02...................................................................................18 RXERROR - 06.............................................................................................19 BROADCAST DATA - 16............................................................................19 Modem control commands.........................................................................................21 RESET SERIAL LINK 00..........................................................................21 RXON - 03.....................................................................................................21 SLEEP - 04....................................................................................................22 CONFIGURATION - 09...............................................................................23 PING - 10.......................................................................................................30 SET ADDRESS - 11......................................................................................30 READ CONFIGURATION - 12...................................................................31 WRITE CONFIGURATION - 13..................................................................32 TRANSMIT DELAY - 14.............................................................................32 COMMUNICATION MODE - 15.................................................................33 WDT Byte1: Bit2........................................................................................35 REPORT RMS - 17.......................................................................................35 MEASURE RANGE 18..............................................................................35 SOUND VELOCITY 19............................................................................36 UPDATE PROGRAM FLASH 20............................................................36 Modem status messages.............................................................................................37 TXSTATUS - 05............................................................................................37 HOST COMMAND ACKNOWLEDGE - 07...............................................38 DEBUG MESSAGE - 08...............................................................................38
DSP CommPty Ltd Aquacomm 2.4K Manual Page 2

Programming examples....................................................................................................39 Switching between DAT mode and COM mode.......................................................39 Switching from DAT to COM...................................................................................39 Switching from COM to DAT...................................................................................39 Setting the transmit voltage level................................................................................40 Changing the address..................................................................................................41 Changing the serial port baud rate............................................................................41 Aquacomm wet communications protocol.......................................................................42 Case 1: Typical operational scenario sequence diagram...........................................43 Case 2: Automatic transmit repeat.............................................................................44

Figures
Figure 1 Underwater communications system..................................................................6 Figure 2 Aquacomm PSAVRX Operations.....................................................................11 Figure 3 Command packet structure...............................................................................14 Figure 4 Aquacomm underwater networking.................................................................20 Figure 5 Command mode acoustic data communications sequence..............................43 Figure 6 DAT (transparent) mode acoustic data communications sequence ...............44

Tables
Table 1 List of Commands................................................................................................16 Table 2: ATO setting vs Communications range.............................................................28 Table 3 Configuration display..........................................................................................31 Table 4 Serial port baud programming............................................................................34

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 3

Copyright
This document is confidential and propriety to DSPComm Pty Ltd. This document is for the sole use of the intended party. This document shall not be disseminated in any form to a third party without the express permission of DSPComm Pty Ltd. Information furnished herein by DSPComm Pty Ltd is believed to be accurate and reliable. However, DSPComm Pty Ltd assumes no liability for errors that may appear in this document, or for liability otherwise arising from the application or use of any such information. Printed in Western Australia. Copyright 2002-2010 by DSPComm Pty Ltd. All rights reserved.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 4

Introduction
This document describes programming the parameters of Aquacomm as well as the communications protocol in relation to underwater communication applications. This protocol is designed for half duplex communications. An important objective of the protocol is to be easily extensible yet be simple for easy integration with customers host controllers. This manual should be read in conjunction with the Aquacomm Installation Manual.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 5

Underwater two way communications requirements


As described in the Aquacomm information document and the user manual the communications between the surface and the submerged units will be half duplex. This means whilst one end is transmitting the other end will be receiving. The modems cannot transmit and receive simultaneously. Any one modem can communicate with several other modems by using their unique addresses. The addressing is embedded in the signalling and does not need to be sent with the transmitted packet. In the Addressing section of this document this will be detailed further.

Communications path
This section will detail the communication path from the surface unit to the submerged unit.

Host-Modem serial interface Host (DTE) Surface Modem (DCE) Submerged Modem (DCE) Acoustic (wet) interface
Figure 1 Underwater communications system

Host (DTE)

The above diagram illustrates the communications interfaces where the protocols need to be defined. The information is carried through each interface by using data packets. The data is transported on the Host-Modem serial interface by electrical signals and in the case of the wet interface by acoustic signals.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 6

As an example of transporting data from one point to another, serial data that is sent by the surface host controller to the surface modem will first be encoded and formed into a data packet. This data packet is then converted to an acoustic signal, which is sent through the underwater channel. The receiving modem will convert the acoustic signal back into data, check for errors and pass on the data to the attached Host controller via the serial interface. The wet communications protocol is automatic repeat request with time out (ARQ-TO). What this means is that the sender will wait for an acknowledge (ACK) from the remote end that the message was received and decoded correctly. If an ACK was not received the transmitter after a time out will retransmit the message. After a number of retries the sender will give up (taken as a not acknowledge from the remote end - NACK) and let the host know that it was unsuccessful in sending the message. In communications systems parlance, modems are referred to as data communications equipment (DCE) and the host such as laptops or data loggers are referred to as data terminal equipment (DTE).

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 7

Data communications modes


There are four distinct modes that can be used to communicate data between modems. Two of the methods are available in the COM mode (command mode) and two methods in the DAT modem (transparent mode). COM mode data communications. 1. Use of the 01 transmit command. The data is input into the modem in a packet structure by the DTE and the modem tranmits the data once the packet is complete. The modem will wait for an acknowledge from the remote end. Whilst the modem is waiting for an ACK from the remote if the controller tries to send more transmit data the modem will reply with a Transmit busy signal. 2. Use of the 16 broadcast command. This is the same as the 01 transmit command except the modem does not wait for an ACK from the remote. Also the remote end does not send an ACK. This is a very useful form of data communicaitons as it is faster as well as allows the user to build their own protocol and allows networking. DAT mode data communications 1. If the modem is set to boot up in DAT mode then the modem acts as a transparent link. The Host can stream data into the modem which is buffered and transmitted in packets. The CTS line is used to control the flow of data from the host. 2. The PSAVRX mode which is a special DAT mode where the modems go automatically into lowpower receive if there is no activity. These modes are detailed later.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 8

Host-Modem interface
There are two main modes for the Host (DTE) to communicate with the modem. The default mode, which is the Data mode (DAT) and the other, is the Command mode (COM). There is also a third (newly developed) DTE-DCE transparent communications mode called PSAVRX which will be explained later in this document. This mode is a subset of the DAT mode. The user can switch between these modes using the break signal.

Data mode - DAT mode


In the data mode (DAT mode) the modem acts as a transparent data communications link. In other words a special protocol is not required for the DTE to send data to the modem for transmission. Any data sent to the modem (DCE), is encoded and transmitted to the remote modem. The remote modem will decode the received signal and recover the original data and send it on to the attached DTE. For example if hello world was typed from one laptop the data would be sent to the remote modem decoded and hello world would appear on the screen of the receiving end laptop. This mode is useful where the users device does not need to be specially programmed to work with the modem. If the device for example outputs temperature measurements on the serial port the modem can be used to send this data to the surface. In the DAT mode the modem has a 2Kbyte internal buffer so that the host can stream data into it. The modem will then break up the buffer into packets and tranmit the data until the buffer is empty. The modem uses hardware handshaking to control the data streaming into the modem. Specifically the CTS line out to the controller is used. This way large files can be transferred. The TSD (Transmit Send Delay command 14) is used to control the time out of when the modem will start transmitting the data once it is streamed in. Please see command 14 for details.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 9

Power save data mode - PSAVRX


To set the Aquacomm into PSAVRX mode the Communications Mode command 15 is used. Please refer below on how to set the appropriate (TTM) bit in the command 15 and save the configuration into Flash later on in the document. To program the modem out of this mode, cycle power to the modem and when the boot up screen is displayed go into Command mode using the break signal. In the command mode reset the TTM bit in the Communications Mode command and save the configuration by command 13. Cycle power and the modem will be in the normal 100% Receive mode. Please refer below for details. The PSAVRX mode was specially developed for applications where for example oceanographic instruments need to beam data to the surface periodically and then onshore in real time. Typically for this type of application, a Subsea package will be deployed on the Seafloor and a surface buoy will be in the vicinity. An Aquacomm can then be connected to the instrument on the seafloor and another Aquacomm at the surface buoy. The surface buoy will usually incorporate a radio modem or a satellite modem. The Aquacomm at the surface will be connected to this radio device via the RS232 port. In the PSAVRX mode the modem, after boot up, will automatically go into low power receive mode in approximately one minute. This will be indicated on the boot up screen. In the low power receive mode the modem will be sleeping most of the time and periodically wake up and look for valid Aquacomm signals. If it does not find any it will go back to sleep. This cycle will repeat continuously. The Subsea instrument will then make measurements periodically and send this data to the attached modem. Refer the diagram on the next page.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 10

Aquacomm PSAVRX Operation


Subsea Instrument Subsea Aquacomm Surface Aquacomm Surface buoy

Data Ready wait for CTS

Periodic Wake up CTS asserted Send RS232 data Transmit wake up Ping ACK Ping Transmit buffered data ACK Data Timed wait for more host data or Acoustic data from surface No more activity, Go back to Low power RX Loop Send Received data via RS232 Timed wait for more host data or Acoustic data from subsea No more activity, Go back to Low power RX Loop Wake up

Figure 2 Aquacomm PSAVRX Operations

With reference to the above diagram the Subsea instrument will send data to the attached modem when it periodically wakes up to look for valid signals. When the modem wakes up the CTS line on the serial port is asserted to let the instrument know that the modem is ready to receive data. The instrument should monitor the CTS line on the serial port for this activity, which means that the RS232 port on the instrument should use hardware handshaking and be able to buffer the data until the modem wakes up briefly to listen for Pings. Once the data is streamed into the attached modem (initiating modem) it will buffer the data in a (2 Kbyte) buffer and wake up the remote modem by sending a Ping signal. The remote modem will then acknowledge (ACK) the Ping. Subsequently the initiating modem will transmit the buffered data to the remote modem. The data is broken down into packets and these packets are transmitted in sequence. For each transmission the remote modem will ACK. At the end of sending all the buffered date the modems will remain awake for approximately twenty seconds to see if there is further activity. If not the modems go back into the cyclical sleep/wake mode.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 11

In this mode the modems are woken up either from receiving data from the attached host or from a remote modem sending a Ping to it. The link is bidirectional and the initiation to send data can happen from either end. If woken up by a Ping the modem will listen for a while and if no further data is received will go back to sleep.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 12

Switching between modes


The user can switch between the data mode and the command mode and vice-versa at any time. Sending a special signal called the break signal on the serial port does the switching between the modes. The break signal cannot occur on the serial port during normal exchange of data. Hence this is a safe way of switching between modes. If a terminal program is being used such as Terra Term read the help section to find out how to send a break signal. For example if you want to switch from the data mode to the Command mode send the break signal and COM will appear. Now commands can be sent to the modem. To switch back send the break signal and DAT will appear on the screen. Now you are back in the transparent data mode.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 13

Command mode (COM mode)


In the command mode the host can configure the modem, transmit, get transmit status, check configuration etc To communicate with Aquacomm in this mode the host has to use a protocol unlike the transparent mode. In this protocol the data that needs to be sent to the modem needs to be formed into a packet. Any data that arrives from the modem will also be in packet form.

The Command mode packet structure

CO M M A N 2BYTE S

LENGTH 2BYTE S

PAYLO AD N BYTE S (N: 0..99)

Figure 3 Command packet structure

The above diagram shows the communications packet used for the Host-Modem interface. The size of each field is shown and explained below. The Payload part of the packet consists of data to be acted upon by the particular function of the command. The Payload could consist of ASCII or binary data. Subsequent sections will discuss details of the payload structure, the commands and the transaction protocol for the transfer of data.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 14

Command mode protocol


In the command mode when a command is sent to the modem, the modem always acknowledges the command either that it understood and acted on the command or that it did not understand the command and rejected the command. For example if the transmit command is sent to the modem: 0105hello the modem will reply 07011, which is the acknowledge from the modem that it understood the command and acted on it. However if a wrong command was sent for example 2006somdat then the modem would reply 07010, which is the not acknowledge saying that the command was not understood and that it was rejected.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 15

Command
This field is always two bytes and carries the command information regarding the intention of the packet. The commands can be broadly divided into three categories. These are data transfer commands, commands to control the modem and commands to indicate status. The following table summarises the commands.

Command RESET SERIAL LINK TX RX RXON SLEEP TX-STATUS RX-ERROR HOST-CMND-ACK DEBUG MESSAGE SET CONFIGURATION PING SET ADDRESS READ CONFIGURATION SAVE CONFIGURATION TRANSMIT DELAY COMMUNICATION MODE BROADCAST REPORT RMS RANGING SOUND VELOCITY UPDATE FIRMWARE Table 1 List of Commands

Code 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15

Description Resets the serial communications link Transmit data to remote Received data from remote Turn on receiver and transmitter off Commands the Modem to go into shutdown Transmit status Received data from remote with error(s) in packet Acknowledge to commands sent by Host Debug messages Configuration string sent by Host Ping remote modem Sets the address of the modem for data transfer Reads the configuration presently set in the modem Writes the current configuration to flash (non-volatile memory) Time delay to start of transmit in transparent mode Boot in command mode only or transparent and command mode. Set serial port baude rate Transmit broadcast packet to modems on same address. Used for networking. Report RMS of received signal and noise Measure distance to remote modem Set the speed of sound for ranging Open program flash to update firmware

Direction Host to Modem Host to Modem Modem to Host Host to Modem Host to Modem Modem to Host Modem to Host Modem to Host Modem to Host Host to Modem Host to Modem Host to Modem Host to Modem Host to Modem Host to Modem Host to Modem

16 17 18 19 20

Host to Modem Host to Modem Host to Modem Host to Modem Host to Modem

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 16

Length
Length of payload in bytes. The length can vary from 0 to a maximum of 99.

Payload
The Payload may vary from 0 bytes to 99 bytes. For example in the SLEEP command the payload would be zero. For RXON the payload might carry further information regarding the duty cycle mode for the receive operation. Some of the commands have fixed payload sizes such as TX-STATUS. However the payload size is always given in the packet.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 17

Command details
Data transfer commands
TRANSMIT DATA - 01
01 30 30BYTE S OF DATA

Transmit data to the remote modem acoustically. The modem will add its own framing and error detection information to this packet and send it to the remote Aquacomm. The maximum payload length for the transmit command is 64 bytes. If a payload length of greater than 64 bytes is sent to the modem in the Transmit data command the modem will generate a length error status message (050204) and will not transmit the packet. See further on in the manual regarding transmit status messages under the section Staus Messages. The CTS line can also be used to monitor if the transmitter is busy. When the transmitter is busy the CTS line is de-asserted and vice-versa. Example: 0105hello (transmit hello to remote modem) RECEIVE DATA - 02
02 16 16BYTE S OF DATA

Receive data from the remote modem. The modem checks for the validity of the message by using error detection information. Any received packet where the packet cannot be validated is discarded. This packet is sent from the modem to the host. Example: 0205hello (received hello from remote modem)

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 18

RXERROR - 06
06 09 9 BYTE S OF DATA

Data packet received from the remote with errors in the packet. This command is from the modem to the host. This is the same as command 02 except that the modem detected errors in the payload section of the packet. This reporting is enabled by setting bit 4 of the Communications Mode command (15). Details of how to set this bit are explained in the Communications Mode command. The reporting of data is useful where the host has error correction software. For example the data can be transmitted with error correction information added (Forward Error Correction). When the packet is received with errors then the host can correct the errors in the packet. If the RXERROR mode is not used the packet is discarded if there are errors detected. Errors are detected using a CRC checksum. In this mode the modem will only check if the received packet length is within range. BROADCAST DATA - 16
16 10 10BYTE S OF DATA

Broadcast data to the remote modems acoustically. The modem will add its own framing and error detection information to this packet and send it to the listening nodes on the network. This command is identical to the Transmit data command except the receiving modems will not acknowledge the received message as with the Transmit data command. This command is useful in networking modems where several nodes can be listening on a broadcast channel (broadcast channel is set by programming the addresses of the nodes to the same address). For example in a network scenario one modem could broadcast data to several modems simultaneously or a modem could transmit its intention on the broadcast channel that it wants to communicate with a particular modem by broadcasting the node identifier of that modem. Then these two modems can go into a private channel (by setting another address) and communicate between each other whilst leaving the broadcast channel free for other modems to set up private links. Aquacomm is a true Code Division Multiple Access Spread Spectrum (CDMA-SS) modem. Which means that if modems A and B are communicating with address 000001 then modems C and D could be communicating say on address 000002 simultaneously. The signal of A and B will appear as a noise signal to C and D and vice-versa.

Example: 1606NID003 (broadcast NID003 to listening nodes)


DSP CommPty Ltd Aquacomm 2.4K Manual Page 19

Figure 4 Aquacomm underwater networking

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 20

Modem control commands


RESET SERIAL LINK 00
00 00

This command resets or synchronizes the serial link between the Host and the Modem. It is recommended that after a power on reset the Host send this command until a Host Command Acknowledge (Command 07) is received from the modem. The reset command is also useful if for any reason there is no response for a command sent by the Host. This is usually due to a wrong command being sent by the modem or the command packet was typed incorrectly. To recover from such errors keep typing in one zero at a time until you get 07011 (command acknowledge from modem to host) reply from the modem. Now the modem command mode serial communications engine is reset and ready to receive the next command. Example: 0000 RXON - 03
034 02 REC EI V E MODE 2

The two bytes of the payload are to set the receive mode of the modem. Receive modes Payload byte value 0 1 2 Receive Mode RXOff - Receiver off RXOn - Receiver on continuously (100% duty cycle ) RXONPS - Receiver on power save mode (Rx on for 1 second and power save for 9 seconds).

Important note: When the modem is in the power save receive mode, during power save part of the cycle the modem will not respond to serial commands from the modem. Since the host would not know when the modem is in the Rx-On part of the cycle, the method to wake the modem and establish communications is to use the wakeup hardware line and set the modem to RXOff or RXOn. In these states the modem is fully awake. When the wakeup line is asserted the modem comes out of sleep for 1 second only, hence the command to take the modem out of the RXONPS state has to be sent within this time period. While the modem is in the RXONPS state and receives a valid message from the remote modem and notifies the host with the message, the modem will automatically change its

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 21

state to RXON. At this stage the Host has to decide whether to put the modem back into RXONPS state or some other RX state depending on the application requirements. Hence the Modem will not revert to the RXONPS state on its own following a valid reception of a message from the remote end. Example: 030202 (turn receiver on in power save mode)

SLEEP - 04
04 00

Host commands modem to sleep. The modem will enter a low power dormant state whilst retaining state information such as address etc. The modem will only respond to the wakeup hardware line. When this line is asserted the modem will return to the state that it was in immediately prior to the SLEEP command. When this command is issued the command acknowledge (07011) will not be sent by the modem as it would have gone to sleep. However when the modem comes out of sleep due to a wake up line assertion the acknowledge (that should have been the acknowledge for the sleep command) would be sent by the modem. Example: 0400

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 22

CONFIGURATION - 09
09 12 TX A M P L IT U D E 4 R X SEN S ITI V ITY 4 CONFIG PA R A M E T E R S 4

This 12-byte command is used to set various parameters and settings of the modem. This is one of the important commands of the modem. Once the configuration is set it can be checked by the read configuration (12) command and saved to non-volatile memory by the save configuration (13) command. If the parameters are not saved in non-volatile memory the changed values will be lost on power cycling or reset and whatever values that were last stored in non-volatile memory would be loaded. The first four bytes are for the transmit amplitude. The next four are for setting the receive sensitivity and the last four are for setting various parameters such as number of times to retransmit. Configuration payload description Transmit Amplitude: Location in payload: First four bytes Format: ASCII decimal Value range: 0000 0350 (or 0500 for latest rev 2.4Kbps modems) Default value: 0350 Description: This parameter sets the transmit voltage level. Larger the number, higher the voltage setting. For smaller transducers a larger setting needs to be used for the same acoustic power output when compared with larger transducers. The maximum acoustic power output is about 2.5watts and corresponds to the setting of 350. Halving this value to 175 will reduce the power output to one quarter ie 2.5watts/4 = 0.625 watts. This is due to the approximate relationship: Power output = Voltage2/Rw (Rw is water acoustic resistance) .

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 23

Receive sensitivity: Location in payload: Format: Value range: Default value:

Middle four bytes ASCII decimal 0120 2000 0800 for 100 bps 0150 for 2.4K bps (Varies depending on the type of Aquacomm model)

Description:

Higher the value of the parameter the lesser the sensitivity. Depending on the Aquacomm model supplied this setting varies significantly. For the 100bps model the values should be in the range of 500-2000. For 2.4Kbps models the receive sensitivity should be in the range of 120-500. If the receive sensitivity is set incorrectly either the modem will not detect or the modem will false detect and keep getting busy. One way to note false detection is when the modem is slow to respond to commands.

Configuration parameters: Hex Byte 3 ASCII (Unused) Hex Byte 2 ASCII Hex Byte 1 ASCII Hex Byte 0 ASCII

The last four bytes should be treated as ASCII hexadecimal values. That is the value in each byte field can be from 0..9, A, B, C, D, E and F. F represents the number 15 in hexadecimal (hex). It should be noted that though a byte can represent a number from 0 to 255, due to the use of ASCII there are redundant bits. Also since we are using ASCII hex numbers we are limited to numbers between 0-F(0-15). Hence each byte should be thought of as representing four bits (in pure binary only four bits are needed to represent a Hex number). Hex Byte 0 Hex Byte 0 is further broken down into the following: Bit 3 Bit 2 No of times to retry transmitting packet Parameter: Default: Value range: Description: Bit 1 Rx Signal strength Bit 0 Debug on/off

Debug on/off 0 (off) 0-1 Turning this bit on, the modem will send out debug messages. This is only useful for diagnostic and development purposes. In normal operation leave

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 24

this bit off, as there would be unnecessary clutter in the messages sent to the host.

Parameter: Default: Value range: Description:

Report receive signal strength 0 (off) 0-1 Turning this bit on, the modem will report the received signal strength of the message just received. This is useful for monitoring the signal strength of the received signal when setting up a link. For example if the receive signal strength is very strong the transmit power level of the remote end can be turned down, there by extending the battery life. In normal operation turn this bit off. The receive signal strength is reported as a 32 bit hexadecimal number for example S:013AF29B. Larger the number, higher the signal strength.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 25

Parameter: Default: Value range: Description:

Transmit retry 3 (bit3 and bit2 are set) 1-3 (0 is not allowed, will default to 3 if 0 entered) These two bits set the number of times the transmitter will try to send the message packet. The retry number can vary from 1 to 3. This means the transmitter will send at least once and a maximum of three times. Once a packet is transmitted and if there is no acknowledge from the remote the transmitter tries again. This parameter sets the number of times to retry sending the message packet to the remote. Hexbyte 0 is set to A. This means that the modem is set to two transmit retries, signal reporting is turned on and debug reporting is turned off.

Example:

Hex Byte 1 Hex Byte 1 is further broken down into the following: Bit 3 Bit 2 DAT mode transmit retry level Parameter: Default: Value range: Description: Bit 1 Reserved Bit 0 Assert pin on/off

Assert pin 0 (off) 0-1 Turning this parameter on allows the user to assert a hardware line in the remote modem by sending an acoustic command. This is useful for controlling hardware such as a power circuit relay on and off remotely. The modem will behave normally even when this feature is turned on. The only exception is that when the modem sees a particular received message it will assert a hardware line for a certain period. Contact DSPComm if further details are required on this feature. Set this bit to 0 if not required.

Parameter: Default: Value range: Description:

Reserved 0 (off) 0 Reserved for factory use. Keep this bit set to 0.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 26

Parameter: Default: Value range: Description:

DATA mode transmit retry level 1 0-3 This parameter is used in the DAT mode only. The transmit scheduler in the DAT mode will try to send the message to the receiver a number of times which depends on the value of this parameter and the transmit retry parameter in hex byte 0. The formula for computing the number of times the transmitter will retry is: Numbers of transmit retries = (DAT mode tx retry level + 1) x transmit retry For example if the DAT mode tx retry level is set to 3 and transmit retry is set to 2 the total number of transmit retries would be 8 times. This parameter is only applicable in the DAT mode. If data is transmitted in the COM mode then the number of retries is only controlled by the transmit retry parameter. In DAT mode at the end of trying and there was no acknowledge from the remote end the modem sends a NACK to the host.

Example:

Hex byte 1 is set to C. This means the scheduled transmit retry level is set to 3, reserved bit off and the control of the special hardware line by remote acoustic command is turned off.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 27

Hex Byte 2 Hex Byte 2 is further broken down into the following: Bit 3 Unused Parameter: Default: Value range: Description: Bit 2 Bit 1 Bit 0 Transmit message acknowledge time out (ATO) Transmit message acknowledge time out (ATO) 2 0-7 This important parameter sets the time period that the modem would wait for an acknowledge(ACK) from the remote modem for a transmitted message. Once the time expires the modem will retransmit the message. Each unit will add approximately half a second delay. Even if the ATO is set to zero there would be an inbuilt time out of 1 second. This parameter allows the user to set the time out to an optimum value suited for a particular application. If the remote modem is close by then it would make sense to set the ATO to a small number so that the through put efficiency is increased. If the remote end is at a large distance the number can be increased to take into account the round trip time delay. The following table gives the ATO setting and the maximum seperation between modems. ATO value 0 1 2 3 4 5 6 7 Seperation between modems in m 100 200 300 400 1000 2000 3000 4000

Table 2: ATO setting vs Communications range

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 28

Hex Byte 3 Hex Byte 3 is unused. Always enter 0 for this byte position Bit 3 Unused Bit 2 Unused Bit 1 Unused Bit 0 Unused

Example of a full configuration string: 091202000900038E This will configure the modems as follows, Transmit power setting: Receive threshold setting: Message acknowledge time out: Data mode transmit retry level: Assert hardware pin enable: Transmit retry count: Report receive signal strength: Debug messaging: 0200 0900 3 (1.5 seconds + default 0.5 seconds) 2 0 (Off) 3 1 (On) 0 (Off)

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 29

PING - 10
10 00

When the PING command is sent to the Modem, the Modem will send a zero length message to the remote modem to wake the remote Modem from the Power Save RX mode (RXONPS). This message is specialised where the encoding software adds a ten second long header to the message. This is done to maximise the probability of the remote Modem in power save mode, to detect the signal and awake. Even though this message has an extended header the protocol software treats this message as a normal TX message. Hence the originating Modem will try three times to get a response (ACK) from the remote. If the remote Modem successfully receives the PING message it will ACK the transmitting modem, notify the Host with the received message (02|00) and change itself to Normal RXON mode. At this point the remote modem is fully awake and messages can be transacted as normal. This approach was chosen to minimise the software complexity of the Host to control the Modem.

SET ADDRESS - 11
11 06 123456

This six-byte command is used to set the address (ADR) of the local Modem. The Modem will only respond to messages encoded with this address and the transmit messages will be encoded with this address. Hence for a Modem pair to establish communications both ends need to be set to the same address. During normal operation the Host would set the address once during the start up sequence following power on reset. The Modem will retain this address and will use it for all message transactions with the remote end. However the address can be changed at any time during normal operation. This allows a Host to communicate with multiple remote end modems for example in round robin fashion (star configuration). It should be noted that the Host should keep track of message transactions for a given session with a remote end so that the address is not changed prematurely as messages will be lost from the remote end once the address is changed. This command is also used in networking where any pair of modems can be set to a particular address and they can be communicating at the same time as another pair on a different address. See the Broadcast command for additional networking functionality.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 30

READ CONFIGURATION - 12
12 00

Reads the configuration parameters of the modem and sends them to the host. For details of these parameters refer to the Configuration command (09) and the set address command (11). The following will be displayed on the serial terminal emulator screen when this command is issued: Parameter (default value) PWR: 0350 THR: 0150 DBG: 0 RXS: 1 TXR: 3 RLB: 0 RXD: 0 SRT: 2 ATO: 3 TSD: 500 SVL: HDM: SBR: TTM: REM: WDT: ADR: FRQ: SNO: 1500 0 9600 0 0 1 123456 010000 0263 Description Transmit voltage setting Receive threshold or sensitivity setting Debug messages on/off Receive signal strength reporting on/off Number of transmit retries Remote acoustic control of hardware pin enable/disable Reserved for factory testing Data mode transmit retry level Transmit acknowledge time out round trip delay Transmit send delay in transparent mode Sound Velocity Setting Host data communication mode Serial port baud rate Transparent Transmit Mode Enable - Report received messages with error(s) in payload Watch dog function Enable Six digit modem address Reserved for factory testing Serial Number of the Modem Parameter set by command: Configuration - 09 Configuration - 09 Configuration - 09 Configuration - 09 Configuration - 09 Configuration - 09

Configuration - 09 Configuration - 09 Transmit delay - 14 Sound Velocity - 19 Communication Mode - 15 Communication Mode - 15 Communication Mode - 15 Communication Mode - 15 Communication Mode - 15 Set Address - 11 Set at Factory

Table 3 Configuration display

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 31

WRITE CONFIGURATION - 13
13 00

Writes the configuration parameters of the modem to non-volatile memory (Flash). This operation usually takes about 2 seconds to complete. This command will write all the configuration parameters as well as the address to non-volatile memory. Next time power is cycled or the modem is reset these parameters would be loaded from the non-volatile memory. For details of the configuration parameters refer to the Configuration command (09) and the set address command (11). TRANSMIT DELAY - 14
14 04 0500

This four-byte command is used to set the start of transmit delay in the Transparent mode or DAT mode. This command only affects the DAT mode transmit. This delay allows the modem to buffer the input data prior to packetising the data and scheduling for transmit in the DAT mode. For example a user might want to type and send a message via a laptop connected to the mode. There would be a delay between each key stroke. If the transmit delay was not there, then the modem would packetize and transmit each character separately. For example typing Hello would send five individual acoustic packets to the receive end and this would not be a very efficient use of the available energy. To overcome this the modem waits for sometime after the last data byte is received before scheduling for transmit. The length of this delay can be varied from 0 to 1000. The default of 0500 corresponds to approximately two second delay. This delay time can be shortened for controllers connected to the modem as the data would be received by the modem on the serial port without any delay (or minimal delay) between data bytes.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 32

COMMUNICATION MODE - 15
15 04 0031

This four-byte command is used to set several communications modes of the modem. They are: 1. The Host-Modem communications mode (HDM) 2. Host-Modem Serial port baud rate (SBR) 3. Transparent Transmit Mode (TTM) 4. Report received messages with error (REM) 5. CTS enable in COM mode 6. Watch dog function (WDT) The four bytes should be treated as hexadecimal digits (0-F). Only the last two bytes are used:
Bit3 N U Byte3 Bit2 Bit1 N N U U Bit0 N U Bit3 N U Byte2 Bit2 Bit1 N N U U Bit0 N U Bit3 N U Bit2 WD T Byte1 Bit1 CTS (CO M) Bit0 RE M Bit3 TTM Byte0 Bit2 Bit1 SBR Bit0 HD M

Note: NU Not Used

HDM Byte0:Bit0 The Host-Modem communication mode can be set to either DAT/COM communication or COM mode only communication. The DAT/COM mode communication with the host is the default. In this mode the Modem boots up in the DAT mode and any data sent to the modem will be transmitted to the remote modem. To set the parameters of the modem the modem has to be put into the COM mode by using the break signal. Once the parameters are set the modem can be switched back into the DAT mode by using the break signal (or the modem can stay in the COM mode and data communication can be done with the Transmit Command). In the COM only mode the modem boots up in the COM mode and stays in this mode even if the break signal is sent or power is cycled. This mode is provided where customers require to only be in the command mode for communication and setting parameters dynamically. The COM mode allows precise control of data transmission and the greatest flexibility in terms of control of the modem. To get back into the DAT/COM mode the COM mode parameter has to be set to zero. To set into the COM only mode the COM mode parameter has to be set to one.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 33

SBR Byte0: Bit2| Bit1 This command is also used to set the serial port baud rate of the modem. The possible baud rates are 9600 bps (default), 2.4K0 bps, 2400 bps and 1200 bps. Only the last Hex byte is used. The LSB sets the HOST-Modem communication mode as explained above. Setting the LSB to 1 sets the COM only mode and setting the LSB to 0 sets the DAT/COM mode. The next two bits sets the serial port baud rate as follows: SBR Byte0 Bit2 Bit1 0 0 0 1 1 0 1 1 Sets Host-Modem Serial Port Baud Rate 9600 2.4K0 2400 1200

Table 4 Serial port baud programming TTM Byte0: Bit3 This bit sets the transparent transmit mode (TTM) bit on/off. The TTM bit controls which transparent mode the modem will boot up on. There are two transparent modes. One is the 100% RX duty cycle mode or the normal DAT mode and the other is the 10% RX duty cycle mode or the PSAVRX mode. Setting the TTM bit puts the modem into the PSAVRX mode on boot up and resetting the TTM bit puts the modem into normal 100% RX DAT mode. The PSAVRX mode is explained earlier in this manual. This bit is saved in non-volatile memory and the modem will go into either mode on power up depending on the setting. REM Byte1: Bit0 This bit when set enables reporting of received messages with errors in the data packet to the host. The received message is reported with the 06 command (please refer command 06 above) as opposed to the normal 02 receive command. This bit is saved in non-volatile memory by the command 13. CTS Byte1: Bit1 Setting the CTS bit will de-assert (disable the host sending data on the serial port) the Clear to Send line on the serial port whilst the modem is busy transmitting a message. This is only used in the command mode when transmitting data. To use this feature the host has to use hardware handshaking on the serial port and monitor the CTS line. This bit is not saved in non-volatile memory.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 34

WDT Byte1: Bit2 The watch dog timer function is enabled by setting this bit. The watch dog will monitor the program execution and if not operating correctly will reset the modem automatically. It is recommended that the watch dog function is used where ever possible, particularly in long term deployments. This bit is saved in non-volatile memory by the Save Configuration command 13. The watchdog timeout is approximately 1minute. There are two levels of saftey for the watch dog timer. The first level is a software routine that will check the status of the programme execution periodically and the second level is a hardware watch dog. If the first level does not catch the problem then the second level will. Examples : 14040005 sets the HOST-Modem communication mode to COM mode only and the serial port baud rate to 2400. 14040002 sets the HOST-Modem communication to DAT/COM mode and the serial port baud rate to 2.4K0. REPORT RMS - 17
17 00

This command will report the RMS2 of the received signal as seen by the receive algorithm. This value reported will be the current computed value. This value is updated by the system every 8msecs for the 2.4Kbps modem and every 32msecs by the 100bps modem. The value is reported as a 32bit hexadecimal number, example: R M S : 0023.FA28 MEASURE RANGE 18
18 00

This command is used for ranging (distance) measurements to the remote modem. The distance is reported in meters. The current implementation has an accuracy of +/-0.5m. The Aqurange modem was specially developed for high accuracy ranging and has an accuracy of 0.05m Std Dev.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 35

The range is measured by using the round trip delay time and also using the velocity of Sound set in the modem. The velocity of Sound value is set by the 19 command.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 36

SOUND VELOCITY 19
19 04 1497

This command is used to set the sound velocity for range measurements using command 18. The default value when the modem boots up is 1500 m/s. The host can set the value any time before or after a 18 command. The value is not saved in non-volatile memory. The sound velocity can be set to get more accuracy on the range measurements in a given location. The value can be in the range of 0 to 5000 m/s. UPDATE PROGRAM FLASH 20 20 06 736105

This command is used to update the firmware on the modem. Please contact DSPComm for further details on the procedure to upgrade the firmware.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 37

Modem status messages


TXSTATUS - 05
05 02 TRAN S M I T STAT U S 2

The TXSTATUS message is sent to the Host by the local Modem in response to a TX command (command -01). This status message is sent by the local modem after completing the transmit task. The payload part of the message indicates the success of the task. The following status description details the possible out comes of a transmit task. TRANSMIT STATUS 0 Transmitted ok. Received acknowledge from the remote modem. Upon receiving this message the Host knows that the remote Modem received the message intact. 1 Timed out. No reply from remote. The Modem tries to send the message three times and each time a time out is set to receive an acknowledge from the remote end. After the third retry, if there is no response from the remote this status message is sent to the Host.

2 3

Not used in this revision of the protocol. Transmitter busy. Try later. Whilst the Modem is busy with a transmit task and the Host sends another TX command then this message is sent to the Host to try later. The modem treats each transmit task as a transaction with the remote end and waits until the transaction is complete before processing another transmit task. Length error status message back to the host. If packets greater than 64 bytes are sent to the modem using the transmit command ex 0166[66bytes of data] the modem will generated this error message and will not transmit the packet. The maximum data length for transmit using the command mode is 64 bytes.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 38

HOST COMMAND ACKNOWLEDGE - 07


07 01 1

This status message sent by the Modem to the Host to indicate that either the Modem understood the command just sent or there was an error. The error could be due to several reasons. These are a wrong command being sent by the host, parameter values out of range in control commands or the serial link is out of sync. In the last case the serial link needs to be reset by sending the Reset command. Payload 1 0 Acknowledge indication Command Ack - Command understood Command Nack Command error

DEBUG MESSAGE - 08
08 10 10BYTE S OF DEB U G INFOR M AT ION

This message is sent from the modem to host containing debug information. The Host is not required to take any action except to display the message on screen or log to memory for tracing sequence of events. This feature can be turned on or off using the CONFIG (09) command.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 39

Programming examples
This section gives some examples to program the parameters of Aquacomm. This would help the user to gain an understanding of programming and saving the settings successfully. For detailed explanation of the commands see the previous section. If a mistake is made when typing in a command see the Reset Serial Link Command (0000) in the previous section of how to recover from the mistake.

Switching between DAT mode and COM mode


This example shows how to change between DAT mode and COM mode and vice-versa:

Switching from DAT to COM


1. Send break signal . The break signal for Windows terminal is ctrl+b for Terra term it is alt+b. The key combinations to send a break signal will vary depending on the serial terminal emulation program used. 2. The modem will reply COM on the screen signifying that the modem is in the command mode and is ready to accept commands.

Switching from COM to DAT


3. Send break signal . The break signal for Windows terminal is ctrl+b for Terra term it is alt+b. The key combinations to send a break signal will vary depending on the. 4. The modem will reply DAT on the screen signifying that the modem is in the transparent data mode. In this mode any characters entered from the keyboard will be transmitted

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 40

Setting the transmit voltage level


This example shows how to set the transmit voltage from 350 to 200. 1. Switch from DAT to COM following the earlier procedure if the modem is in DAT mode 2. Type 1200 to list the current configuration. The modem will display the current configuration thus: PWR: 0350 THR: 0150 DBG: 0 RXS: 1 TXR: 3 RLB: 0 RXD: 0 SRT: 2 ATO: 3 TSD: 500 HDM: 0 SBR: 9600 TTM: 0 REM: 0 WDT: 1 ADR: 123456 FRQ: 000000 (transmit voltage setting) (receive threshold or sensitivity setting) (debug messages on/off) (receive signal strength reporting on/off) (number of transmit retries) (remote acoustic control of hardware pin enable/disable) (reserved) (Data mode transmit retry level) (Transmit acknowledge time out round trip delay) (Transmit send delay in transparent mode) (Host data communication mode) (Serial port baud rate) (Transparent transmit mode) (Report rx messages with errors) (Watch dog function) (Six digit modem address) (Reserved)

3. Type 091202000150038C to set the new transmit voltage level to 200 (the four red characters). The parameters that need to stay the same as before should be typed in correctly so that the values remain unchanged. For example the THR was 0150 so type 0150 in the correct position the four green characters. ATO was 3 so type 3 at the correct position and SRT was 2 so type 8 at this position and the number of transmit retries is 3 so type C at the last byte position. For details of the Configuration command (09) see the previous section. 4. Type the command 1200 to display the configuration again to check that the parameters have been set correctly 5. Send the command 1300 to save the changes to non-volatile memory. 6. Switch back to DAT mode if required.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 41

Changing the address


1. 2. 3. 4. 5. 6. Go into COM mode if the modem is in DAT mode 1200 to display the parameter settings 1106000003 to change the address to 000003 1200 to display and confirm that the change has taken place 1300 to save parameters to Non-Volatile memory Go to DAT mode if required

Changing the serial port baud rate


For example the serial port baud rate needs to be changed from 9600 to 2400. 1. Go into COM mode if the modem is in DAT mode 2. 1200 to display the parameter settings and note the SBR parameter which should say SBR:9600 3. 15040004 to set the baud rate to 2400. It is important at this stage that the host terminal baud is also changed to 2400. Otherwise garbage will be shown on the screen as the terminal program on the PC will still be at 9600. 4. 1200 to display and confirm that the change has taken place. SBR now should display 2400 5. 1300 to save parameters to Non-Volatile memory 6. Go to DAT mode if required

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 42

Aquacomm wet communications protocol


The earlier sections detailed the command, control and status messaging between the Host and the local Modem. This section will detail the end-to-end protocol and the sequence of events once either end has initiated a message transaction. When a host initiates a transmit command the Modem treats this as a message transaction and completes the transaction before processing the next transmit command. If a message is received (not the ACK) from the remote end whilst in a transmit transaction the Modem will immediately ACK the received message and send the received message to the Host. The in-water protocol used by the Modem is confirmed packet delivery with time out repeat request (TRQ). In other words the Modem that initiated the transmit waits for an ACK. If an ACK is not received during the time out period the message is repeated. The repetition is carried out three times. If the Modem does not receive an ACK for any of the repetitions the Modem informs the Host that there was no response (TXSTATUS Time out). From the point of view of the receiving Modem will immediately respond with an ACK only if a message was received and decoded correctly. If there are errors in the received message the receiving Modem does not reply. This method reduces the amount of times the Modem has to transmit, reduces clutter of messages and conserves battery life, which is important to the submerged Modems. The disadvantage is that in noisy conditions a message transaction could take longer to complete. The following sequence diagram and sequence descriptions illustrate the protocol in greater detail.

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 43

Case 1: Typical operational scenario sequence diagram


Surfaceunit - Master Host Modem Submergedunit - Slave Modem
1.rxOn(1) 2. tx( ) 2a. cmndack(1) 5. txStatus( ) 3. mtx( ) 4. ack( ) 6. rx( ) 7. tx( ) 7a. cmndAck() 10.txStatus( ) 1a.cmndAck(1)

Host

8. mtx( ) 9. ack( ) 11.rx( )

Figure 5 Command mode acoustic data communications sequence Explanation of above sequence diagram. The line numbers corresponds to each command or message in the above diagram. 1. Enable slave unit modem receive, 1a. Modem Acks command 2. Master sends transmit command to modem, 2a. Modem Acks command 3. Modem encodes transmit packet, start time out for response and transmits encoded message to slave modem 4. Slave modem acknowledges correct receipt of message 5. Master modem sends tx_status message to master-host that message sent without error ( if there are tx errors at this point these would be notified to the host with this command ) 6. Slave modem sends rx message to slave host with message data. 7. Some time later the Slave modem sends a message to the Master by sending tx command to slave modem. 7a. Modem acks command
DSP CommPty Ltd Page 44

Aquacomm 2.4K Manual

8. All sequences following follow as above. The above diagram illustrates the sequence of events following a transmit command.

Case 2: Automatic transmit repeat


The following sequence description illustrates a case where the originating Modem repeats the transmit message to get a response from the remote.
Host Modem Modem Host

Tx()

2a. cmndAck(1)
StartTimer()

TxMx(

RxOn() TxMx( [ TimeOut] Rx() Ack() TxStatus()

Figure 6 DAT (transparent) mode acoustic data communications sequence

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 45

DSP CommPty Ltd

Aquacomm 2.4K Manual

Page 46

You might also like