Hanna Instruments HI 504901 User Manual
Page 25

49
48
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 HI504901
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;
• Make a data call to the cellular phone number using 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” section), the
application software must send the password within 3 min-
utes through the command “PWD
(char 0x06) if the password is correct, or
0x18) if password is not correct, or
command syntax is wrong, and hangs up the call when 3
minutes have elapsed.
Local channel selection
Before communicating with one of the instruments attached to
HI504901, the application software on remote PC needs to
PC COMMUNICATION PROTOCOL
Even if it is strongly recommended to use HI92500 software
to establish local or remote connections between HI504901
and a PC, it is possible to try also without HI92500 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 HI504901.
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 (*)
C
N R
Request to channel selection (**)
DSC
not available
Request to disconnect from present
channel selection
(*) 6 to 20 characters long ASCII string representing interface
password (letters in uppercase format)
(**) NR are ASCII characters corresponding to the channel
(N) on the interface where is attached the instrument(s)
with which the application software wants to communicate
and the baud rate used (R) for communication with the
corresponding device(s).
The character N for requested channel is coded like this:
N code
Selected port
0
RS485
1
RS232 channel 1
2
RS232 channel 2
The character R for requested channel is coded like this:
R code
Baud rate value
A
1200 bps
B
2400 bps
C
4800 bps
D
9600 bps