Hanna Instruments HI 504903 User Manual
Page 22

43
42
• Make a data call to cellular phone number with the modem;
• After the reception of the “CONNECT” notification string
(i.e. the data connection establishment), wait for the string
“RDY
interface is ready to receive a command from the remote PC;
• If the password was enabled in the phone interface during
last configuration (see “Interface configuration”), the appli-
cation software must send the password within 3 minutes
through the command “PWD
and the interface will answer
word is correct, or
correct, or
and hangs up the call when 3 minutes have elapsed.
Local channel selection
Before communicating with one of the loggers attached to
HI504903, the application software on remote PC needs to
specify to the interface to use the RS485 channel with 1200 bps
(this is baud rate used by interface to communicate with HI142
during polling procedure). To do this, the C0A
mand has to be sent to HI504903. The cellular phone interface
will send back
otherwise
nel is not configured in the instrument. When command is
correctly recognized, baud rate in the local PC must be set to
1200 bps. In this way the local PC and the selected instrument
are connected directly and everything works like a direct point-
to-point connection (if we exclude the delay issues).
Remote channel selection
Also in remote communication session the application software
needs to select a channel, but the procedure is a bit different
from the local one. Before communicating with one of the in-
struments attached to HI504903, the application software on
remote PC needs to specify to the interface to use the RS485
channel with 1200 bps. To do this, the C0A
has to be sent to cellular interface. The phone interface will
send back “+++” (the “+++” is needed to return tempo-
rarily to command mode in the cell phone to change baud
rate) and then, after several seconds,
is correctly recognized, otherwise
sent back if the required channel is not configured in the instru-
ment. When command is correctly recognized, the local PC
and the selected remote instrument are connected directly and
PC COMMUNICATION PROTOCOL
Even if it is strongly recommended to use HI92140 software
to establish local or remote connections between HI504903
and a PC, it is possible to try also without HI92140 by build-
ing the application software for communication session
management (i.e. session establishment, serial port channel
selection and session termination). It is necessary to issue to
the interface towards PC some simple commands accom-
plishing with the protocol implemented on HI504903.
Commands are composed of three parts: command identi-
fier, parameter (when needed), end of command. The end of
the commands corresponds to the CR char (0x0d).
Following is the complete list of available commands:
Command
Parameter
Remarks
PWD
Send the general password (*)
C0A
not available
Request to RS485 channel selection
(*) 6 to 20 characters long ASCII string representing interface
password (letters in uppercase format)
Local PC connection session establishment
To start a local PC connection the application software has to
perform the following operations on PC side:
• Set baud rate at 9600 bps on the selected PC serial port.
• Pull up the DTR line of the serial port and wait for phone
interface “RDY
high while application software is running; if the DTR goes
down while communication is taking place, then HI504903
aborts immediately the current PC communication session.
• If the password was enabled in the phone interface during
last configuration (see “Interface configuration“ section), the
application software must send the password through the com-
mand “PWD
will answer
0x15) if command syntax is wrong.
Remote PC connection session establishment
To open a remote PC connection the application software has
to perform the following operations on PC side:
• Set the baud rate at 9600 bps for the serial port where mo-
dem is connected and continue to use this value for all the
time the communication is in place;