Problem connecting NXT with USB on Linux Ubuntu 6.10

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

Moderators: 99jonathan, roger, imaqine

Problem connecting NXT with USB on Linux Ubuntu 6.10

Postby johnc » Thu Nov 19, 2009 3:17 pm

Hello,

I have just started with lejos on Linux. I searched for similar problem in the archives and did not find a solution to my problem.

Installed the software and libusb; connected the NXT with USB, and ran
nxjbrowse -u
from terminal as root.
The error message was:
leJOS NXJ> Failed to load USB comms driver: Cannot load USB driver

Here is my configuration:
Ubuntu 6.10
kernel 2.6.17-10

environment:
export NXT_HOME=/usr/local/share/lejos_nxj
export JAVA_HOME=/usr/local/jdk1.6.0_17
export LD_LIBRARY_PATH=/usr/local/lib:$NXT_HOME/bin
export PATH=$PATH:$JAVA_HOME/bin:$NXT_HOME/bin


lsmod|grep usb lists:
usbcore 134912 3 ehci_hcd,uhci_hcd


Something must be missing. Is there a particular USB driver kernel module that must be loaded ?

Also, when the NXT is on and plugged in with a USB cable,
/proc/bus/usb/devices does not list it.
Note that the NXT was flashed and works fine from a Windows Vista PC.

Thank you very much.

John
johnc
New User
 
Posts: 8
Joined: Thu Nov 19, 2009 2:59 pm
Location: south florida

Postby gloomyandy » Thu Nov 19, 2009 3:34 pm

Hi,
when you say you have installed lejos, did you go through the build part of the install? Did it work? Can you provide an ls -l of your leJOS bin dir. Also what version of Java are you using. I would recommend the Sun version. If you run lsusb -l with the NXT on and connected do you see the Lego device in the output?

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

Clarifications on platform:

Postby johnc » Thu Nov 19, 2009 4:07 pm

I downloaded jdk1.6.0_17 for Linux from Sun.

Compiling the View sample app with
nxjc View.java
worked. All lejos & java binaries are in my PATH:
/usr/local/jdk1.6.0_17/bin:/usr/local/share/lejos_nxj/bin

The listing of $NXT_HOME/bin is
Code: Select all
drwxr-xr-x 2 root root  4096 2009-11-19 08:00 .
drwxr-xr-x 8 root root  4096 2009-11-19 08:00 ..
-rwxr-xr-x 1 root root 52752 2009-09-02 13:17 lejos_nxt_rom.bin
-rwxr-xr-x 1 root root 34532 2009-09-02 13:17 libjfantom.jnilib
-rwxr-xr-x 1 root root  1600 2009-09-02 13:17 nxj
-rwxr-xr-x 1 root root  1530 2009-09-02 13:17 nxjbrowse
-rwxr-xr-x 1 root root  1424 2009-09-02 13:17 nxjc
-rwxr-xr-x 1 root root  1527 2009-09-02 13:17 nxjconsole
-rwxr-xr-x 1 root root  1533 2009-09-02 13:17 nxjconsoleviewer
-rwxr-xr-x 1 root root  1530 2009-09-02 13:17 nxjcontrol
-rwxr-xr-x 1 root root  1530 2009-09-02 13:17 nxjdataviewer
-rwxr-xr-x 1 root root  1528 2009-09-02 13:17 nxjflash
-rwxr-xr-x 1 root root  1529 2009-09-02 13:17 nxjflashg
-rwxr-xr-x 1 root root  1585 2009-09-02 13:17 nxjlink
-rwxr-xr-x 1 root root  1530 2009-09-02 13:17 nxjmonitor
-rwxr-xr-x 1 root root  1480 2009-09-02 13:17 nxjpc
-rwxr-xr-x 1 root root  1427 2009-09-02 13:17 nxjpcc
-rwxr-xr-x 1 root root  1531 2009-09-02 13:17 nxjsocketproxy
-rwxr-xr-x 1 root root  1529 2009-09-02 13:17 nxjupload
-rwxr-xr-x 1 root root 38016 2009-09-02 13:17 StartUpText.bin


I tried to run ant in the build dir. and got errors from gcc complaining from missing bluetooth headers.

ibjlibnxt.so was copied in /lib

lsusb shows:
Bus 003 Device 007: ID 0694:0002 Lego Group

What is missing ?

Thank you. I appreciate your taking the time to answer our questions.

John
johnc
New User
 
Posts: 8
Joined: Thu Nov 19, 2009 2:59 pm
Location: south florida

Postby gloomyandy » Thu Nov 19, 2009 4:16 pm

Hi,
The .so file should go in the leJOS bin dir not in lib...

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

Postby gloomyandy » Thu Nov 19, 2009 4:22 pm

Hi again,
Also if the ant build is not completing you would be better to remove that Bluetooth part of the build. The ant script installs the files to the correct location and also sets permissions etc. You can probably do this by hand (take a look at the ant scipt and check that you are doing the correct thing) but it is probably better to get the ant script to work correctly on your system...

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

libjlibnxt.so in bin did the job

Postby johnc » Thu Nov 19, 2009 4:31 pm

Hello Andy,

I copied libjlibnxt.so to bin and it worked !

Thanks a lot !!

John
johnc
New User
 
Posts: 8
Joined: Thu Nov 19, 2009 2:59 pm
Location: south florida

Postby gloomyandy » Thu Nov 19, 2009 4:41 pm

Hi,
Glad you got it working...

All the best

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4083
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