EasyBee frequency agility

Discussion on projects that are created by users and posted on mikroElektronika website.
Post Reply
Author
Message
Deborah
Posts: 2
Joined: 26 Jan 2015 11:23

EasyBee frequency agility

#1 Post by Deborah » 26 Jan 2015 11:43

Hi Everyone,
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"
on the receiver 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=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"
Thank you in advance :D .

Deborah

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: EasyBee frequency agility

#2 Post by filip » 27 Jan 2015 09:44

Hi,

I can suggest you to look at the datasheet of the BEE module and see if you can come up with some kind of solution.

Regards,
Filip.

Deborah
Posts: 2
Joined: 26 Jan 2015 11:23

Re: EasyBee frequency agility

#3 Post by Deborah » 24 Mar 2015 17:55

Thanks Filip for your reply. I solved the problem with this solution: I put a "for" loop and a switch case both on the sender and the receiver.
It is a bit rough solution but I hope to optimize it in the future.

Regards,
Deborah

Post Reply

Return to “User Projects”