Arduino WIR1186 RF Transceiver communication

Hi there I’m doing a project on RF Transceiver to transmit information to another RF transceiver, for that I’m using WIR-1186 RF Transceiver module which is based on UART communication. But when i program it using arduino, it is not communicating with RF module using Serial.write() function i don’t understand what is happening.

Here I’m attaching WIR-1186 datasheet, ouput and program which i have written by referring datasheet.

pin connections

Arduino WIR1186

5v vcc

gnd gnd

RX TX

TX RX

2 PRG

3 CTS

please suggest me something :’( :’( :’(

char ch;
int prog = 2;
int cts = 3;
int stat;
unsigned int output;

void setup()
{
  Serial.begin(9600);
  pinMode(prog, OUTPUT);
  digitalWrite(prog, LOW);
  stat = digitalRead(prog);
  Serial.println(stat);
  /*pinMode(cts,OUTPUT);
    digitalWrite(cts,LOW);
    stat=digitalRead(cts);
    Serial.println(stat);*/
  Serial.write("B=9600\r\n");
  output = Serial.read();
  Serial.println(output);
  /*while(Serial.available())
    {
    output=Serial.read();
    Serial.println(output);
    }
    Serial.write("B=0\r\n");
    while(Serial.available())
    {
    ch=Serial.read();
    Serial.println(ch);
    }
    Serial.write("C=865\r\n");
    while(Serial.available())
    {
    ch=Serial.read();
    Serial.println(ch);
    }
    Serial.write("N=1111\r\n");
    while(Serial.available())
    {
    ch=Serial.read();
    Serial.println(ch);
    }
    Serial.write("C=865\r\n");
    while(Serial.available())
    {
    ch=Serial.read();
    Serial.println(ch);
    }
    Serial.write("D=0001\r\n");
    while(Serial.available())
    {
    ch=Serial.read();
    Serial.println(ch);
    }
    Serial.write("S=0002\r\n");
    while(Serial.available())
    {
    ch=Serial.read();
    Serial.println(ch);
    }*/
  digitalWrite(cts, HIGH);
}

void loop() {

  Serial.write('a');
  delay(1000);
}

WIR-1186_RobokitsIndia.pdf (700 KB)

wir1186Mesh.pdf (791 KB)

The CTS pin should be an input to the Arduino. If it is read and is "HIGH" then you can transmit a byte. If CTS is low, you must wait until it goes high to send the next byte.

Paul

First we have to do configuration, for that we have some commands like 'N' for Network ID ,'B' for setting up Baud rate etc., So i need to communicate arduino with WIR1186 for sending commands. But it is not happening. I don't understand where the problem is.

please reply with a solution anyone

IF you changed the CTS to be an input to the Arduino, show us the new code.

Paul