Document : WCAMODHEL.
Document : WCAMODHEL.sxw REVISIONS HISTORY ➢ Re v. # Description Auteur Date Commentaires 1 Original document PGN 19/09/08 Version 1 FIRMWARE VERSIONS OF SUPPORTED WCAMODHEL WaveCard 25mW : Compatible with the version v2.01, and later This device complies with part 15 of the FCC rules.
Document : WCAMODHEL.sxw TABLE OF CONTENTS 1. INTRODUCTION..........................................................................................................................................5 2. RS232 SERIAL PROTOCOL PRESENTATION............................................................................................6 2.1- Exchanges principle...........................................................................................................................6 2.1.1 - Low level acknowledge....
Document : WCAMODHEL.sxw 4.2- Request types...................................................................................................................................34 4.3- Presence detection principle between WAVECARD......................................................................35 5. COMMUNICATION MODES.......................................................................................................................36 5.1- 'Frame Exchange’ Mode.........................................
Document : WCAMODHEL.sxw 1. INTRODUCTION The WCAMODHEL is based on a Wavecard 25 mW. 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 : WCAMODHEL.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. Nevertheless in the high majority of the cases, the host will take the initiative. Fig.
Document : WCAMODHEL.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 : WCAMODHEL.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 : WCAMODHEL.sxw CRC principle coding in C language : #include #include #include
Document : WCAMODHEL.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 : WCAMODHEL.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 : WCAMODHEL.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 : WCAMODHEL.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 : WCAMODHEL.sxw BYTE 1 : number of repeaters in the route 0x07 Maximum repeater number = 3 RELAY_ROUTE : Table containing the radio addresses for successive repeaters to use 1 à 19 Si BYTE 1 ! = 0 to reach the final equipment. BYTES 2 à 7 : First repeater radio address …, and so on. 0x08 POLLING_ROUTE : Table containing the list of modules radio address to be addressed. BYTE 2 : number of equipments to interrogate IF BYTE 2 ! = 0 BYTES 3 to 8 : radio address of the first module..., and so on.
Document : WCAMODHEL.sxw 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 0x50 REQ_READ_RADIO_PARAM Request to read the radio parameters. 0x51 RES_READ_RADIO_PARAM Response from the radio board to a parameters 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 : WCAMODHEL.sxw RE S_WRITE_RADIO_PARAM HEADER C MD D ATA CRC 3 bytes 1 byte 1 byte ETX 2 bytes 1 byte S TATU S 0xFF ; 0x02 ; 0x05 0x41 = 0x00 update OK 0x03 = 0x01 update error Timeout management : The WaveCard can be considered in fault, beyond the value of the following latencies: REQ_WRITE_RADIO_PARAM REQ_READ_RADIO_PARAM 2 seconds. 2 seconds. EXAMPLE : configuration of the repeaters table, and activation of error frames.
Document : WCAMODHEL.sxw 0xFF 0x02 0x06 0x40 0x0E 0x01 0xXXX X 0x0 3 CRC ETX 0xXXX X 0x0 3 Response from the WaveCard to the host (RES_WRITE_RADIO_PARAM) HEADER SYN C STX 0xFF 0x02 D ATA LENGT H C MD Status of the update 0x05 0x41 0x00 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.
Document : WCAMODHEL.sxw WAKEUP_LENGTH : duration of the Wake up when long wake up is set up. 0x02 This value must be higher than the polling period of RF medium radio. Default value : 1100 ms min value = 20 ms (0x1400) 2 max value = 10 sec.
Document : WCAMODHEL.sxw ➢ Case of too long WakeUp (much higher than the receiver WakeUp period) 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 : WCAMODHEL.sxw ➢ Exchange with radio acknowledge Configuration example of the parameters of wakeup management. during an exchange between two WaveCard, where between two idle periods the transmitter must quickly transmit data to the receiver.
Document : WCAMODHEL.
Document : WCAMODHEL.sxw 0xFF ; 0x02 ; 0x05 0x60 Channel number (de 0 à 21) 0x03 Response, from the WaveCard to the host RE S_SELECT_CHANNEL HEADER C MD D ATA 3 bytes 1 byte 1 byte 0xFF ; 0x02 ; 0x05 0x61 Status ( 0x00 : update OK ; 0x01 : update error ) CRC ETX 2 bytes 1 byte 0x03 3.2.
Document : WCAMODHEL.sxw • 869MHz 500mW Band (for Wavecard 25mW radio board, this mode is supported but the emission power is limited). It is possible to modify the physical layer mode via requests of reading, and writing.
Document : WCAMODHEL.
Document : WCAMODHEL.sxw Parameter value Power level (dBm) 0x0A 0x09 0x08 0x07 0x06 0x05 0x04 0x03 0x02 0x01 0x00 14 12 11 9,7 7,9 5,5 3,3 2,1 -0,3 -4 -16 Remark : Output Power values given in the table above are approximative ones (±2dBm). Indeed,Wavecard Radio Board is optimized for 25mW radiated RF Power.
Document : WCAMODHEL.sxw 3 bytes 1 byte 0xFF ; 0x02 ; 0x04 0x54 2 bytes 1 byte 0x03 Response, from the WaveCard to the host RE S_READ_TX_POWER HEADER C MD D ATA 3 bytes 1 byte 1 byte 0xFF ; 0x02 ; 0x05 0x55 Parameter value CRC ETX 2 bytes 1 byte 0x03 Remark : at reset of WaveCard, the power level is repositioned with its default value, 14 dBm (0x0A) 3.2.
Document : WCAMODHEL.
Document : WCAMODHEL.sxw REQ_READ_AUTOCORR_STATE HEADER C MD CRC ETX 3 bytes 1 byte 2 bytes 1 byte 0xFF ; 0x02 ; 0x04 0x5A 0x03 Response, from the WaveCard to the host RES_READ_AUTOCORR_STATE HEADER C MD 3 bytes 1 byte 0xFF ; 0x02 ; 0x06 0x5B D ATA CRC 1 byte 1 byte Status Autocorrection state 0x00 : reading ok 0x01 : reading error 0x00 : activated 0x01 : deactivated ETX 2 bytes 1 byte 0x03 3.2.5 - Selection of the serial baudrate.
Document : WCAMODHEL.sxw modification is done with the same baudrate as the request). By default, the serial link baudrate is of 9600 bauds (value = 0x00).
Document : WCAMODHEL.sxw 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. Note : The WaveCard can be considered in fault, beyond 2 seconds following the reading request.
Document : WCAMODHEL.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 : WCAMODHEL.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 : WCAMODHEL.sxw Remark : min RSSI level : max RSSI level : saturation is considered with 92% 0x00 0x2F 0% 100% 3.2.8 - TEST Mode This mode is used for tests of installation, or a characterization of defect.
Document : WCAMODHEL.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 : WCAMODHEL.
Document : WCAMODHEL.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 : WCAMODHEL.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 : WCAMODHEL.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 : WCAMODHEL.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 : WCAMODHEL.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 : WCAMODHEL.
Document : WCAMODHEL.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 : WCAMODHEL.sxw If RADIO_ACKNOWLEDGE is active, and the transmitter does not receive a radio acknowledgement, then the request is re-emitted three times, before sending the error frame. If RADIO_ACKNOWLEDGE is inactive, then the error frame is sent after time-out RADIO_USER_TIMEOUT. 5.1.
Document : WCAMODHEL.sxw Delta 1 : RADIO_USER_TIMEOUT, with RADIO_ACKNOWLEDGE disabled. Delta 2: RADIO_USER_TIMEOUT, with RADIO_ACKNOWLEDGE enabled.
Document : WCAMODHEL.sxw 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 : WCAMODHEL.sxw 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.1 - Configuration of the parameters relating to the 'Message' mode The parameters are accessible by commands REQ_READ_RADIO_PARAM, and REQ_WRITE_RADIO_PARAM (all the parameters are developed in appendix 3).
Document : WCAMODHEL.sxw The format of the types of frame received by the host, are described as follow.
Document : WCAMODHEL.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 : WCAMODHEL.
Document : WCAMODHEL.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.
Document : WCAMODHEL.sxw Note: The error messages are activated only if parameter EXCHANGE_STATUS is positioned with 0x01, or 0x03. In 'Point-to-Point' mode RECEPTION_ERROR HEADER C MD 3 bytes 1 byte D ATA 1 byte 1 byte EXCHANGE_MODE : 0xFF ; 0x02 ; 0x06 0x31 CRC ETX 2 bytes 1 byte ERROR_TYPE : = 0x01 : Distant equipment RF = 0x01 : Point-to-Point acknowledge not received mode (useful if acknowledge mechanism is set) 0x03 = 0x02 : Distant equipment RF response not received.
Document : WCAMODHEL.
Document : WCAMODHEL.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 : WCAMODHEL.sxw 5.3.2 - Description of the commands, and their formats C MD NA ME 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 : WCAMODHEL.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 : WCAMODHEL.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 : WCAMODHEL.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 : WCAMODHEL.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 : WCAMODHEL.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 : WCAMODHEL.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 : WCAMODHEL.sxw 0x38 RECEIVED_BROADCAST_FRAME Received a radio frame transmitted in a broadcast mode 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 : WCAMODHEL.sxw 0x38 RECEIVED_BROADCAST_FRAME Received a radio frame transmitted in a broadcast mode 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 : WCAMODHEL.sxw 5.4.
Document : WCAMODHEL.sxw This index is also used to check that no frame was lost by ensuring that this value is well decreased with each received frame. 5.4.
Document : WCAMODHEL.sxw Then, the user has to send a broadcast request (with, or without waiting for responses), by configuring 'group number' to adjust selectivity. Group number = 0xFF 0xXX 0xXX 0xXX 0xXX 0xXX Group number = 0x01 0xXX 0xXX 0xXX 0xXX 0xXX not-selective mode selective mode In this last case, all the equipments within radio range, having their group number configured with 0x01, will receive the broadcast command.
Document : WCAMODHEL.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 : WCAMODHEL.
Document : WCAMODHEL.
Document : WCAMODHEL.sxw APPENDIX 2 : Electric interface of the WAVECARD ➢ WaveCard - 25mW PIN # PIN NA ME ➢ DE SCRIPTION 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 S UPP LY VO LTAGE input supply voltage (4V to 5.
Document : WCAMODHEL.
Document : WCAMODHEL.sxw 0x10 0 : automatic selection deactivated S WITCH_MODE_STATU S : automatic selection of 1 : automatic selection activated Radio physical mode used to address an equipment Default value, SWITCH_MODE_STATUS = depending on radio address 0x00 1 0x16 WAVECARD_MULTICA ST_GROUP : Byte containing the Multicast Group of the Wavecard (available from V2.00 version ).
Document : WCAMODHEL.sxw C MD 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. 0xB0 MODE_TEST Put the Wavecard in a selected test mode (1) : These commands are accessible only on 25mW Wavecard radio board.
Document : WCAMODHEL.sxw APPENDICE 5 : List of the commands of data transmission C MD NA ME 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.
Document : WCAMODHEL.sxw NOTE: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses, and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications.