Compatible Hardware

This is where you talk about the EV3 hardware related topics such as the brick, sensors, LEGO pieces, etc.

Moderators: roger, gloomyandy, skoehler

Re: Compatible Hardware

Postby rafiot » Wed Oct 02, 2013 7:59 pm

gloomyandy wrote:I'd be particularly interested in getting some sort of micro USB video camera working if anyone fancies giving that a go.

I was able to compile the uvc and video4linux drivers and my logitech c310 webcam was recognized. Then I tried streaming the webcam over the usb link using ffmpeg/ffserver. It works but is quite heavy on CPU usage.
The lightest tool I found is uvc_stream from the MJPEG Streamer project. It streams the mjpeg stream directly off the webcam without processing, with a cpu usage around 7-10%.
rafiot
New User
 
Posts: 3
Joined: Wed Oct 02, 2013 5:31 pm

Re: Compatible Hardware

Postby gloomyandy » Wed Oct 02, 2013 8:10 pm

Hi,
that's pretty interesting. Did you have any problems building the various drivers etc? Which versions did you use?

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4012
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Compatible Hardware

Postby rafiot » Wed Oct 02, 2013 8:52 pm

No problem at all. I just enabled the drivers in LEGOBoard.config.
Cross compilation of uvc_stream is equally easy as it has no dependencies. I've used their latest code.
Other things I ran succesfully on the EV3:
ffmpeg/ffserver
v4l-ctl (from the v4l-utils package)
mjpg_streamer
libjpeg-turbo 1.3.0
rafiot
New User
 
Posts: 3
Joined: Wed Oct 02, 2013 5:31 pm

Re: Compatible Hardware

Postby GeekDude » Sun Dec 15, 2013 10:08 pm

gloomyandy wrote:I know that the Edimax EW-7811UN micro WiFi dongle works fine I have two of these (you need the lejos SD card for this as I had to add extra drivers).


Any way to get them working with stock firmware? Or at least, get them to work from/with the official EV3 programming software.
GeekDude
New User
 
Posts: 9
Joined: Wed Nov 13, 2013 12:50 pm

Re: Compatible Hardware

Postby gloomyandy » Mon Dec 16, 2013 2:37 am

You probably can but you will need to rebuild the Lego VM as it hard codes the USB IDs of the only supported dongle.
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4012
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Compatible Hardware

Postby GeekDude » Mon Dec 16, 2013 5:39 am

I don't suppose that would be as easy as downloading the source, hitting control h to find the ID and replace it with the new one, then gccing it for ARM?
GeekDude
New User
 
Posts: 9
Joined: Wed Nov 13, 2013 12:50 pm

Re: Compatible Hardware

Postby gloomyandy » Mon Dec 16, 2013 11:06 am

Not far off (though finding and compiling may be more work then you think!). Then you will need to find a suitable sdcard image to put the code on. The leJOS 0.4.0-alpha image is not far off (it has the required modules and drivers), but we use modified startup scripts and do not start the Lego code. also we use modified versions of the Lego kernel modules (though in 0.4.0-alpha I think they still work with the Lego code, this will not be the case for future leJOS sdcards)...

Good luck

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4012
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Compatible Hardware

Postby ferrer » Tue Jun 17, 2014 9:05 pm

rafiot wrote:No problem at all. I just enabled the drivers in LEGOBoard.config.
Cross compilation of uvc_stream is equally easy as it has no dependencies. I've used their latest code.
Other things I ran succesfully on the EV3:
ffmpeg/ffserver
v4l-ctl (from the v4l-utils package)
mjpg_streamer
libjpeg-turbo 1.3.0


Can anyone tell me where the LEGOBoard.config file is to be found? I just downloaded version 0.8.1-beta. I poked around a bit in the unzipped tar archive and I could not find this file. I'd very much like to get webcam support going, so any feedback would be most appreciated.

Thanks!
GJF
Gabriel J. Ferrer
Hendrix College
ferrer
Novice
 
Posts: 34
Joined: Wed Jan 30, 2008 10:25 pm

Re: Compatible Hardware

Postby gloomyandy » Tue Jun 17, 2014 11:35 pm

There are two git repos for leJOS. You need the sdcard repo
https://sourceforge.net/p/lejos/ev3sdca ... ard.config
if you want to build the kernel, you will also need the appropriate cross compiler tools. You can find details of the tools you need here:
https://github.com/mindboards/ev3sources

Good luck, make sure you tell us and show us how you get on...
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4012
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Compatible Hardware

Postby ferrer » Wed Jun 18, 2014 2:09 pm

gloomyandy wrote:There are two git repos for leJOS. You need the sdcard repo
https://sourceforge.net/p/lejos/ev3sdca ... ard.config
if you want to build the kernel, you will also need the appropriate cross compiler tools. You can find details of the tools you need here:
https://github.com/mindboards/ev3sources

Good luck, make sure you tell us and show us how you get on...


Great, thanks for the information. I hope to try out a kernel recompile later today.

Once the kernel is set up properly, the real goal is of course to access the webcam from Java. To this end, my plan is to use http://webcam-capture.sarxos.pl/, which is a library I have used before on other projects. If I want to add this library to what is available for an EV3 Java program, do I just add its JAR file to the leJOS_EV3_0.8.1-beta/lib/ev3 directory along with the other JAR files, or is there another step I need to perform?

Thanks!
Gabriel J. Ferrer
Hendrix College
ferrer
Novice
 
Posts: 34
Joined: Wed Jan 30, 2008 10:25 pm

Re: Compatible Hardware

Postby ferrer » Mon Jun 23, 2014 2:25 pm

gloomyandy wrote:There are two git repos for leJOS. You need the sdcard repo
https://sourceforge.net/p/lejos/ev3sdca ... ard.config
if you want to build the kernel, you will also need the appropriate cross compiler tools. You can find details of the tools you need here:
https://github.com/mindboards/ev3sources

Good luck, make sure you tell us and show us how you get on...


I have experimented a bit, and so far it has not gone well at all.

I obtained the kernel sources from git://github.com/mindboards/ev3sources.git. I set them up on a Linux machine. I replaced the LEGOBoard.config file with the one from https://sourceforge.net/p/lejos/ev3sdca ... ard.config. I then added the following modules to LegoBOARD.config:

CONFIG_MEDIA_SUPPORT=m
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_USB_VIDEO_CLASS=m
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_CAPTURE_DRIVERS=y
CONFIG_V4L_USB_DRIVERS=y

I then recompiled the kernel in the following steps:
make lms2012
make modules
make programs
make kernel

I then copied the new uImage file onto my SD card. The SD card was previously set up with the regular Lejos stuff, which worked fine.

When I booted the EV3 using the new uImage file, the screen display degenerated into complete gibberish. I'm assuming some fonts were lost or something. I was able to shut down the EV3 by pressing the ESCAPE button, followed by the RIGHT button and the ENTER button, thus duplicating the regular shutdown keypresses.

In case the problem resulted from my kernel modifications, I generated a new uImage using the unmodified https://sourceforge.net/p/lejos/ev3sdca ... ard.config file. This produced the same result; botched fonts rendering the EV3 largely unusable.

I copied the distributed uImage back onto my SD card and the fonts come right back.

I'd appreciate any suggestions anyone has about this.

Thanks!

GJF
Gabriel J. Ferrer
Hendrix College
ferrer
Novice
 
Posts: 34
Joined: Wed Jan 30, 2008 10:25 pm

Re: Compatible Hardware

Postby skoehler » Mon Jun 23, 2014 2:27 pm

Why would you use the kernel from another repository? What was wrong with the kernel sources in the leJOS repository? The leJOS kernel has various patches, some of which change the encoding of the display data. Your results are not surprising.
skoehler
leJOS Team Member
 
Posts: 1418
Joined: Thu Oct 30, 2008 4:54 pm

Re: Compatible Hardware

Postby ferrer » Mon Jun 23, 2014 2:39 pm

skoehler wrote:Why would you use the kernel from another repository? What was wrong with the kernel sources in the leJOS repository? The leJOS kernel has various patches, some of which change the encoding of the display data. Your results are not surprising.


Okay, I see the problem now. I followed the directions from the link gloomyandy posted (https://github.com/mindboards/ev3sources) a bit too literally, as I cloned their version of the kernel rather than the leJOS version. I'll try it again using:
Code: Select all
git clone git://git.code.sf.net/p/lejos/ev3sdcard lejos-ev3sdcard
Gabriel J. Ferrer
Hendrix College
ferrer
Novice
 
Posts: 34
Joined: Wed Jan 30, 2008 10:25 pm

Re: Compatible Hardware

Postby skoehler » Mon Jun 23, 2014 2:49 pm

I think Andy only wanted to point you at the general instructions on how to build a kernel. Please use the sources from the leJOS repository. We currently don't have our own Wiki page on how to build the kernel, I think.
skoehler
leJOS Team Member
 
Posts: 1418
Joined: Thu Oct 30, 2008 4:54 pm

Re: Compatible Hardware

Postby gloomyandy » Mon Jun 23, 2014 2:51 pm

My post pointing to mindboards was about how to obtain the cross compiler tools needed to build the leJOS kernel.
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4012
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

PreviousNext

Return to EV3 Hardware

Who is online

Users browsing this forum: No registered users and 0 guests

more stuff