Ignore that last patch. It doesn't work.
BrickOS won't compile because of a missing
LEGO_TOWER_SET_READ_TIMEOUT define.
Oh... "Use the legousbtower driver from this
project instead of the one in the kernel"...
LegoUSB Doesn't work with linux-2.6. It is
only valid with versions up to 2.4, which are
now obsolete.
Here's my final word on the subject because I've
spent well over 20 hours over the past six months
trying to get the USB tower working under linux:
Linux does not, and apparently never will, support
the Lego USB tower. *AT ALL* don't waste your
time (if you plan to stick with 2.4, fine, be my
guest.)
Why you say? Because it appears to me that
1) Nobody is really actively developing a solution.
source files and patches in many cases are
two years old or even older. I think that when
the patches are two years old and the project
still doesn't work then you call the project
dead.
2) none of the developers of BrickOS, the major
Lego functionality project care to put USB
support into their project. In fact they seem
to be actively trying to keep it out. Why else
would they not have merged in patches over
two years old?
3) Not Quite C is not quite useful for much of
anything other than *maybe* teaching a five
year enough about programming to know that
they want to be an minstrel when they grow
up.
4) The people developing the LegoUSB project
don't seem to be communicating with the
people developing the kernel version. People
say the kernel accepted the driver but
apparently they didn't because the include
file in the kernel seems to be missing all the
defines. So the version in the kernel is wrong
and/or doesn't work.
So here's my summary:
There are no projects that are placing a demand
for a working USB solution. So nobody really cares,
or will every read this message.
The USB driver that seems to work only works with
obsolete kernel versions.
The version that the current *stable* kernel version
uses doesn't work at all. But again, nobody cares
so I'm sure nobody tells them that.
I would suggest a solution but it's so screwed up
and suffering from apathy that nobody cares to
implement a decent solution. So I won't bother
suggesting one either.
Oh, you can mark this as flame bait, or troll or
whatever but I am not the only one having
trouble getting this to work.
Logged In: YES
user_id=977207
I'm running linux-2.6.8 and I got BrickOS working by
applying the USB patch, and using the LegoUSB's header file.
The #include <LegoUSB/driver.h> found in the patch (to
util/firmdl/rcx_comm.c) should include the header provided
by LegoUSB.
This way you still use the driver included in the kernel.
You don't need to install LegoUSB!
I think it's even enough to paste
#define LEGO_TOWER_SET_READ_TIMEOUT _IOW('u', 0xc8, int)
at the top of util/firmdl/rcx_comm.c
or maybe even remove the ioctl call at line 176 (well...
somewhere around it) since the kernel module accepts the
timeout value as parameter, and set it when the tower is
plugged in (AFAIK).
Before being able to use the tower you may also have to
create the device, simply done with
mknod /dev/usb/lego0 c 180 160
(you have to do this as root, and remember to set rights to
allow users to access the device)