I'm new to mikroC programming and I need some help to get through this issue: I have two easybee boards, a transmitter and a receiver. The first one sends a data to the second one and reads its RSSI measurements on a fixed channel. What I have to do is changing the channel during the transmission to see if there is any difference in the RSSI measurement.
I have tried to simply change the channel masks on both the transmitter and receiver but it doesn't work.
Any suggestion?
Here it is the code section where I initialized the easybee board on the transmitter side:
Code: Select all
UART1_Write_Text("AT+WAUTONET=0 z"); // Disable automatic networking
UART1_Write(13); // CR
wait(); // Wait for UART "OK"
UART1_Write_Text("ATX"); // Set a node to transmit EVENT and DATA to a host
UART1_Write(13); // CR
wait(); // Wait for UART "OK"
UART1_Write_Text("AT+GSN=3"); // Set MAC address for the node
UART1_Write(13); // CR
wait(); // Wait for UART "OK"
UART1_Write_Text("AT+WPANID=1620"); // Set node’s PAN ID
UART1_Write(13); // CR
wait(); // Wait for UART "OK"
UART1_Write_Text("AT+WCHMASK=4000800"); // Set node’s channel mask - channel 11 channel 26
UART1_Write(13); // CR
wait(); // Wait for UART "OK"
UART1_Write_Text("AT+WROLE=2 +WSRC=56"); // Switch to coordinator function, set zero address
UART1_Write(13); // CR
wait(); // Wait for UART "OK"
UART1_Write_Text("AT+WWAIT=3000"); // Set 3 sec timeout to wait for input
UART1_Write(13); // CR
wait(); // Wait for UART "OK"
Code: Select all
UART1_Write_Text("AT+WAUTONET=0 z"); // Disable automatic networking
UART1_Write(13); // CR
wait(); // Wait for UART "OK"
UART1_Write_Text("ATX"); // Set a node to transmit EVENT and DATA to a host
UART1_Write(13); // CR
wait(); // Wait for UART "OK"
UART1_Write_Text("AT+GSN=2"); // Set MAC address for the node
UART1_Write(13); // CR
wait(); // Wait for UART "OK"
UART1_Write_Text("AT+WPANID=1620"); // Set node’s PAN ID
UART1_Write(13); // CR
wait(); // Wait for UART "OK"
UART1_Write_Text("AT+WCHMASK=7FFF800"); // Set node’s channel mask - channel 11 channel 26 selected
UART1_Write(13); // CR
wait(); // Wait for UART "OK"
UART1_Write_Text("AT+WROLE=0 +WSRC=0"); // Switch to END DEVICE function, set 0 address
UART1_Write(13); // CR
wait(); // Wait for UART "OK"
Deborah