Can not connect to NXT to load program

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

Moderators: 99jonathan, roger, imaqine

Can not connect to NXT to load program

Postby okn » Sun Jun 22, 2008 3:59 pm

Hello forum members,

I am a java developer but totally new to the NXT. My OS is SUSE linux 10.2.
I downloaded leJOS (0.6 beta) and followed the instructions in the README file. I successfully flashed the NXT using the USB connection and it now had leJOS on it (coming up with the logo and then a basic menu).

Now I try nxjc Tune.java and that works on the PC, but the next command, to load and run the Tune class on the brick, fails with this error:

leJOS NXJ> Linking...
leJOS NXJ> Uploading...
Found nxt name Unknown address
an error occurred: No NXT found - is it switched on and plugged in (for USB)?

The USB cable is still connected and the brick is on. I have libusb (0.1.12) untarred into /usr/local/libusb-0.1.12 and this path is added to both my PATH and CLASSPATH environment variables.

So the question is what obvious mistake am I making?

Any help would be greatly appreciated.

Thanks,

Abe
okn
New User
 
Posts: 8
Joined: Sun Jun 22, 2008 3:34 pm

Postby gloomyandy » Sun Jun 22, 2008 4:29 pm

A few questions...

What user are you running as? Is this the same user that you used when flashing the firmware? Did you re-boot the brick after flashing the firmware? You may want to try uploading while running as root. If this works you may need to check the udev settings for the device. With the brick plugged in and running as root does lsusb -v show you an entry for a Lego device?

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

Postby okn » Sun Jun 22, 2008 11:03 pm

Hi Andy,

The simple answer is that running as root indeed works, thanks for the tip.

What I still don't understand is why. Follwoing the README instructions I set permissions to allow everyone (chmod 777) for /dev/bus/usb and recursively to all the directory tree below it. This should have allowed the permission to talk to the brick from any user, so what have I mimssed?

Doing lsusb -v as a regular user I get:

Bus 004 Device 003: ID 0694:0002 Lego Group
with lots of other details and some that are not accessible to a normal user appearing as not allowed.

Many thanks,

Abe
okn
New User
 
Posts: 8
Joined: Sun Jun 22, 2008 3:34 pm

Postby gloomyandy » Sun Jun 22, 2008 11:16 pm

Hi,
I'm not 100% sure about this but I have a feeling that the permissions will not stick because the device will get deleted/re-created every time you turn it on and off. I think that is what udev is all about. Basically you add entries that match the device and describe the permissions and ownership to be used for it. This may be a little different in recent versions of Linux though (I seem to remember that the latest Ubuntu has a new version of udev that does things in a different way....)...

Good luck

Andy

PS If you do get it working post here and say how....
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4174
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby gloomyandy » Sun Jun 22, 2008 11:20 pm

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


Return to NXJ Hardware

Who is online

Users browsing this forum: No registered users and 0 guests

more stuff