LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-18-2004, 01:09 AM   #1
m_m
Member
 
Registered: Aug 2002
Posts: 37

Rep: Reputation: 15
Lego Usb Tower driver


I am trying to setup the LEGO USB INFRARED TOWER on Mandrake 10.0 official. I downloaded legousbtower-0.5.4 from sourceforge.net and I am getting a 'kernel version not supported' , they support up to kernel 2.4
On the net I found some posts where it states that Lego USB tower driver has been officially part of the linux kernel 2.6.1.
Mandrake 10.0 runs on kernel 2.6.3, it detects Lego USB, but as a scanner.

Does anybody have any ideea how to fix this?

Thanks,
m&m
 
Old 07-22-2004, 07:42 AM   #2
m_m
Member
 
Registered: Aug 2002
Posts: 37

Original Poster
Rep: Reputation: 15
Come on !! Nobody is playing anymore !

How can I prevent Mandrake 10 from recognizing Lego Usb Tower as a scanner??

Thanks,
m_m
 
Old 07-22-2004, 09:52 AM   #3
MasterX
LQ Newbie
 
Registered: Jul 2004
Posts: 9

Rep: Reputation: 0
Maybe, this is just a thought, you need to compile the kernel and to enable support for this legotower. The fact that legotower is part of kernel 2.6.1 does not mean that Mandrake has compiled the kernel so that it supports it. Now, it is possible that they compiled it as a module. In that case you should find the right module in /lib/modules/2.6.3/ check all the folders. The module has the name legousbtower.ko
 
Old 07-23-2004, 10:30 AM   #4
m_m
Member
 
Registered: Aug 2002
Posts: 37

Original Poster
Rep: Reputation: 15
Thanks for your thoughts ! At least somebody is still playing ! :-)
Your are right. Maybe the driver was not compiled in the kernel.
I downloaded the driver and tried to compile it but I got some errors. I though maybe if I upgrade the whole kernel would work.
I downloaded 2.6.7 from kernel.org recompile it and installed succesfully ( I made sure to check Lego USB TOwer support in xconfig).
Still Mandrake 10 sees my usb tower as a scanner, plus a bunch of other mics. stuff than failed (but not the topic of this post).
Maybe it has to do with how linux links modules with devices , but unfortunally I dont know much about.(....I know , I know RTFM..).
If someone can post some hints I would greatly appreciate it!

Thanks,
m_m
 
Old 07-23-2004, 10:46 AM   #5
MasterX
LQ Newbie
 
Registered: Jul 2004
Posts: 9

Rep: Reputation: 0
First of all compile the support for lego tower as a module.
Reboot, your system and make sure you load the new kernel. You have to add a new entry in Lilo/Grub.

Then, open a console and type dmesg.
Go to to /lib/modules/2.6.7/ --> search in the folders to find the module for the legotower and load it with modprobe legousbtower. Run again dmesg and look at the bottom of the screen. You should see some info about the legotower.

If the driver is written for kernel 2.4.* it will not compile for kernel 2.6.*


Do not forget to add the module legousbtower to /etc/module.conf, so that it is loaded everytime you boot in your system
 
Old 07-24-2004, 11:16 PM   #6
m_m
Member
 
Registered: Aug 2002
Posts: 37

Original Poster
Rep: Reputation: 15
Thanks again for your help!

Your post really helped me understand some of the stuff!
Looking through some the directories, I did find a legousbtower.ko.gzip. Why was is achived? I dont know. But I did installed it and it created a /dev/usb/legoustower1. I was so happy! :-) but for shor t time.
The firmdl or lejosfirmdl could not find it! I re-installed lejos, make it, and tried again I got some stupid c error. I re-installed lejos again, make it, tried again >:-( some java errors.
I am really frustrated for two weeks now I am trying to install this. In windows it took 10 minutes. WHY? it's (almost) the same code, made by the same people.
If anybody has any ideas or comments please post them!

Thanks,
m_m
 
Old 07-25-2004, 11:01 AM   #7
MasterX
LQ Newbie
 
Registered: Jul 2004
Posts: 9

Rep: Reputation: 0
Quote:
Originally posted by m_m
Looking through some the directories, I did find a legousbtower.ko.gzip. Why was is achived?
Which directories were theses in? Did you find legousbtower in /lib/modues/2.6.1/... ?
If you know how to compile a kernel, I strongly suggest to download and compile 2.6.7.
BTW, when you load the module, what did dmesg say. Did it give informations about the device that you have? This is very important, if dmesg gave informations about your device, then maybe you do not have to compile a new kernel.

About the firmdl or lejosfirmdl, I have never used these programs before. Maybe there is something in the manual, maybe you need to configure it. You did not have to compile firmdl or lejosfirmdl again. I do not know why it does not compile, but if you still have the executables/libraries (those from the first time, you compiled firmdl or lejosfirmdl ) use them.
 
Old 07-26-2004, 09:29 AM   #8
m_m
Member
 
Registered: Aug 2002
Posts: 37

Original Poster
Rep: Reputation: 15
I did find legousbtower.ko.gz in /lib/modules/2.6.3/usb/misc. I unzipped it, modprobe it and dmesg said that lego usb support has been added and that is /dev/usb/lego-159. There was no lego-159, it was just legousbtower1 in /dev/usb/.
I've tried to connect to both but none of them worked ( no such file or directory).
Why dmesg woud say lego-159 instead of legousbtower1?
I tried to create another character device as lego0, but that didnt worked either.
I did download and recompile the kernel 2.6.7. It worked very well, surprisingly !! But the usb driver for lego still did not compile succesfully. So, I decided to switch back to 2.6.3 since I founded that driver already compiled and ready to install.
Another very weird thing is that now the lejos components fail. Almost fixed one problem and another one pops up. :-( I will research that some more.
Thanks again MasterX for reading and and answering my questions!

m_m
 
Old 07-26-2004, 11:17 AM   #9
MasterX
LQ Newbie
 
Registered: Jul 2004
Posts: 9

Rep: Reputation: 0
Quote:
Originally posted by m_m

1. I did find legousbtower.ko.gz in /lib/modules/2.6.3/usb/misc. I unzipped it, modprobe it and dmesg said that lego usb support has been added and that is /dev/usb/lego-159. There was no lego-159, it was just legousbtower1 in /dev/usb/.
I've tried to connect to both but none of them worked ( no such file or directory).
Why dmesg woud say lego-159 instead of legousbtower1?

2. I tried to create another character device as lego0, but that didnt worked either.

3. I did download and recompile the kernel 2.6.7. It worked very well, surprisingly !! But the usb driver for lego still did not compile succesfully. So, I decided to switch back to 2.6.3 since I founded that driver already compiled and ready to install.

4. Another very weird thing is that now the lejos components fail. Almost fixed one problem and another one pops up. :-( I will research that some more.
m_m
About comment 1, it is very weird that the module was zipped and that dmesg reported a device character that does not exist. This could be because you need to load the module with certain parameters or because you need to download the latest version of the kernel

For comment 2: You can not create a character device and expect to work. Unfortunately things do not work in this way

Comment 3: When you say "But the usb driver for lego still did not compile succesfully" what do you mean? While you were compiling the kernel you saw an error message about not being able to compile this module or did you compile kernel 2.6.7 and then you tried to compile the driver that you downloaded from the internet?
If it is the latter, what you did is wrong. If it is the former, then this means that in order to compile this driver you need first to compile something else. The kernel compiles without a single problem. If something goes wrong then this is a user's mistake.
So, do this... Compile kernel 2.6.7 and make sure that the driver for the lego tower is compiled as module, by issuing the command make, then type make modules_install (this will install all the modules in /lib/modules/2.6.7 ---> go and check). Finally make install to copy an image of the kernel to /boot folder (you may have a partition with the name /boot, check on that. and copy the kernel image to correct place. I mean if you have a partition, then mount it first and then run make install. Make sure to copy the image in a place were the other images are). The last step is to modify lilo or grub so that it will boot with the new kernel.
If everything goes well and you are using the new kernel (the command is uname -r) then use modprobe to load the module and search for the character device in /dev/usb/

Comment 4. I do not know why they fail. The thing is that I do not have a lego tower and I have never used lejos, so I can not really help on that. Maybe Google or another search engine can give you some hints on what could be wrong.
 
Old 08-17-2004, 09:58 PM   #10
m_m
Member
 
Registered: Aug 2002
Posts: 37

Original Poster
Rep: Reputation: 15
Well, after long sleepless nights, out of the blue my Lego USB Tower start working.
Do not know exactly why or how it happened ( that kinda sounds like X-files).
But the good news is that there is still hope !!!!!!
One thing I did different, instead of firmdl ( the java program that it suppose to download the LEjos to the brick) I used the old C version lejosfirmdl. Firmdl kept pop-uping error.
So, for anybody else who has troubles installing the lego tower, just dont loose hope and keep at it! :-)

m_m
 
Old 04-06-2005, 09:58 PM   #11
kdogksu
Member
 
Registered: Dec 2004
Location: Kansas, United States
Distribution: Ubuntu
Posts: 52

Rep: Reputation: 16
Lego USB IR tower issues

I am trying to get the lego IR tower to work under linux with little success. I am running debian linux, vanilla kernel 2.6.9. My ir tower is a USB device. I built the kernel with the USB Lego Tower driver as a module, and am currently running that kernel. I have modprobed 'legousbtower', which generates no errors, and shows up in dmesg. When I plug in the ir tower, it registers in dmesg as well, giving a major and minor character number, but doesn't list any device path. Others have reported that they have something like /dev/usb/legotower0, but I have nothing of the sort in /dev/usb. I have tried /dev/ttyUSB* with no luck either. I also modprobed 'ir_usb' just incase, but this didn't help either. I installed the utilities from the debian package (brickos), and am using the lego ir tower driver included in the kernel, so I don't think I selected any incorrect settings or compiled it incorrectly or anything. Any help would be appreciated. Thank you!

-----------------------
Output from dmesg after 'modprobe legousbtower' and plugging in device:

usbcore: registered new driver legousbtower
drivers/usb/misc/legousbtower.c: LEGO USB Tower Driver v0.96
usb 1-1: new low speed USB device using address 4
usb 1-1: configuration #1 chosen from 4 choices
drivers/usb/misc/legousbtower.c: LEGO USB Tower #0 now attached to major 180 minor 160
drivers/usb/misc/legousbtower.c: LEGO USB Tower firmware version is 1.0 build 134

----------------------
Output of lsusb:
Bus 001 Device 004: ID 0694:0001 Lego Group Mindstorms Tower
Bus 001 Device 001: ID 0000:0000
 
Old 04-13-2005, 08:02 PM   #12
kdogksu
Member
 
Registered: Dec 2004
Location: Kansas, United States
Distribution: Ubuntu
Posts: 52

Rep: Reputation: 16
I fixed the problem. All I needed to do was mknod with the proper major and minor character numbers to create a device to use the tower. Now all is great! Don't know why the module didn't create the node itself...
 
Old 06-16-2005, 03:08 AM   #13
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
I've read through this thread and would like to ask two questions:

1) Wouldn't it be possible to add support for the USB tower as a module without recompiling the kernel?

2) I've been looking on the internet for LegoUSB IR tower support in Linux but wasn't able to find anything. Can anybody point me to some useful links? (I did find out about legOS, NQC etc, and I think I'd like to give NQC a try)
 
Old 06-17-2005, 01:53 PM   #14
kdogksu
Member
 
Registered: Dec 2004
Location: Kansas, United States
Distribution: Ubuntu
Posts: 52

Rep: Reputation: 16
The lego USB drivers are included in recent kernel distributions. If your kernel was built without compiling the driver in or as a module, then you would have to rebuild the kernel to be able to use it. If you downloaded the driver, I agree that you should be able to build it against the current kernel and not have to recompile the kernel itself. If you're looking to get started with the lego IR tower, I would recommend starting with the built-in kernel driver. It worked just fine for me. Once you build it in (or modprobe it), you should be able to plug in the device and go from there. If a node doesn't show up (e.g. /dev/usb/lego), you may need to create one as I did. Also remember that some download utilities require you to set the RCXTTY environment variable, as in 'export RCXTTY=/dev/usb/lego', or whatever the path to your device is.

One more tip: If you have trouble programming your RCX brick under flurescent lights, try sheilding the top of the IR path between the devices with a book or something, or simply moving to a place without florescent lights. I'm not sure why, but the lights were causing havoc with my setup for a while. Good luck!
 
Old 06-17-2005, 04:23 PM   #15
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
I found the following in /boot/config-2.6.11-1.14_FC3:

#
# USB Miscellaneous drivers
#
CONFIG_USB_LEGOTOWER=m

it's not a 'y' so I guess it's not compiled in, but there is an option for doing so (never done a kernel compile and haven't a clue)

Where would I look for the driver to copile it as a module... and maybe some incredibly detailed instructions?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Good, quite ATX-mid tower case that supports 6 usb ports? r_jensen11 General 1 03-21-2005 08:36 PM
Read/Write LEGO USB Tower swinchen Programming 0 01-25-2005 09:36 PM
roadrunner wireless usb tower compatibility eruhk Linux - Wireless Networking 0 08-16-2004 02:32 PM
KDS USB CD Tower LinuxMWB Linux - Hardware 0 01-20-2004 09:24 PM
LEGO Mindstorms RIS 2.0 L.Tilley Linux - General 2 03-12-2002 12:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration