Regarding BlueBee

Bluetooth, XBee, RF......

Regarding BlueBee

Postby Nekolic » Fri Jul 22, 2016 8:55 am

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.
Nekolic
Freshie
 
Posts: 4
Joined: Thu Jul 21, 2016 11:32 pm

Re: Regarding BlueBee

Postby bengchet » Tue Jul 26, 2016 2:11 pm

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.
bengchet
Moderator
 
Posts: 237
Joined: Tue Aug 25, 2015 8:29 am

Re: Regarding BlueBee

Postby Nekolic » Tue Jul 26, 2016 3:56 pm

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.
Nekolic
Freshie
 
Posts: 4
Joined: Thu Jul 21, 2016 11:32 pm

Re: Regarding BlueBee

Postby Idris » Thu Jul 28, 2016 10:34 am

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.
Cytron Technologies invest time and resources providing tutorial, training and support for STEM education and maker movement. We need your support by purchasing products from Cytron Technologies. Thanks.
http://www.cytron.com.my
User avatar
Idris
Moderator
 
Posts: 409
Joined: Thu Mar 22, 2012 5:28 pm
Location: Pulau Pinang

Re: Regarding BlueBee

Postby Nekolic » Fri Jul 29, 2016 7:28 am

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.
Nekolic
Freshie
 
Posts: 4
Joined: Thu Jul 21, 2016 11:32 pm

Re: Regarding BlueBee

Postby Idris » Fri Jul 29, 2016 9:20 am

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.
Cytron Technologies invest time and resources providing tutorial, training and support for STEM education and maker movement. We need your support by purchasing products from Cytron Technologies. Thanks.
http://www.cytron.com.my
User avatar
Idris
Moderator
 
Posts: 409
Joined: Thu Mar 22, 2012 5:28 pm
Location: Pulau Pinang

Re: Regarding BlueBee

Postby annarosy » Tue Nov 29, 2016 3:17 pm

I have problems like Nekolic, I tried the above commands without the right answer, you can help me?
annarosy
Freshie
 
Posts: 4
Joined: Tue Aug 16, 2016 3:46 pm

Re: Regarding BlueBee

Postby bengchet » Tue Nov 29, 2016 3:43 pm

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.
bengchet
Moderator
 
Posts: 237
Joined: Tue Aug 25, 2015 8:29 am


Return to Wireless Device

Who is online

Users browsing this forum: No registered users and 19 guests

cron