Comments on: Configuring the LEGO USB Tower on Linux https://pbrick.info/2013/10/configuring-the-lego-usb-tower-on-linux/ Random information about all discontinued LEGO pbricks (programmable bricks) Wed, 28 Aug 2019 18:37:17 +0000 hourly 1 https://wordpress.org/?v=4.9.5 By: TFevrier https://pbrick.info/2013/10/configuring-the-lego-usb-tower-on-linux/#comment-252 Tue, 28 Nov 2017 08:50:37 +0000 http://pbrick.info/?p=8#comment-252 This tips works for me
Thxs

]]>
By: Christian https://pbrick.info/2013/10/configuring-the-lego-usb-tower-on-linux/#comment-158 Wed, 09 Dec 2015 13:35:12 +0000 http://pbrick.info/?p=8#comment-158 @Justin … just ran into the same error and found the solution:

1) unpack and patch everything as described above and then run make until the error occurs.

2) Then edit the file compiler/lexer.cpp on line 1860 which looks like :

extern int isatty YY_PROTO(( int ));

and change this to

extern “C” int isatty YY_PROTO(( int ));

save and quit your editor.
3) run make again

Should now produce a workin nqc binary.

Hope this works for you as it worked for me, regards

Chris

]]>
By: Joseph https://pbrick.info/2013/10/configuring-the-lego-usb-tower-on-linux/#comment-154 Mon, 16 Nov 2015 02:55:36 +0000 http://pbrick.info/?p=8#comment-154 Thanks for the instructions. I found a similar set on another blog (likely based on these instructions) for setting up nqc on my Raspberry Pi (running NOOBs). After years of neglect, I decided to try to reinvigorate my old Mindstorms set (once I cleared out the leaky batteries). It seems to work, and the green light on the tower lights when I try to communicate, but he RCX 2.0 just ignores it (no numbers appear on the screen when I download firmware, nqc just stuck waiting). Has anyone else had trouble getting the RCX to communicate?

]]>
By: Michiel https://pbrick.info/2013/10/configuring-the-lego-usb-tower-on-linux/#comment-129 Mon, 21 Sep 2015 16:49:07 +0000 http://pbrick.info/?p=8#comment-129 Really helpful – I didn’t know there was an Ubuntu package for NQC
Thanks Jack!

]]>
By: Jack Foust https://pbrick.info/2013/10/configuring-the-lego-usb-tower-on-linux/#comment-128 Sat, 19 Sep 2015 19:27:55 +0000 http://pbrick.info/?p=8#comment-128 Michiel –

Thanks for the helpful instructions. I would like to pass along one suggestion – it may be a quirk of my particular set-up, but I eventually found that the only way I could get nqc to communicate with the tower was to rename /dev/usb/legousbtower1 to /dev/usb/legousbtower0. Presumably the package I am using (nqc_3.1.r6-1_amd64.deb) has a requirement for that hard-coded in somewhere. That solved the problem. It may be worth a try to anyone who has a loaded tower driver and a working nqc, has already tried chmod 666 and changing file ownership, but keeps getting the message (as I did) “could not open serial port of usb device.”

BTW – I had trouble compiling nqc, so here’s the link to the package, in case anyone wants to try it: http://packages.ubuntu.com/uk/precise/amd64/nqc/download

Cheers,
-Jack

]]>
By: Justin https://pbrick.info/2013/10/configuring-the-lego-usb-tower-on-linux/#comment-112 Sun, 19 Jul 2015 10:43:26 +0000 http://pbrick.info/?p=8#comment-112 Hi!

Tjanks for that great post, I’m really looking forward to be able to program my RCXs (2.0 &1.0)

Everything goes good until I run the patches. I got this
“patch -p0 < nqc-01-Linux_usb_and_tcp.diff
patching file nqc-3.1.r6/Makefile
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
5 out of 5 hunks ignored — saving rejects to file nqc-3.1.r6/Makefile.rej
patching file nqc-3.1.r6/nqc/nqc.cpp"

It comes few times and I can only say "no"

After few times I come back to the normal command line.

Then I ran: cd nqc-3.1.r6
make

And got the stacy looking lines. But at the end it says this:
"compiler/lexer.o: dans la fonction « yy_init_buffer(yy_buffer_state*, _IO_FILE*) »:
lexer.cpp:(.text+0x1c46): référence indéfinie vers « isatty(int) »
collect2: error: ld returned 1 exit status
make: *** [bin/nqc] Erreur 1"

Do you have any idea what I could do to solve this?

By the way I already managed to put the firmware on my RCX, I just need the patch between NQC and my USBtower.

Thank you in advance 🙂

Justin

]]>
By: Michiel https://pbrick.info/2013/10/configuring-the-lego-usb-tower-on-linux/#comment-93 Fri, 17 Apr 2015 13:10:13 +0000 http://pbrick.info/?p=8#comment-93 Hi! Looks like you are missing the g++ compiler on your Ubuntu.
The build-essential package contains a list of packages which are essential for building Ubuntu packages including g++ compiler, make and other required tools.

Please run the following three commands in your terminal.


sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential

That should solve it

]]>
By: mili https://pbrick.info/2013/10/configuring-the-lego-usb-tower-on-linux/#comment-92 Thu, 16 Apr 2015 07:23:29 +0000 http://pbrick.info/?p=8#comment-92 hi there,

thanks for the guide. I love to see a solution for this. Unfortunately I got stuck on the make command as you can see below. I am not sure how to continue? Thanks

ubuntu@ubuntu01:~/Schreibtisch/NQC/nqc-3.1.r6$ make
g++ -o bin/mkdata -Inqc/ -Iplatform/ mkdata/mkdata.cpp nqc/SRecord.cpp
make: g++: Befehl nicht gefunden
make: *** [bin/mkdata] Fehler 127
ubuntu@ubuntu01:~/Schreibtisch/NQC/nqc-3.1.r6$

]]>
By: Michiel https://pbrick.info/2013/10/configuring-the-lego-usb-tower-on-linux/#comment-38 Mon, 28 Apr 2014 08:45:43 +0000 http://pbrick.info/?p=8#comment-38 Hi,
Have you tried installing nqc as explained above? If not, try that first and see what it says. If it work, then you know the Linux part is working OK and the problem must be in the Wine emulation somehow. In that case you might try using Virtualbox on Linux instead and run a Windows VM inside that. That worked for me.
Cheers,
Michiel

]]>
By: JT https://pbrick.info/2013/10/configuring-the-lego-usb-tower-on-linux/#comment-34 Tue, 01 Apr 2014 07:50:47 +0000 http://pbrick.info/?p=8#comment-34 Hi,

After speading days trying to get my old RCX 2.0 back up and running on anything, i managed to get the old RIS software installed and I think working on Linux Minth 16 through WineHQ. Except the software doesn’t seem to recognize the USB tower.

I know the town works because I was able to use it on windows xp until I rebooted the laptop. This seems to be a known problem — RIS will work once on XP then never again after a reboot.

So the tower works. The USB ports work. The port is sending power to the tower, as it does light green when first connected. But after rebuilding the PC with Linux Mint I can’t seem to communicate with the tower anymore.

Is there anyway to just quickly test the connection in Linux?

]]>