Page 1 of 1

Regarding BlueBee

PostPosted: Fri Jul 22, 2016 8:55 am
by Nekolic
Hello! I was wondering where is the RSSI value is being kept. I was told that it was kept inside a register and if so, I'm wondering how do I find out/which register it is because we're going to connect it to a PIC later on and will need it to refer to that register and value.

Re: Regarding BlueBee

PostPosted: Tue Jul 26, 2016 2:11 pm
by bengchet
Hi,

You can use several AT commands.
AT+ROLE=1 -> set Master role
AT+INIT -> start SPP
AT+INQM=1,9,48 -> set enquiry RSSI and max number of devices discovered
AT+IQM -> Get address, class and RSSI value of detected devices

You can refer to datasheet or website for more info.

Re: Regarding BlueBee

PostPosted: Tue Jul 26, 2016 3:56 pm
by Nekolic
Thanks for the reply!
We already did testing and paired the BlueBee with a smartphone. But what we aim to do now is that we want the RSSI value from the link between the paired BlueBee and the smartphone to be processed in PIC coding since the BlueBee itself will be connected to a PIC later on. So my question is, how do we get the value so that it can be processed in the PIC? Like, is there a specific line of coding which we can use to make the PIC refer to the RSSI value within the bluetooth module? Please correct me if I am wrong, thank you.

Re: Regarding BlueBee

PostPosted: Thu Jul 28, 2016 10:34 am
by Idris
Hi Nekolic,

You need to program the PIC to do serial (UART) communication with Bluebee. Then try the command as mention by bengchet to obtain the RSSI value.

Re: Regarding BlueBee

PostPosted: Fri Jul 29, 2016 7:28 am
by Nekolic
So basically it's like this, we've connected all the 4 pins from the bluebee to the PIC (cross connecting Tx & Rx), paired the bluebee with a phone (to create a wireless link) and then afterwards I would need to write the C code in PIC to request RSSI value from bluebee to be transferred to the PIC so that I can store this value in a variable, which will be used later.

But if I use the code given by BengChet above, it is AT command and not C command. I was wondering how can I write the AT command in C code.

Re: Regarding BlueBee

PostPosted: Fri Jul 29, 2016 9:20 am
by Idris
Hi Nekolic,

Emm I think you're jumping too much. Do you know about UART? It is a communication protocol between 2 devices, and bluebee is one of them. Try to study about this first before going to send the AT command. We have the tutorial about PIC and UART but that post is in 2011, not sure the code is still compatible with current version of compiler or not. But the concept is there.

If you want the express way, try using Arduino. It has ready made library for serial (UART) communication. It looks like this:

CODE: SELECT_ALL_CODE
void setup()
{
  Serial.begin(9600);
  Serial.println("AT+ROLE=1");
}

void loop()
{

}

*This is not the complete code, I just wanna show you about serial (UART) communication in Arduino and how to write the AT command in Arduino.

Re: Regarding BlueBee

PostPosted: Tue Nov 29, 2016 3:17 pm
by annarosy
I have problems like Nekolic, I tried the above commands without the right answer, you can help me?

Re: Regarding BlueBee

PostPosted: Tue Nov 29, 2016 3:43 pm
by bengchet
Hi,

How do you execute the AT commands? These commands can only work if only BlueBee itself has not connected to any devices and it is in AT mode. Try execute the commands without arduino platform, use UART terminal instead to do testing as Arduino Serial monitor, RealTerm, Hyperterminal etc.