OMESH Networks Inc. OPM15E1 Manuale Utente
www.omeshnet.com
•
Tel:
1-416-837-8980
•
Fax:
1-416-977-2796
•
Email:
info@omeshnet.com
OMESH
Networks Inc. © 2011
1
Section 1: Purpose
This document describes the Application Programming Interface
(API – Version 3.2.0) for OMESH’s OPM15 mesh serial modules.
The document includes an overview of the interaction between the
Host and OPM15 (the Module) as well as a list of API functions.
(API – Version 3.2.0) for OMESH’s OPM15 mesh serial modules.
The document includes an overview of the interaction between the
Host and OPM15 (the Module) as well as a list of API functions.
Section 2: Interface and Definitions
All communications between the Module and the Host are through a two/four line serial
interface. Always wait for the response from the Module after writing a command to
it; and take further actions immediately after having received a successful response.
interface. Always wait for the response from the Module after writing a command to
it; and take further actions immediately after having received a successful response.
If the Module does not give a relevant response to a command within 5ms time, the Host
shall resend the command until it gets either a successful or a failure response. If the Host
needs to write bytes to the Module after a command response, the Host should do so within
0.5 second time; otherwise the command will time-out at the Module.
By default, the baud-rate of the Module serial interface is 9,600, with no parity or flow
control. It is recommended to configure the baud-rate to 230,400 or higher in data
communications by using the command in Section 3.34. When there is a RS232-TTL on
shall resend the command until it gets either a successful or a failure response. If the Host
needs to write bytes to the Module after a command response, the Host should do so within
0.5 second time; otherwise the command will time-out at the Module.
By default, the baud-rate of the Module serial interface is 9,600, with no parity or flow
control. It is recommended to configure the baud-rate to 230,400 or higher in data
communications by using the command in Section 3.34. When there is a RS232-TTL on
board that converts the UART serial to RS232 DB9 port, the operation could result in board
voltage fluctuation and slightly affect radio performance.
The set of defined commands and events are listed in below:
voltage fluctuation and slightly affect radio performance.
The set of defined commands and events are listed in below:
#define COMMAND_RESET
0x00
#define COMMAND_SLEEP
0x01
#define COMMAND_CONFIG
0x0B
#define COMMAND_GETSTATE
0x02
#define COMMAND_BROADCAST
0x03
#define COMMAND_UNICAST
0x04
#define COMMAND_SETADDR
0x05
#define COMMAND_GETADDR
0x06
#define COMMAND_READCALI
0x07