Want to try Java on the EV3?

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
gloomyandy
Posts: 323
Joined: 29 Sep 2010, 05:03

Want to try Java on the EV3?

Post by gloomyandy »

Folks if any of you have an EV3 and want to try a very early version of leJOS/Java on it then I've just created some instructions on how to do it:
https://sourceforge.net/p/lejos/wiki/Home/
This stuff is pretty bleeding edge, and you really need to be happy using Linux to work with it, but if that hasn't put you off, give it a go! Be gentle with it!

Andy
mrblp
Posts: 82
Joined: 02 Oct 2010, 14:33

Re: Want to try Java on the EV3?

Post by mrblp »

Hello glooymandy,

thank you for the work :-)

At the moment I have no WiFi dongle - is there any chance to activate the bluetooth stack?

Bye marvin
Last edited by mrblp on 03 Sep 2013, 19:46, edited 1 time in total.
Bye Marvin

- "I think you ought to know I'm feeling very depressed." - (Android Marvin in "The Hitchhiker's Guide to the Galaxy" by Douglas Adams, 1978)
gloomyandy
Posts: 323
Joined: 29 Sep 2010, 05:03

Re: Want to try Java on the EV3?

Post by gloomyandy »

depends what you want to do. Not sure how hard it would be to use Bluetooth to download and run programs. But to be honest I'd get a dongle the Edimax EW-7811UN works well with the leJOS SD card (but not with the standard firmware). It is really small and not very expensive (Approx £8 from Amazon in the UK). Having a TCP/IP connection is just so useful and at this stage with the EV3 I would say that if you want to use non Lego languages then a TCP connection is pretty much essential, it just makes so many things much easier. Bluetooth is on my list but a fair way down it to be honest. I'd want to get it working with Java, and that is tricky because there are not really any good maintained Java interfaces...
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Want to try Java on the EV3?

Post by afanofosc »

I am strongly of the opinion that the easiest way to communicate with the EV3 when it is not running the LMS2012 executable is via a wired Ethernet dongle. These are also available in several different forms and cheap. Running a long cable from a nearby router and plugging in the wired dongle via USB works really well - and requires no manipulation of a wifi configuration file on the SD card. It's a lot like using WIFI since there is no direct connection between the EV3 and the computer communicating with it via telnet or SSH, though there is, of course, a wire attached to the EV3.

Adding kernel modules from the leJos SD card image and elsewhere to the EV3 firmware and then modifying the LMS2012 code to work with any wifi dongle as well as supporting TCP/IP communication (direct & system commands) either via wired ethernet or wireless ethernet should be high on the priority list, imho.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
mrblp
Posts: 82
Joined: 02 Oct 2010, 14:33

Re: Want to try Java on the EV3?

Post by mrblp »

Hello all,

John, I thought yesterday about making the lejos image cdc-ether-capable. In that case the USB port will work as an ethernet-over-USB port. Not sure if that would work without any special hardware but I remember old dsl-modems which had an embedded linux and ethernet over USB.

gloomyandy, not sure if that has any priority? I am not very fast in developement because of my time (what about 48 h days? ;-) ) I still did not setup the sd-card for leJOS but it is in work ;-)

On the other side I think I have a way to get the original firmware work from sd-card and I have an idea how to copy the parts from the bin-file to the sd-card. That is something I understood while reading the scripts to make the sd-card for leJOS - there are also scrips for generating the bin-files.

So how can help you (and us as community)?

Bye - marvin
Bye Marvin

- "I think you ought to know I'm feeling very depressed." - (Android Marvin in "The Hitchhiker's Guide to the Galaxy" by Douglas Adams, 1978)
gloomyandy
Posts: 323
Joined: 29 Sep 2010, 05:03

Re: Want to try Java on the EV3?

Post by gloomyandy »

Not sure about ethernet over USB, I suspect it is not built into the the Lego kernel, but you may be able to add the needed modules. Which port would you run this over? The USB slave? If so you may find that the Lego VM is already running code on that port to support the HID stuff it uses to communicate with a PC, so this may not be viable if you want to run the Lego VM.

You should be able to run the standard Lego firmware program on the leJOS SD card (all of the files are there, we simply don't start the Lego VM), but obviously it it was not really intended for that and it not something I do much of (and so it may get broken).

While I agree that in terms of getting things working a simple wired ethernet dongle is great (and the EV3 boots faster!). I still think that if you want to build mobile robots (and use non standard firmware) then it is worth investing the time to get WiFi setup. If you use the micro USB dongle then it does not really get in the way of building and being able to do things like easily run the standard Java debug tools, or simply use println from your program as the robot moves around just makes things so much easier. Having TCP also means that you can run things like NFS which makes it much easier to run programs (no downloading them).
mrblp
Posts: 82
Joined: 02 Oct 2010, 14:33

Re: Want to try Java on the EV3?

Post by mrblp »

gloomyandy wrote:Which port would you run this over? The USB slave? If so you may find that the Lego VM is already running code on that port to support the HID stuff it uses to communicate with a PC, so this may not be viable if you want to run the Lego VM.
Yes, that one. Should be no problem for non LEGO vm firmwares as leJOS is.
You should be able to run the standard Lego firmware program on the leJOS SD card...
I just got the information about the contents of the card and the binary layout of the LEGO firmware files. Now I managed to copy the content of a LEGO firmware / bin file to a sd card and to start the brick from that card. So I am able to run the brick with actual firmware without flashing the brick itself. I did not try the leJOS images - that will be the next step.
While I agree that in terms of getting things working a simple wired ethernet dongle is great (and the EV3 boots faster!). I still think that if you want to build mobile robots (and use non standard firmware) then it is worth investing the time to get WiFi setup.
I agree in terms of a wireless connection. I love the bt connection of the NXT even while it is really slow. But it is really simple and comfortable.

OK, now I have to order a WiFi dongle and to go to bed.

Good night - marvin
Bye Marvin

- "I think you ought to know I'm feeling very depressed." - (Android Marvin in "The Hitchhiker's Guide to the Galaxy" by Douglas Adams, 1978)
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 2 guests