Can NXJ detect Bluetooth Signal Strength (RSSI)?

This is where you talk about the NXJ hardware related topics such as the brick, sensors, LEGO pieces, etc.

Moderators: 99jonathan, roger, imaqine

Can NXJ detect Bluetooth Signal Strength (RSSI)?

Postby spideyfly » Mon Nov 05, 2007 3:41 pm

Hi all,

I would like to find out if the NXT (using lejos) can detect the RSSI or signal strength. I hope so :)

Thanks
spideyfly
New User
 
Posts: 18
Joined: Sat May 26, 2007 10:15 am

Postby spideyfly » Wed Nov 07, 2007 4:11 pm

Anyone out there know how to access the RSSI Register of the Bluetooth chip? In the Bluetooth.java file I note that LEJOS has a constant for

Code: Select all
public static  final int MSG_GET_LINK_QUALITY = 35;
   public static  final int MSG_LINK_QUALITY_RESULT = 36;


are these used in the implementation? I am doing something where I need the rssi power levels of the signal. Assuming the LEJOS RSSI register exists and can be accessed, where do I start for the access of such a method.

lejos dev's please let me know if this is possible, thanks.
spideyfly
New User
 
Posts: 18
Joined: Sat May 26, 2007 10:15 am

Postby lawrie » Fri Nov 16, 2007 11:06 pm

There is no method to access the link quality currently.

I will add one in the next release.

To write your own, you would need to write a method similar to Bluetooth.getVisibility but using MSG_GET_LINK_QUALITY and MSG_LINK_QUALITY_RESULT.

You won't be able to call this method while a connection is open, as the BC4 chip only responds to command when no connection is active.

Lawrie
lawrie
leJOS Team Member
 
Posts: 929
Joined: Mon Feb 05, 2007 1:27 pm

Postby esmetaman » Sun Nov 18, 2007 4:29 pm

I know that NXT brick is able to know the BT strength signal. In Robot C this information is available. Dick Swan (Robot C) answered me one time.

Un abrazo
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
https://github.com/jabrena/livingrobots
http://www.iloveneutrinos.com/
User avatar
esmetaman
Advanced Member
 
Posts: 302
Joined: Wed Sep 13, 2006 12:16 am
Location: Madrid, Spain

Postby lawrie » Sun Nov 18, 2007 10:30 pm

This is now in the development version in SVN, and will be in the next release. It was a bit trickier than I realised as the strength is associated to a connection, but you cannot send commands to the BC4 chip when the connection is active. I needed to implement suspending and resuming connections to make this work. It should mean that multiple connections will now work (in the next release) but I have not tested this yet.
lawrie
leJOS Team Member
 
Posts: 929
Joined: Mon Feb 05, 2007 1:27 pm

Postby bbagnall » Tue Dec 25, 2007 4:34 pm

lawrie wrote:It was a bit trickier than I realised as the strength is associated to a connection, but you cannot send commands to the BC4 chip when the connection is active. I needed to implement suspending and resuming connections to make this work.

This always baffled me in iCommand because the LCP lets you request the signal strength, but it always returned 0. It makes me wonder why Lego included it in the LCP since by definition you have to have a connection to request data.
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

RSSI...again..

Postby AndyBoy » Tue Jun 03, 2008 12:11 pm

Hi all,

I'm also after the RSSI - I'm not bothered about data transfer, and as far as I can tell you can't transfer data while reading the RSSI anyway.

Anyway, does anyone know for sure if this has been implemented in one of the compilers (such as leJos or RobotC)???

Any help much appreciated...


Andy.
AndyBoy
New User
 
Posts: 1
Joined: Tue Jun 03, 2008 12:09 pm

Postby lawrie » Tue Jun 03, 2008 8:55 pm

The signal strength has been available in leJOS for some time - see the SignalTest sample.
lawrie
leJOS Team Member
 
Posts: 929
Joined: Mon Feb 05, 2007 1:27 pm


Return to NXJ Hardware

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests

more stuff