Document : CS-SUP-MUTI-WPORTAPP-E02.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw REVISIONS HISTORY ➢ Rev. # Description Auteur Date Commentaires 1 Original document RCS 19/01/05 Version 1 2 Addon Text FCC RCS 17/02/05 Version 2 FIRMWARE VERSIONS OF SUPPORTED WAVECARD AND WAVEPORT WaveCard 25mW : Compatible with the version v2.01, and later WaveCard 500mW : Compatible with the version v4.01, and later This device complies with part 15 of the FCC rules.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw TABLE OF CONTENTS 1. INTRODUCTION.............................................................................................................................................5 2. RS232 SERIAL PROTOCOL PRESENTATION.............................................................................................6 2.1- Exchanges principle.............................................................................................................................6 2.1.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 4.2- Request types.....................................................................................................................................34 4.3- Presence detection principle between WAVECARD.......................................................................35 5. COMMUNICATION MODES.........................................................................................................................36 5.1- 'Frame Exchange’ Mode.....................
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 1. INTRODUCTION The WAVECARD equipment acts like a RS232 Radio frequency gateway. This device is driven through a USART link (RS232 or TTL) by a client application (called HOST in the continuation of this document) embedded on a microcontroller or on a PC equipment.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 2. RS232 SERIAL PROTOCOL PRESENTATION This protocol is dedicated to an asynchronous RS232 or TTL link between the host and the radio board. ➢ Transmission format : 8 bits data, 1 stop bit, no parity ➢ Transmission speed : 9600 baud (contact us for other speed : marketing@coronis-systems.com) 2.1- Exchanges principle The host or the radio board can take the initiative of the exchange.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 2.1.2 - Request/ Response principle Some exchanges need a Request/response mechanism. In this case , an high level acknowledge (RES prefix command) is initiated by the RF board following the request frame (REQ prefix command) sent by the host.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 2.2- Exchanged frames format 2.2.1 - Wake Up and synchronization mechanism In the purpose to optimize power consumption, the Wavecard is in a STANDBY mode and is wakening up either : periodically to poll a radio activity ; on a serial frame reception coming from the host equipment. A synchronization character is needed before the data in the serial frame to give time to the radio board to wake up. This character is in hexadecimal notation : 0xFF.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw CRC principle coding in C language : #include #include #include
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 2.3- Commands description All the frames circulating on the serial bus are formatted as described in chapter 2.2.2. The distinction between the various frames is carried out via the 'CMD' fields representing the command (or the action) to carry out. The available commands types can be classified in three parts : Control type commands Applicative commands Service type commands 2.3.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw ➢ Commands relating to radio exchanges The radio exchanges are composed of several modes of transmission/reception. With in certain cases, the possibility of receiving several consecutive radio frames (multi frames mode, accessible in reception only). The following modes allow point-to-point exchanges : ’Frame Exchange’ mode : This mode allows to emit a request, with waiting of a radio response from the distant equipment.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 2.3.3 - Service type commands Services commands are used to configure the Wavecard or to read radio parameters independently of the connected host equipment. When the wavecard recognizes Service command, no data are sent to the connected host.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 3. SETTING THE INTERNAL PARAMETERS OF THE WAVECARD The internal parameters of WaveCard are declined in two categories : parameters of control (emission power level, channel selection, etc...) carried out by specific frame of type Request/Response. this parameters allows to modify the mode of communication (either serial, and RF). Functional parameters (WakeUp period, group number, etc...) carried out by the same frame of writing of internal parameters.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw BYTE 2 : number of equipments to interrogate IF BYTE 2 != 0 1 à 241 BYTES 3 to 8 : radio address of the first module..., and so on. 0x08 POLLING_ROUTE : Table containing the list of modules radio address to be addressed. 0x09 Group number GROUP_NUMBER : Byte containing the number of the group of radio equipment to address in radio polling mode.
Document : CS-SUP-MUTI-WPORTAPP-E02.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw EXAMPLE : configuration of the repeaters table, and activation of error frames. Between WaveCard (exchange instigator), and the recipient equipment, we have a repeater equipment (radio address : 0X AA AA AA AA AA AA). In addition, we must authorize the error frame, in order to determine which distant equipment caused the error.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 3.1.2 - Wake Up and synchronization mechanism In the purpose to optimize power consumption, the Wavecard is in a STANDBY mode and is wakening up periodically to poll a radio activity. The wakeup period is given by the value of the AWAKENING_PERIOD parameter, expressed in multiples of 100ms (1 second by default).
Document : CS-SUP-MUTI-WPORTAPP-E02.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw b) Example describing a point-to-point exchange of the type Request / Response. When using a point-to-point exchange of the type request/ Response, the transmission of the request is made in the same way that previously. But the transmitter, after the sending of the data, awaits for a response, during a time which can be configured by the RADIO_USER_TIMEOUT parameter (0x0C).
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 3.2- Configuration of the control parameters The parameters of control allow on the one hand, to modify the mode of radio communication, and serial communication; and furthermore, fetch information on the local module, and the quality of the communication with a distant module. 3.2.1 - selection of the radio operating channel when FHSS is deselected It is possible to modify the transmission channel Reception via requests of reading, and writing.
Document : CS-SUP-MUTI-WPORTAPP-E02.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 3.2.2 - Selection of the RF medium physical mode The available physical layer modes, are : • 868 MHz single channel 4800 baud, • 868 MHz single channel 4800 bauds Alarm Band, • 868MHz single channel 9600 bauds with channel selection, • 868 MHz frequency hopping 9600 baud, • 868 MHz frequency hopping 19200 baud, • 869MHz 500mW Band (for Wavecard 25mW radio board, this mode is supported but the emission power is limited).
Document : CS-SUP-MUTI-WPORTAPP-E02.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 3.2.3 - Selection of the radio board emission power Compatibility: This functionality is accessible only on WaveCard 25mW.
Document : CS-SUP-MUTI-WPORTAPP-E02.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 3.2.4 - Activation of the Wavenis RF Asic RSSI threshold autocorrection The RSSI threshold autocorrection is a functionality which allows WaveCard to adjust its threshold of reception, according to the ambient noise in a preoccupation with an energy saving. This functionality is adapted if WaveCard is fed by battery. at RESET of WaveCard, the RSSI threshold autocorrection takes its state by default (i.e, activated).
Document : CS-SUP-MUTI-WPORTAPP-E02.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 3.2.5 - Selection of the serial baudrate. It is possible to modify the serial link baudrate, between WaveCard local and its host. In this case, the baudrate is updated only after the current exchange finished (i.e. that the response at the request of modification is done with the same baudrate as the request). By default, the serial link baudrate is of 9600 bauds (value = 0x00).
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 3.2.6 - Reading the firmware version of the WaveCard The reading commands of the firmware version, are as follows : CMD NAME DESCRIPTION 0xA0 REQ_FIRMWARE_VERSION Request to read the radio board firmware version. 0xA1 RES_FIRMWARE_VERSION Response from the radio board to the firmware version reading. Remark : In the command byte coding, the Response frame type are taking the Request command byte value with the LSB bit set to 1.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 3.2.7 - Reading the RSSI level (Received Signal Strengh Indicator) The RSSI level represent the QOS level (Quality Of Service) from a given module. This value can be used to verify the quality of the signals forwarding on the network. It is possible to take this measurement on a distant module, or the local module. The following examples illustrate the types of measurements being able to be carried out. Example 1 : Reading of RSSI, in Point-to-point mode.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw b) Format of the commands ➢ Request to read RSSI level from a remote equipment : This measurement gives RSSI level of a signal received by a distant equipment, coming from the local WaveCard.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 3.2.8 - TEST Mode This mode is used for tests of installation, or a characterization of defect.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 4. SERVICE COMMANDS Services commands are used to configure the Wavecard or to read radio parameters independently of the connected host equipment. When the wavecard recognizes Service command, no data are sent to the connected host. These commands are mainly used to : Process detection of a distant RF equipment, Process a link budget with a distant equipment (RSSI level detection), Process the setting of parameters by RF way. 4.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 4.2- Request types The transmitter send a service command including a type of request. Each request type, has an associated type of response which is included in the command SERVICE_RESPONSE. In the command byte coding, the Response type are taking the Request command byte value with the LSB bit set to 1. ➢ Request type REQUEST TYPE NAME VALUE DESCRIPTION PARAMETER(S) GET_TYPE 0x20 Command used to read equipment type and RSSI Level from distant equipment.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 4.3- Presence detection principle between WAVECARD Before establishing a data exchange with a distant equipment, it can be useful to check the presence and the link budget of this device. The Get_Type Command sent like a « Service Command » allows the distant Wavecard to process an answer independently of the host equipment connected.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 5. COMMUNICATION MODES The purpose of this part is to explain the methods of use of each four modes of communication, the format of the commands Request/response, and their corresponding parameters. 5.1- 'Frame Exchange’ Mode This type of radio exchange allows to send a request, then to await a response of the distant equipment.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 5.1.2 - Description of the commands, and their formats CMD NAME DESCRIPTION 0x20 REQ_SEND_FRAME Request to send a radio frame with the waiting for the radio response. 0x21 RES_SEND_FRAME Response from the radio board to the frame emission (response to the request 0x20, 0x22, 0x24, 0x26, 0x28, 0x2A) 0x30 RECEIVED_FRAME Received radio frame by the radio board.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 5.1.3 - Use of the Relaying mode The relaying mode is only available for point-to-point exchanges ('Frame Exchange' or 'Message' types). a) On frame transmission To send a request in Relaying mode to a distant equipment, it is necessary to configure the list of the repeaters, via parameter RELAY_ROUTE. Then to send a request of the type REQ_SEND_FRAME (or REQ_SEND_MESSAGE) to the address of the recipient.
Document : CS-SUP-MUTI-WPORTAPP-E02.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw ➢ Frame RECEPTION_ERROR format With this command, the local WaveCard informs its host that a problem appeared at the time of the radio exchange. This command is forwarded only on the serial link, between the wavecard and its host, it thus does not require an address of recipient. Note: The error messages are activated only if parameter EXCHANGE_STATUS is positioned with 0x01, or 0x03.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 5.1.4 - Time-out management when sending a request with waiting of a response (Frame Exchange), the timeout relating to waiting of the response frame, is given by parameter RADIO_USER_TIMEOUT (2 seconds by default). The beginning of counting of this timeout depends on another parameter: RADIO_ACKNOWLEDGE. If RADIO_ACKNOWLEDGE is active, then counting begins on reception of the acknowledgement from the Request.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw • Diagram in Relaying mode In the case of the Relaying mode, the time-out from the transmitter point of view is longer than in Point-topoint mode, because of the transit via the relays. Time-out RADIO_USER_TIMEOUT is always applied, but does not take into account the relays. This time value will be applied by the last relay, before the recipient (R2 Delta = Radio_User_Timeout).
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 5.2- 'Message’ Mode This type of radio exchange allows to send a request, without awaiting response from the distant equipment. After radio frame emission, the Wavecard radio board is listening again the serial RS232 link. This command is suited to a simple data transfer between several Wavecard equipments. 5.2.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw The format of the types of frame received by the host, are described as follow.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 5.2.3 - Use of the Relaying mode The relaying mode is only available for point-to-point exchanges ('Frame Exchange' or 'Message' types). a) On frame transmission To send a request in Relaying mode to a distant equipment, it is necessary to configure the list of the repeaters, via parameter RELAY_ROUTE. Then to send a request of the type REQ_SEND_FRAME (or REQ_SEND_MESSAGE) to the address of the recipient.
Document : CS-SUP-MUTI-WPORTAPP-E02.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw With RELAY_ROUTE_STATUS parameter activated ( = 0x01 ) ➢ Frame RECEPTION_ERROR format With this command, the local WaveCard informs its host that a problem appeared at the time of the radio exchange. This command is forwarded only on the serial link, between the wavecard and its host, it thus does not require an address of recipient. Note: The error messages are activated only if parameter EXCHANGE_STATUS is positioned with 0x01, or 0x03.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw In 'relaying' mode RECEPTION_ERROR HEADER CMD 3 bytes 1 byte 0xFF ; 0x02 ; 0x06 0x31 DATA 1 byte 1 byte EXCHANGE_MODE : 0x02 1 byte CRC ETX 2 bytes 1 byte RELAY_COUNTER : = 0x02 : relaying mode Default value for = 0x03 No response from the third repeater; relaying mode = 0x02 No response from the second repeater; 0x03 = 0x01 No response from the first repeater; = 0x00 No response from the final equipment.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 5.3- ’Polling’ Mode This mode allows to address a request to a list of predefined distant equipment. The response is sent to the host, transmitter of the request, when all the distant equipments responded; or on timeout. Two types of exchanges in polling mode can be distinguished, Not-selective Polling : all the distant equipments, configured in POLLING_ROUTE table, are interrogated.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 5.3.2 - Description of the commands, and their formats CMD NAME DESCRIPTION 0x21 RES_SEND_FRAME Response from the radio board to the frame emission (response to the request 0x20, 0x22, 0x24, 0x26, 0x28, 0x2A) 0x26 REQ_SEND_POLLING Request to send a radio frame with the polling mode. 0x32 RECEIVED_FRAME_POLLING Received radio frame following a REQ_SEND_POLLING request The format of the types of frame received by the host, are described as follow.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 5.3.3 - Difference between selective, and not-selective Polling mode Generally, the use of the polling mode (selective, or not-selective) requires the configuration of a table containing the addresses of the modules to be interrogated (POLLING_ROUTE). When using the selective polling mode, it is necessary to configure on the transmitter side, the group number of modules to be interrogated.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw ➢ Principle of the selective Polling mode Only the modules which belong to the interrogated group are synchronized on the transmitter. A module will respond to a selective polling request only on the following conditions : it belongs to the interrogated group, its radio address is contained in the list of the interrogated modules (POLLING_ROUTE). Synchronization allows a faster response of the modules (Since it don't use Long WakeUp) and optimize consumption.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw Example of a selective polling exchange : Host WaveCard A B C D E Grp 2 Grp 1 Grp 1 Grp 1 Grp 2 WaveCard is configured like described below, POLLING_ROUTE GROUP_NUMBER Equipment A address 0x01 Equipment B address Equipment C address Equipment D address Equipment E address After transmitting the REQ_SEND_POLLING request, the distant equipments react in the following way: • Equipment A : responds to the request.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 5.3.4 - Diagram of an exchange in polling mode the following example describes the typical case where the distant WaveCards communicate with their respective host. Indeed, when sending a GET_TYPE request (see chapter XXX) in polling mode; distant WaveCards respond without preliminary dialogue with their host.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw The low level commands are necessary to recover the RECEIVED_FRAME_POLLING responses. Indeed, an index is incremented with each reception of a polling response. And when the WaveCard, instigator of the polling exchange does not await new responses anymore, it sends to its host a first RECEIVED_FRAME_POLLING command ;and will await a low level acknowledgement to decrease its index, and to send next RECEIVED_FRAME_POLLING command.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 5.4- ’Broadcast’ mode This mode allows to address a request to all the equipments in radio range of the transmitter. Thus, it is not necessary to specify the address of the distant equipment to reach. Depending on the command used, the request can be sent with, or without awaiting for a response ( REQ_SEND_BROADCAST, or REQ_SEND_BROADCAST_MESSAGE commands).
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw b) Example of operations during a broadcast exchange, without waiting for responses Reception of the END_MESSAGE_EXCHANGE command depends on the activation of the EXCHANGE_STATUS parameter (0x0E). This command allows the equipment host to know exactly the moment from which WaveCard is available for communication RS232. 5.4.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw b) Example of operations during a broadcast exchange, with waiting for responses Reception of the END_MESSAGE_EXCHANGE command depends on the activation of the EXCHANGE_STATUS parameter (0x0E). This command allows the equipment host to know exactly the moment from which WaveCard is available for communication RS232.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 5.4.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 5.4.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw 5.5- ’Multi frames' Mode Multi frame mode allows multi frame exchange between the Wavecard/Waveport (considered like the master of the exchange) and one of the telemetry equipments of the Coronis Systems product family ( WaveTherm, WaveFlow, WaveSens, ...). Le mode multitrames a été developpé pour permettre le dialogue entre une WaveCard/ WavePort et un module CORONIS de télémétrie.
Document : CS-SUP-MUTI-WPORTAPP-E02.
Document : CS-SUP-MUTI-WPORTAPP-E02.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw APPENDIX 2 : Electric interface of the WAVECARD ➢ ➢ WaveCard - 25mW PIN # PIN NAME DESCRIPTION INPUT / OUTPUT 1 TX TX RS232 signal OUTPUT 2 RX RX RS232 signal INPUT 3 RESET RESET input (active to high level) INPUT 4 OUT2 Not used OUTPUT 5 OUT1 output active (level 1) when reception is on OUTPUT 6 GND ground OUTPUT 7 +3V OUT 3V regulated output voltage (10mA available) OUTPUT 8 SUPPLY VOLTAGE input supply voltage (4V to 5.
Document : CS-SUP-MUTI-WPORTAPP-E02.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw APPENDIX 4 : List of the commands of parameters setting CMD Name Description 0x40 REQ_WRITE_RADIO_PARAM Request to update the radio parameters 0x41 RES_WRITE_RADIO_PARAM Response from the radio board to the radio parameters update 0x42 REQ_CHANGE_UART_BDRATE Request to update serial link Baudrate 0x43 RES_CHANGE_UART_BAUDRATE Response from the radio board to the serial link baudrate update.
Document : CS-SUP-MUTI-WPORTAPP-E02.sxw APPENDICE 5 : List of the commands of data transmission CMD NAME DESCRIPTION 0x20 REQ_SEND_FRAME Request to send a radio frame with the waiting for the radio response. 0x21 RES_SEND_FRAME Response from the radio board to the frame emission (response to the request 0x20, 0x22,0x24, 0x26, 0x28, 0x2A ) 0x22 REQ_SEND_MESSAGE Request to send a radio frame without the waiting for the radio response.