Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Lego Mindstorms (ebuilds and usb!)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Luud
Apprentice
Apprentice


Joined: 05 Jun 2003
Posts: 246
Location: Netherlands

PostPosted: Fri Jun 25, 2004 12:31 pm    Post subject: Reply with quote

Hi flecluse,

See the HOWTO in the Documentation, Tips and Tricks section here.

There is documentation on how to install the kernel patch and how to extract the ebuilds into a portage overlay directory.

See section "7.b. Lego USB Tower with Kernel 2.6"

Code examples are given. If anything is not clear, post back in this thread and not the HOWTO thread please.

Good luck!
Luud
_________________
"Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally
Back to top
View user's profile Send private message
rcx21000
n00b
n00b


Joined: 20 May 2004
Posts: 64
Location: somewhere

PostPosted: Fri Jun 25, 2004 4:26 pm    Post subject: Reply with quote

I only have a serial tower :(

Does anyone know how to get them to work?
Back to top
View user's profile Send private message
Luud
Apprentice
Apprentice


Joined: 05 Jun 2003
Posts: 246
Location: Netherlands

PostPosted: Sun Jun 27, 2004 12:17 pm    Post subject: Reply with quote

Hi rcx21000,

Should be simpler than the USB version.

There is lots of information on line.

Now you have to use one of the /dev/ttyS<x> devices in stead of usb.

So, just install the ebuilds, e.g. the NQC one and try it out. The NQC manual/help should provide enough information.

I have no experience with these though.

Cheers,
Luud

P.S. please post back your experiences, I will put them up in the howto for others to benefit from.
_________________
"Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally
Back to top
View user's profile Send private message
flecluse
n00b
n00b


Joined: 08 Nov 2003
Posts: 24
Location: Belgium (Brussels)

PostPosted: Sun Jun 27, 2004 7:06 pm    Post subject: USB lego tower and kernel 2.6.7 Reply with quote

Hi,

Is there anybody who can tell me how i kan get the USB lego tower working on my 2.6.7 kernel, i have UHCI usb and thats the problem I think, I'v only found 2.6.5 patches.

Thanks a lot
Filip
_________________
To kill one is a tragedy,
To kill one million is a statistic!
Back to top
View user's profile Send private message
tomthewombat
Apprentice
Apprentice


Joined: 29 Mar 2003
Posts: 244
Location: NY State

PostPosted: Mon Jun 28, 2004 1:33 am    Post subject: Reply with quote

2.6.7 now comes with a fully patched up driver!
_________________
http://www.wombatorium.net
Back to top
View user's profile Send private message
flecluse
n00b
n00b


Joined: 08 Nov 2003
Posts: 24
Location: Belgium (Brussels)

PostPosted: Mon Jun 28, 2004 7:16 am    Post subject: Strange Reply with quote

this is strange because using LEJOS I still cant upload the firmware or any program, it starts and stops directly after sending
_________________
To kill one is a tragedy,
To kill one million is a statistic!
Back to top
View user's profile Send private message
Luud
Apprentice
Apprentice


Joined: 05 Jun 2003
Posts: 246
Location: Netherlands

PostPosted: Tue Jun 29, 2004 11:56 am    Post subject: Reply with quote

Did you make sure the "usb" keyword was in your use flags when you installed the ebuilds?

What does NQC give with the watch command?

Do de leds inside the tower blink?

Also, I've read somewhere that the firmware needs to be uploaded using brickOS. I can't tell for sure, as I already uploaded the firmware from windows (yeah, the shame, I know :wink:)

I've had my share of problems in the beginning as well, read back in this thread for them. They turned out to be mistakes I made...
_________________
"Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally
Back to top
View user's profile Send private message
maarten.f
n00b
n00b


Joined: 26 Sep 2004
Posts: 2
Location: /dev/europe/netherlands/utrecht/soest

PostPosted: Sun Sep 26, 2004 9:24 pm    Post subject: Reply with quote

hmm...

I've signed op for this forum because I am doing a project at school where I need to
program a rcx-based robot. We would like to program that robot with LeJOS.

I seem to have exactly the same problems as flecluse has.

Quote:
this is strange because using LEJOS I still cant upload the firmware or any program, it starts and stops directly after sending


When I execute firmdl the next will happen:
Code:

 $ firmdl
Segment 0 length = 13692
Segment 1 length = 2940
Deleting firmware
Firmware deleted
Downloading firmware
Total image size = 16632(17k)
Response = -4


And IRL the next happens:

* a light inside the usbtower begins to blink
* the RCX begins to count till 20
* Exactly at the moment that the RCX stops counting, the line 'response= -4' apears

I looked up in rcx_comm.h what the meaning was of the mysterious response:
RCX_NO_RESPONSE

pretty weird, isn't it?

I tried both linux-2.6.7-gentoo-r13 and 2.6.8-gentoo-r3.

At the moment I am first going to have some sleep.

Tomorrow I am going to merge an older pure vanilla kernel which I am going to patch as
described in the howto.
Sadly there is are serious explouts in the 2.6.5 kernels... But i suppose I have to take the risk.
And grub is my friend! ;)

I keep you informed.

Happy hacking,
-Maarten
_________________
"A common mistake that people make when trying to design
something completely foolproof was to underestimate
the ingenuity of complete fools."

The ultimate hitchhiker's guide tot the galaxy - Douglas Adams
Back to top
View user's profile Send private message
Luud
Apprentice
Apprentice


Joined: 05 Jun 2003
Posts: 246
Location: Netherlands

PostPosted: Mon Sep 27, 2004 7:22 am    Post subject: Reply with quote

To upload the firmware, you probably need brickOS. It seems to be the only one capable of that at the moment (I might be wrong though, I haven't been playing with it for a while).

Otherwise, you can always upload the firmware using the windows tools an continue with Linux from there (that's what I did).
_________________
"Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally
Back to top
View user's profile Send private message
flecluse
n00b
n00b


Joined: 08 Nov 2003
Posts: 24
Location: Belgium (Brussels)

PostPosted: Mon Sep 27, 2004 12:20 pm    Post subject: Reply with quote

indeed it is the same problem as i have and i still have not found a sollution such a shame. if you should find it please let me know
_________________
To kill one is a tragedy,
To kill one million is a statistic!
Back to top
View user's profile Send private message
maarten.f
n00b
n00b


Joined: 26 Sep 2004
Posts: 2
Location: /dev/europe/netherlands/utrecht/soest

PostPosted: Mon Sep 27, 2004 6:59 pm    Post subject: Reply with quote

Okay
Quote:
Otherwise, you can always upload the firmware using the windows tools an continue with Linux from there (that's what I did).


I have loaded the leJOS firmware using the MS Windows-version of leJOS.

At the moment the next is standing on te LCD-screen of my RCX:

Code:
13.5  0


Well, i reboot to Gentoo GNU/Linux.

Code:

maarten@electron hworld $ lejosjc HelloWorld.java
maarten@electron hworld $ lejoslink -o HelloWorld.bin HelloWorld
maarten@electron hworld $ lejosdl HelloWorld.bin
Response = -4


Again response -4

And the LCD-screen of my RCX displays now:

Code:
0001  0


It is really driving me mad!

I even merged the kernel Luud used in his howto and tried to patch it the same way he did. Again it just doesn't work properly!

I really do not have a clue what is going on...
... there seems to be some connection betwee the RCX, the usbtower and my Computer. But the -4 response is so weird.
I mean, RCX_NO_RESPONSE when there is clearly some kind of connection. :?

If i do not find a solution quickly I am afraid we have to start using a non-free operating system to run the pc part of leJOS. And I really don't like that idea at all.

Happy hacking,
-Maarten
_________________
"A common mistake that people make when trying to design
something completely foolproof was to underestimate
the ingenuity of complete fools."

The ultimate hitchhiker's guide tot the galaxy - Douglas Adams
Back to top
View user's profile Send private message
r.stiltskin
Apprentice
Apprentice


Joined: 11 Aug 2004
Posts: 227
Location: Brooklyn

PostPosted: Mon Sep 27, 2004 10:17 pm    Post subject: Reply with quote

Hey, have any of you actually used BrickOS with a USB tower in Gentoo (or in anything else)?

I just wasted HOURS installing Debian Sarge (with a 2.4.something kernel) on my laptop 'cause there were Debian ebuilds for the binutils & hitachi crosscompiler up on Sourceforge. I installed the cross-compiler stuff. I got the latest BrickOS to compile, got legousbtower.o installed, and ... bah!!! BrickOS can compile programs, but it can't upload anything to the RCX through the USB tower. (I know there's nothing wrong with the tower, driver & brick, since I also installed NQC & that works fine.)

Eventually I found that someone's working on a patch for BrickOS to get it to work with USB, but it doesn't seem to be ready yet.

Or ... do any of you have or know of a solution to this? (I'm looking forward to getting rid of that Debian anyway :wink: )
Back to top
View user's profile Send private message
r.stiltskin
Apprentice
Apprentice


Joined: 11 Aug 2004
Posts: 227
Location: Brooklyn

PostPosted: Mon Sep 27, 2004 10:37 pm    Post subject: Reply with quote

By the way, maarten.f, if you get tired of struggling with lejos & want to spend some time actually working with the robot, get a copy of NQC.
http://bricxcc.sourceforge.net/nqc/
It works, with virtually no aggravation.

And you can do pretty good things with it.

PS: also, the Cygwin installation of BrickOS works (at least, it does in XP -- I've just started using it).
Back to top
View user's profile Send private message
lramos85
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jun 2004
Posts: 141
Location: Riverside, Ca

PostPosted: Mon Nov 08, 2004 12:00 pm    Post subject: Reply with quote

I get and error when trying to send the firmware software to the RCX as well, I've look around and it all seems to go back to OCHD and 2.4 kernels but I don't have either, I use usb 2.0 and kernel 2.6.8 I get this errror:

Code:

lejosfirmdl --tty=usb
segment.lenght[0]...
segment.lenght[1]...
...
Transferring "/usr/bin/../bin/lejos.srec" to RCX...
write: Resources temporarily unavailable


any ideas of why this is happeing? my RCX counts till 20 then stops. PLEASE HELP, i need to use lejos for school. Thanks
_________________
Registered Linux User #328996
Register Now!
Adpot an unanswered post today!
Back to top
View user's profile Send private message
tomthewombat
Apprentice
Apprentice


Joined: 29 Mar 2003
Posts: 244
Location: NY State

PostPosted: Mon Nov 08, 2004 7:32 pm    Post subject: Reply with quote

Iheard not to use firmdl from lejos. NQC or BrickOS can be used to send the lejos firmware just fine.
_________________
http://www.wombatorium.net
Back to top
View user's profile Send private message
lramos85
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jun 2004
Posts: 141
Location: Riverside, Ca

PostPosted: Sun Nov 28, 2004 9:55 pm    Post subject: Reply with quote

I already downloaded the firmware to the RCX but I still can't seem to send anything through the usbtower, I have EHCI and UHCI on my config, all my usb's are USB2.0 I have kernel v2.6.8-gentoo-r4 with gentoo-dev-source. It seams like I can't send information through my usb but that cannot be it because I can print through usb. Please help I don't want' to use windoze.
_________________
Registered Linux User #328996
Register Now!
Adpot an unanswered post today!
Back to top
View user's profile Send private message
Luud
Apprentice
Apprentice


Joined: 05 Jun 2003
Posts: 246
Location: Netherlands

PostPosted: Mon Nov 29, 2004 8:02 am    Post subject: Reply with quote

Try if it works with NQC.

If it works with NQC, the problem is with Lejos.

If it doesn't work with NQC as well, then it might be usb related.

I haven't played with this for a while, so I don't know what the status of it is at the moment.
_________________
"Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally
Back to top
View user's profile Send private message
lramos85
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jun 2004
Posts: 141
Location: Riverside, Ca

PostPosted: Wed Dec 08, 2004 9:57 pm    Post subject: Reply with quote

Sorry for taking long to responce (Finals Week :( ), well, I emerge nqc (v. 2.5 r1) and when I do
Code:

nqc -Susb -run

it says "USB Tower not supported", but when I do
Code:

#nqc -S/dev/usb/legousbtower0 -run

the green led light ligths up but an error msg comes out: "Could not open serial port or USB device" any ideas?

Thanks
_________________
Registered Linux User #328996
Register Now!
Adpot an unanswered post today!
Back to top
View user's profile Send private message
lramos85
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jun 2004
Posts: 141
Location: Riverside, Ca

PostPosted: Wed Dec 08, 2004 11:19 pm    Post subject: Reply with quote

Ok, I fixed this on NQC, I don't have batteries on my RCX but as soon as I buy new one I'll let you know what happens. Anyhow, I still want lejos to work :(. but one step at a time I guess. btw...do you guys buy batteries when they become low or did you guys bought rechargeble batteries?

Thanks.
_________________
Registered Linux User #328996
Register Now!
Adpot an unanswered post today!
Back to top
View user's profile Send private message
lramos85
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jun 2004
Posts: 141
Location: Riverside, Ca

PostPosted: Sun Dec 12, 2004 7:10 am    Post subject: Reply with quote

It works perfectly with NQC, so now how do I make it work with lejos?

I've think I know whats wrong in lejos. When ever I do
Code:
lejosfirm --tty=usb

my printer which is also connected in a usb port starts trying to print (ofcourse I cancel the job before it starts printing stuff). This make me think that lejos is sending the signal to the printer not the rcx. How can I give it the rigth path the the usbtower (/dev/usb/lejousbtower0)? Thanks.
_________________
Registered Linux User #328996
Register Now!
Adpot an unanswered post today!
Back to top
View user's profile Send private message
ypereto
n00b
n00b


Joined: 16 Aug 2004
Posts: 4

PostPosted: Sun Apr 17, 2005 8:55 am    Post subject: Lejos, OHCI and 2.6.11-gentoo-r6 Reply with quote

I got lejos working on a 2.6.11-gentoo-r6 with nforce2 OHCI onboard usb and java 1.4.2_07
I am assumming you already have a device entry like /dev/usb/legousbtower0
I just enabled Device Drivers->USB support->USB Lego Infrared Tower

I initially tried downloading the firmware using lejosfirmdl but it kept stopping at 20 on the RCX and the command line give an error that said "write: Resource temporarily unavailable".

I eventually loaded the usb driver,eclipse, and the lejos plugin for eclipse on a windows machine.
From there I downloaded the lejos firmware to the RCX.

Then I went back to my gentoo machine and tried a download from there and it finally worked.

I realize people don't want to resort to using windows but once you have the firmware on there you don't need windows anymore.

This site was helpfull: http://lejos.sourceforge.net/tutorial/getstarted/firstbrick/linux.html

Here are my general steps:

cd /home/me/build
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/lejos login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/lejos co -P lejos
cd lejos
make

create a file named go.sh:
Code:
#!/bin/bash

export LEJOS_HOME=/home/me/build/lejos
export PATH=$PATH:$LEJOS_HOME/bin
export CLASSPATH=$CLASSPATH:.:$LEJOS_HOME/lib/classes.jar:$LEJOS_HOME/lib/rcxcomm.jar
export RCXTTY=/dev/usb/legousbtower0
lejosjc HelloWorld.java && \
lejoslink -o HelloWorld.bin HelloWorld && \
lejosdl --tty /dev/usb/legousbtower0 HelloWorld.bin


create another file names HelloWorld.java:
Code:
import josx.platform.rcx.LCD;
import josx.platform.rcx.TextLCD;

/**
 * @author Ryan VanderBijl
 */
public class HelloWorld
{
  public static void main (String[] aArg)
  throws Exception
  {
         LCD.clear();
         TextLCD.print ("hello");
         Thread.sleep(2000);
         TextLCD.print ("world");
         Thread.sleep(2000);
  }
}


chmod +x go.sh
./go.sh
_________________
I like gentoo
Back to top
View user's profile Send private message
tomthewombat
Apprentice
Apprentice


Joined: 29 Mar 2003
Posts: 244
Location: NY State

PostPosted: Sun Apr 17, 2005 1:03 pm    Post subject: Reply with quote

Alternately, you can use NQC or BrickOS to send the LeJOS firmware.
_________________
http://www.wombatorium.net
Back to top
View user's profile Send private message
b0j3
n00b
n00b


Joined: 25 Dec 2004
Posts: 20

PostPosted: Fri Mar 24, 2006 3:03 pm    Post subject: Reply with quote

Does anybody know where I can find ebuilds for brickos? The link on the first page doesn't work.
Back to top
View user's profile Send private message
b0j3
n00b
n00b


Joined: 25 Dec 2004
Posts: 20

PostPosted: Sat Mar 25, 2006 5:03 pm    Post subject: Reply with quote

Just found out. Exchange .net with .com and it works.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum