Renaming brick

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

Moderators: roger, imaqine, 99jonathan

WillZaz
New User
Posts: 9
Joined: Thu Oct 22, 2009 8:30 am
Location: Zaragoza (Aragon)

Renaming brick

Postby WillZaz » Thu Oct 22, 2009 8:35 am

Hi everybody! Do you know how to rename bricks?... I mean, when I download firmware from my PC to the brick it gives the name "NXT", but I want to change this name for example to "NXT1", "NXT2"... in order to connect several devices at the same time by bluetooh.

Thanks in advance :wink:

User avatar
gloomyandy
leJOS Team Member
Posts: 4731
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby gloomyandy » Thu Oct 22, 2009 8:57 am

Run nxjbrowse, there is an option in that to allow you to change the name of the brick...

Andy

PS Once you have changed the name you may have to delete/update the nxj.cache file (which contains a cached mapping of name to address)

WillZaz
New User
Posts: 9
Joined: Thu Oct 22, 2009 8:30 am
Location: Zaragoza (Aragon)

Postby WillZaz » Thu Oct 22, 2009 9:42 am

Thanks Andy!

WillZaz
New User
Posts: 9
Joined: Thu Oct 22, 2009 8:30 am
Location: Zaragoza (Aragon)

Postby WillZaz » Fri Oct 23, 2009 2:07 pm

Just another cuestion, how can I update that nxj.cache file? I have been searching, but I can't find the file... I don't know if it's in the NXT brick or in the PC...

I want to communicate two NXT bricks between them, so I suppose that I must update the file in the brick... But I don't know where or how... :roll:

Thanks

User avatar
gloomyandy
leJOS Team Member
Posts: 4731
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby gloomyandy » Fri Oct 23, 2009 5:45 pm

Hi,
The file is called nxj.cache and it is in the home directory of you pc (so on Vista mine is in c:\users\andy). It is only used by programs that run on the PC and holds a mapping of Bluetooth name to address. You may need to force a new nxt to be added to the cache. You can do this by running:

Code: Select all

nxjbrowse -b -n "*"


Which will force a search for all nxts using Bluetooth. Any devices found during this search will then be added to the cache. Note that you may have to pair the nxt with your PC before you can access it...

Andy

WillZaz
New User
Posts: 9
Joined: Thu Oct 22, 2009 8:30 am
Location: Zaragoza (Aragon)

Postby WillZaz » Sat Oct 24, 2009 2:08 pm

Thank you very much! :wink:

User avatar
Eric
Novice
Posts: 63
Joined: Sat Oct 24, 2009 5:07 pm
Location: UK
Contact:

nxjbrowse not working

Postby Eric » Tue Nov 10, 2009 8:06 pm

I can't get nxjbrowse to change the name. Running it works fine, and the +++ on the brick flashes reassuringly, but the name on the brick never actually changes: it only has "changed" on the PC. I am using USB, not BT

User avatar
gloomyandy
leJOS Team Member
Posts: 4731
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby gloomyandy » Tue Nov 10, 2009 10:50 pm

Hi,
You may need to restart the NXT to see the name change. The name is shown at the top of the NXT screen. Are you saying this does not change? Do you have Bluetooth enabled on the NXT? It may need to be on (even if you are using USB), for this to work...

Andy

User avatar
Eric
Novice
Posts: 63
Joined: Sat Oct 24, 2009 5:07 pm
Location: UK
Contact:

Postby Eric » Wed Nov 11, 2009 7:47 pm

gloomyandy wrote:Hi,
You may need to restart the NXT to see the name change. The name is shown at the top of the NXT screen. Are you saying this does not change? Do you have Bluetooth enabled on the NXT? It may need to be on (even if you are using USB), for this to work...

Andy


Well diagnosed. Thanks.
Last edited by Eric on Thu Nov 12, 2009 7:24 am, edited 1 time in total.

User avatar
gloomyandy
leJOS Team Member
Posts: 4731
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby gloomyandy » Wed Nov 11, 2009 8:44 pm

Hi Eric,
Was it the restart or enabling Bluetooth that fixed things? Either way it sounds like we have a (small) bug. If you let me know which of the above fixed your problem I'll try and work out what is going on and see if we can fix it...

Thanks

Andy

User avatar
Eric
Novice
Posts: 63
Joined: Sat Oct 24, 2009 5:07 pm
Location: UK
Contact:

Postby Eric » Thu Nov 12, 2009 7:24 am

Enabling bluetooth did it.

User avatar
gloomyandy
leJOS Team Member
Posts: 4731
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby gloomyandy » Thu Nov 12, 2009 7:56 am

Thanks... I'll see if I can work out what is going on...

Andy


Return to “NXJ Hardware”

Who is online

Users browsing this forum: No registered users and 0 guests