Page 1 of 1

Problem when trying to install nxtOSEK in Lubuntu

Posted: 13 Sep 2013, 13:01
by dbdevelopment
Hi!

I am trying to install nxtOSEK in Lubuntu. I am following this guide: http://lejos-osek.sourceforge.net/insta ... _linux.htm The problem is, when I try to build libnxt using scons, as in step 3, it doesn't work. I get this:

Code: Select all

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: libnxt.a' is up to date. gcc -o fwflash main_fwflash.o -L. -lusb -lnxt ./libnxt.a(lowlevel.o): In functionnxt_init':
/home/username/nxt/libnxt-0.3/lowlevel.c:49: undefined reference to usb_init' ./libnxt.a(lowlevel.o): In functionnxt_find':
/home/username/nxt/libnxt-0.3/lowlevel.c:60: undefined reference to usb_find_busses' /home/username/nxt/libnxt-0.3/lowlevel.c:61: undefined reference tousb_find_devices'
/home/username/nxt/libnxt-0.3/lowlevel.c:63: undefined reference to usb_get_busses' ./libnxt.a(lowlevel.o): In functionnxt_open':
/home/username/nxt/libnxt-0.3/lowlevel.c:97: undefined reference to usb_open' /home/username/nxt/libnxt-0.3/lowlevel.c:99: undefined reference tousb_set_configuration'
/home/username/nxt/libnxt-0.3/lowlevel.c:102: undefined reference to usb_close' /home/username/nxt/libnxt-0.3/lowlevel.c:106: undefined reference tousb_claim_interface'
/home/username/nxt/libnxt-0.3/lowlevel.c:109: undefined reference to usb_close' /home/username/nxt/libnxt-0.3/lowlevel.c:118: undefined reference tousb_release_interface'
/home/username/nxt/libnxt-0.3/lowlevel.c:119: undefined reference to usb_close' ./libnxt.a(lowlevel.o): In functionnxt_close':
/home/username/nxt/libnxt-0.3/lowlevel.c:130: undefined reference to usb_release_interface' /home/username/nxt/libnxt-0.3/lowlevel.c:131: undefined reference tousb_close'
./libnxt.a(lowlevel.o): In function nxt_send_buf': /home/username/nxt/libnxt-0.3/lowlevel.c:148: undefined reference tousb_bulk_write'
./libnxt.a(lowlevel.o): In function nxt_recv_buf': /home/username/nxt/libnxt-0.3/lowlevel.c:166: undefined reference tousb_bulk_read'
collect2: error: ld returned 1 exit status
scons: *** [fwflash] Error 1
scons: building terminated because of errors.
Can someone help me?

Re: Problem when trying to install nxtOSEK in Lubuntu

Posted: 13 Sep 2013, 13:43
by gloomyandy
Looks like you have the wrong version of libUSB development package installed. I think NXTOSEK is based on the old leJOS code which uses libUSB 0.x many of these functions like usb_init do not exist in the libUSB SDK. There may be some sort of compatibility layer you can use.

Re: Problem when trying to install nxtOSEK in Lubuntu

Posted: 13 Sep 2013, 13:50
by lvoc
Step 3 is a one time process, if you have a Windows computer I recomedn using NXT-G to do this.
You may use this tutorial
http://drgraeme.net/LEGOUpDateNXTFirmwa ... rmware.htm

Re: Problem when trying to install nxtOSEK in Lubuntu

Posted: 13 Sep 2013, 14:03
by dbdevelopment
Thank you for your Quick replies! I used this command: ~$ sudo apt-get install scons libusb-dev libusb-0.1-4 as described in the guide. Shouldn't that give me the old version? I'm not so used to Linux, so I might be wrong. The reason I do this in Linux is because I do it on my school computer, so I want to be in at virtual machine. I could try to do it in windows instead if I cant get it to work in Linux.

Re: Problem when trying to install nxtOSEK in Lubuntu

Posted: 15 Sep 2013, 20:41
by mrblp
dbdevelopment wrote: I used this command: ~$ sudo apt-get install scons libusb-dev libusb-0.1-4 as described in the guide. Shouldn't that give me the old version?
Only the runtime lib will be the old one, the development lib has to be the old one, too. So you have to install libusb-dev in the 0.1 version. I always use the graphic installer so I do not know the exact name of the package.

Good luck,

Re: Problem when trying to install nxtOSEK in Lubuntu

Posted: 16 Sep 2013, 07:21
by dbdevelopment
I couldnt find the old version of libusb-dev, only the runtime version. Do you know where I can find it?

Re: Problem when trying to install nxtOSEK in Lubuntu

Posted: 17 Sep 2013, 19:54
by mrblp
dbdevelopment wrote:I couldnt find the old version of libusb-dev, only the runtime version. Do you know where I can find it?
Open Synaptic or the Lubuntu Software Center and search for libusb-dev. Check the version information and verify it is 0.1. In my software center the version infomation looks like libusb-dev 2:0.1.12-20. Mmhh - and that is the package named "libusb-dev". So you already have the right one installed...

Did you setup udev to set the access right correctly?

Re: Problem when trying to install nxtOSEK in Lubuntu

Posted: 16 Oct 2013, 17:24
by dbdevelopment
Sorry for not replying earlier, but I have struggled to get the screen on my NXT working, I got this problem: http://www.youtube.com/watch?v=w8pwffsYFGo but I got it fixed now. I also got this problem to work in Windows, so now I'm programming in C++ with a working screen :D

Re: Problem when trying to install nxtOSEK in Lubuntu

Posted: 21 Oct 2013, 12:24
by lvoc
Could you provide more information about how you fixed the issue? I think it would be good to have it documented.
Lauro