User's Manual
Table Of Contents
- 1. INTRODUCTION
- 2. RS232 SERIAL PROTOCOL PRESENTATION
- 3. setting the internal parameters of the wavecard
- 3.1- Configuration of the functional parameters
- 3.2- Configuration of the control parameters
- 3.2.1 - selection of the radio operating channel when FHSS is deselected
- 3.2.2 - Selection of the RF medium physical mode
- 3.2.3 - Selection of the radio board emission power
- 3.2.4 - Activation of the Wavenis RF Asic RSSI threshold autocorrection
- 3.2.5 - Selection of the serial baudrate.
- 3.2.6 - Reading the firmware version of the WaveCard
- 3.2.7 - Reading the RSSI level (Received Signal Strengh Indicator)
- 3.2.8 - TEST Mode
- 4. SERVICE COMMANDS
- 5. COMMUNICATION MODES
- 5.1- 'Frame Exchange’ Mode
- 5.2- 'Message’ Mode
- 5.3- ’Polling’ Mode
- 5.4- ’Broadcast’ mode
- 5.4.1 - Configuration of the parameters relating to the 'Broadcast' mode
- 5.4.2 - 'BroadCast' mode without waiting for a response
- 5.4.3 - 'BroadCast' mode with waiting for responses
- 5.4.4 - Format of the commands – from the request transmitter side
- 5.4.5 - Format of the commands – from the request receiver side
- 5.4.6 - Use of the selective, or not-selective broadcast mode
- 5.5- ’Multi frames' Mode
Document : WCAMODHEL.sxw
CRC principle coding in C language :
#include <iostream.h>
#include <stdio.h>
#include <string.h>
void main ( )
{
int Poly = 0x8408;
int lg = 9;
unsigned int Frame [] = { 0x0B, 0x20, 0x43, 0x06, 0x01, 0x00, 0x00, 0x02, 0X01};
unsigned int Crc;
int j, i_bits, carry;
Crc = 0;
for ( j=0 ; j < lg ; j++ )
{
Crc = Crc ^ Frame[j] ;
for ( i_bits=0 ; i_bits < 8 ; i_bits++ )
{
carry = Crc & 1 ;
Crc = Crc / 2 ;
if ( carry )
{
Crc = Crc ^ Poly;
}
}
}
printf ( “CRC = %x “, Crc);
}
The computed CRC is the following : 41D2 hexadecimal
Then LSB byte and MSB byte must be inverted before storage in the frame.
This example allows to compute a CRC on a fix frame length equal to 9.
WCAMODHEL Handbook page 9 of 74