mindboards / ev3sources Goto Github PK
View Code? Open in Web Editor NEWLEGO MINDSTORMS EV3 source code
Home Page: http://botbench.com/blog/2013/07/31/lego-mindstorms-ev3-source-code-available/
LEGO MINDSTORMS EV3 source code
Home Page: http://botbench.com/blog/2013/07/31/lego-mindstorms-ev3-source-code-available/
Hi,
I’ll use this issue to track the progress of compiling the latest official firmware (1.09H) using the old toolset. It looks like the latest firmwares still use the same kernel & u-boot, but with some patches applied to the kernel (just guessing). I’ll include the support for Edimax EW-7811Un V2 as soon as I’ll compile the whole firmware. Successfully built for 1.04/1.05 as a separate module, but will embed it to make it plug&play by flashing the new firmware.
Kernel:
drivers/net/wireless/b43/main.c:3752: error: 'struct ieee80211_key_conf' has no member named 'alg'
drivers/net/wireless/b43/main.c:3753: error: 'ALG_WEP' undeclared (first use in this function)
drivers/net/wireless/b43/main.c:3753: error: (Each undeclared identifier is reported only once
drivers/net/wireless/b43/main.c:3753: error: for each function it appears in.)
drivers/net/wireless/b43/main.c:3759: error: 'ALG_TKIP' undeclared (first use in this function)
drivers/net/wireless/b43/main.c:3762: error: 'ALG_CCMP' undeclared (first use in this function)
drivers/net/wireless/b43/main.c:4399: error: dereferencing pointer to incomplete type
drivers/net/wireless/b43/main.c:4400: error: dereferencing pointer to incomplete type
drivers/net/wireless/b43/main.c:4401: error: dereferencing pointer to incomplete type
drivers/net/wireless/b43/main.c:4402: error: dereferencing pointer to incomplete type
drivers/net/wireless/b43/main.c:4403: error: dereferencing pointer to incomplete type
drivers/net/wireless/b43/main.c:4410: error: dereferencing pointer to incomplete type
drivers/net/wireless/b43/main.c:4414: error: dereferencing pointer to incomplete type
drivers/net/wireless/b43/main.c:4415: error: dereferencing pointer to incomplete type
drivers/net/wireless/b43/main.c:4416: error: dereferencing pointer to incomplete type
drivers/net/wireless/b43/main.c:4436: error: dereferencing pointer to incomplete type
drivers/net/wireless/b43/main.c:4441: error: dereferencing pointer to incomplete type
drivers/net/wireless/b43/main.c:4582: error: unknown field 'get_tx_stats' specified in initializer
drivers/net/wireless/b43/main.c:4906: error: 'IEEE80211_HW_NOISE_DBM' undeclared (first use in this function)
net/mac80211/driver-ops.h:42: error: dereferencing pointer to incomplete type
net/mac80211/driver-ops.h:42: error: dereferencing pointer to incomplete type
net/mac80211/driver-ops.h:50: error: dereferencing pointer to incomplete type
net/mac80211/driver-ops.h:50: error: dereferencing pointer to incomplete type
net/mac80211/driver-ops.h:78: error: too many arguments to function 'local->ops->prepare_multicast'
net/mac80211/driver-ops.h:125: error: too few arguments to function 'local->ops->update_tkip_key'
net/mac80211/driver-ops.h:132: error: too few arguments to function 'local->ops->hw_scan'
net/mac80211/driver-ops.h:204: error: 'const struct ieee80211_ops' has no member named 'get_tx_stats'
net/mac80211/rate.h:49: error: 'IEEE80211_TX_INTFL_RCALGO' undeclared (first use in this function)
net/mac80211/rate.h:49: error: (Each undeclared identifier is reported only once
net/mac80211/rate.h:49: error: for each function it appears in.)
net/mac80211/rate.h:80: error: too few arguments to function 'ref->ops->rate_update'
net/mac80211/main.c:261: error: implicit declaration of function 'ieee80211_stop_tx_ba_cb'
net/mac80211/main.c:267: error: implicit declaration of function 'ieee80211_start_tx_ba_cb'
Any chance we can get the source code for the newer versions of the firmware like 1.09?
I noticed that you've started encouraging people to use their own branches for personal modifications instead of the master branch. This is a great idea, but could me improved upon by encouraging the use of forks.
How forks work, is anyone can click on the Fork button at the top of the page, and it creates a copy of the repository under their own account. They can then modify things as they see fit. If they think that their changes should be pushed to the main repo, they can submit a pull request for discussion.
It seems that ath drivers were backported from a more recent kernel. As a result, there are other wifi drivers which no longer compile. Those drivers are however enabled as module in the configuration.
What could be done? Find where the ath changes come from, and fix the backport.
As most of the files are uploaded 4 -5 years ago I tried to compile the firmware from Lego's latest firmware sources from here. Unfortunately an archive named EV3os.tar.bz2 is missing in this package, which seems to cover all sources from the ev3sources/extra
folder. I assume there must have been changes to these files more recently, as some additional hardware support has been added, e.g. for the Edimax WiFi stick.
If my assumption is right: Does anyone know, where I can get the missing archive? Or is anyone able to update the files of this repository? Or are they still up to date?
Thanks in advance for any kind of support!
A week ago, I bought it and was very upset when I realized that it is not supported by original firmware. Yesterday I succesfully finished the implementation of support for this dongle. The question is: how can I reflect what I did to achieve the result?
#!/usr/bin/env pybricks-micropython
from pybricks.ev3devices import (Motor, TouchSensor, ColorSensor,
InfraredSensor, UltrasonicSensor, GyroSensor)
from pybricks.parameters import (Port, Stop, Direction, Button, Color,
SoundFile, ImageFile, Align)
from pybricks.tools import print, wait, StopWatch
import struct
left_motor = Motor(Port.B)
right_motor = Motor(Port.C)
steer_motor = Motor(Port.A)
forward = 0
left = 0
steer_motor.run_until_stalled(250)
steer_motor.reset_angle(80)
steer_motor.run_target(300,0)
def scale(val, src, dst):
"""
Scale the given value from the scale of src to the scale of dst.
val: float or int
src: tuple
dst: tuple
example: print(scale(99, (0.0, 99.0), (-1.0, +1.0)))
"""
return (float(val-src[0]) / (src[1]-src[0])) * (dst[1]-dst[0])+dst[0]
infile_path = "/dev/input/event4"
in_file = open(infile_path, "rb")
FORMAT = 'llHHI'
EVENT_SIZE = struct.calcsize(FORMAT)
event = in_file.read(EVENT_SIZE)
while event:
(tv_sec, tv_usec, ev_type, code, value) = struct.unpack(FORMAT, event)
if ev_type == 1: # A button was pressed or released.
if code == 310 and value == 0:
steer_motor.reset_angle(steer_motor.angle()-5)
if code == 311 and value == 0:
steer_motor.reset_angle(steer_motor.angle()+5)
elif ev_type == 3: # Stick was moved
if code == 0:
left = scale(value, (0,255), (40, -40))
if code == 4: # Righ stick vertical
forward = scale(value, (0,255), (100,-100))
# Set motor voltages.
left_motor.dc(forward)
right_motor.dc(forward)
# Track the steering angle
steer_motor.track_target(left)
# Finally, read another event
event = in_file.read(EVENT_SIZE)
in_file.close()
I like to download my firmware on the ev3's flash memory. I set my ev3 in updating mode and can discover them with my linux PC. How can I write the firmware to the ev3?
I've compiled the newest sources of EV3 firmware and while boot, the console (port1) says some kernel modules are missing and EV3 is shutting down.
What do you need to say me what is wrong?
I did a fresh checkout of the ev3sources repository to my Mac, and am puzzled by the state of the repository:
$ git clone [email protected]:mindboards/ev3sources.git ev3sources
$ cd ev3sources
$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: extra/linux-03.20.00.13/Documentation/IO-mapping.txt
# modified: extra/linux-03.20.00.13/include/linux/netfilter/xt_CONNMARK.h
# modified: extra/linux-03.20.00.13/include/linux/netfilter/xt_DSCP.h
# modified: extra/linux-03.20.00.13/include/linux/netfilter/xt_MARK.h
# modified: extra/linux-03.20.00.13/include/linux/netfilter/xt_RATEEST.h
# modified: extra/linux-03.20.00.13/include/linux/netfilter/xt_TCPMSS.h
# modified: extra/linux-03.20.00.13/include/linux/netfilter_ipv4/ipt_ECN.h
# modified: extra/linux-03.20.00.13/include/linux/netfilter_ipv4/ipt_TTL.h
# modified: extra/linux-03.20.00.13/include/linux/netfilter_ipv6/ip6t_HL.h
# modified: extra/linux-03.20.00.13/net/ipv4/netfilter/ipt_ECN.c
# modified: extra/linux-03.20.00.13/net/netfilter/xt_CONNMARK.c
# modified: extra/linux-03.20.00.13/net/netfilter/xt_DSCP.c
# modified: extra/linux-03.20.00.13/net/netfilter/xt_HL.c
# modified: extra/linux-03.20.00.13/net/netfilter/xt_MARK.c
# modified: extra/linux-03.20.00.13/net/netfilter/xt_RATEEST.c
# modified: extra/linux-03.20.00.13/net/netfilter/xt_TCPMSS.c
# modified: extra/linux-devkit/arm-none-linux-gnueabi/usr/libexec/xtables/libip6t_HL.so
# modified: extra/linux-devkit/arm-none-linux-gnueabi/usr/libexec/xtables/libipt_ECN.so
# modified: extra/linux-devkit/arm-none-linux-gnueabi/usr/libexec/xtables/libipt_TTL.so
# modified: extra/linux-devkit/arm-none-linux-gnueabi/usr/libexec/xtables/libxt_CONNMARK.so
# modified: extra/linux-devkit/arm-none-linux-gnueabi/usr/libexec/xtables/libxt_DSCP.so
# modified: extra/linux-devkit/arm-none-linux-gnueabi/usr/libexec/xtables/libxt_MARK.so
# modified: extra/linux-devkit/arm-none-linux-gnueabi/usr/libexec/xtables/libxt_RATEEST.so
# modified: extra/linux-devkit/arm-none-linux-gnueabi/usr/libexec/xtables/libxt_SET.so
# modified: extra/linux-devkit/arm-none-linux-gnueabi/usr/libexec/xtables/libxt_TCPMSS.so
# modified: extra/linux-devkit/arm-none-linux-gnueabi/usr/libexec/xtables/libxt_TOS.so
# modified: lms2012/lms2012/doc/html/PWMModule.html
# modified: lms2012/lmssrc/TEST/CVS/Entries
# modified: lms2012/lmssrc/TEST/CVS/Repository
# modified: lms2012/lmssrc/TEST/TEST/CVS/Entries
# modified: lms2012/lmssrc/TEST/TEST/CVS/Repository
# modified: lms2012/lmssrc/TEST/update
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git --version
git version 1.8.3.4
If I try to git checkout -- extra/linux-03.20.00.13/Documentation/IO-mapping.txt
, for example, it will leave a lowercase io-mapping.txt file in the modified state, which I cannot seem to remove.
In the default kernel config file, CONFIG_ATH_COMMON is set, but it seems that there is no support for AR9271 based devices, as CONFIG_ATH9K_HTC is not set.
Should I set it manually or is the WNA1100 supported by another driver?
Peeps,
I am on vacation at the moment and am not able to go through all these issues and pull requests. @bungeshea , could you look at them and merge them if they're good?
I tried getting these updated files (Linux kernel and U-Boot) from LEGO customer support recently. Supposedly they are working on making these available, but it is a slow process.
Originally posted by @dlech in #42 (comment)
do you get the sources , Would you mind to send me a note, when you got the sources?
I would like to enable support for the WNA1000M wifi adapter, way smaller than the WNA1100, which is based on a Realtek chip. The main problem is that the ‘rtl8192cu’ driver handling this chip was not part of the 2.6.33-rc4 kernel.
TI has an released and updated DaVinci SDK (3.22.00.02) that is based on a 3.3.0, that contains it. Can I rely on the ‘da850_omapl138_defconfig’ target to create an initial kernel config file, or is there something special to select for EV3 ? (maybe some patches too…)
I am web programmer with no knowledge in embedded system.
I quite interested in knowing network protocols of ev3 so that I can write customised program to control my robots remotely. Searching docs for two days, I can not find any docs. If you know any existing docs plz plz let me know. If there isn't, any possibility to reverse engineer it from the source tree?
In format_sdcard.sh file, when fdisk command is run(70th line of format_sdcard.sh), fdisk.cmd file is passed as argument.
In fdisk.cmd file, it seems that initial sector is configured 1(10th line of fdisk.cmd), but initial sector is not always 1(for example, default: 2048).
Perhaps you shoud modify line feed in 10th line of fdisk.cmd to configure default parameter.
I started to work with your ev3source. I'm working with an virtual Ubuntu environment and I try to compile the kernel, but unfortunately I've got an error. It seems to be an firmware library linkage within an compilling process. I'll append an picture of the build-script for the bug-research. May it's only a lack of understanding the right sequence of your scripts in the open-first-folder. I thank you for your cooperation and looking forward to your responses to this issue.
It would be great, if you could
add an user-guit how to put the kernel on an EV3.
This includes .o, .d, .cmd, doxygen doc, etc.
Hi,
I'll keep this issue to track the progress for Edimax EW-7811Un V2 and other dongles which use RTL8188EUS chipset. Brief research shows that we can add support for many new WiFi dongles and build a separate firmware which will have out-of-the-box support without hacky ways: using the separate system on microSD.
Current progress:
Made a kernel modules for 1.04/1.05 firmwares in this repo.
Will be posted after I make tests.
Is there a DLL around or should I just be adding that entire directory?
update: ah never mind I'm silly.
Given the awkwardness of cables / bluetooth / full sized dongles, it would be a very good thing to have support for more Wifi dongle types in an official build.
I have recently purchased" yet another" mini Wifi Dongle - the Editmax EW-7811Un
lsusb
on my 64-bit Debian machines gives me:
Bus 002 Device 003: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
I have downloaded the .bin from the location noted in #25
https://wiki.qut.edu.au/display/cyphy/EV3+EDIMAX+EW-7811Un
and this worked fine. It's a massive difference.
Having looked at the code changes, I think we could perhaps improve them to
I've been too lazy^H^H^H^Hbusy to delve into how to build a full .bin file as per the link, but let me offer my services to code up a solution and to test on the dongles I do have.
Where I could do with some guidance is how you would prefer to implement updates to the lms code and how to deliver any new required chipset drivers .
Please add '.DS_Store' to the .gitignore file.
This is generated by Mac OS X.
I'm proposing updating the README.md file with the following paragraph after Item No. 1. This is posted here since I haven't forked the repository and don't want to commit it before getting consensus on this.
A Linux (virtual) installation. I used Ubuntu 13.04 on VMware Workstation, but I am sure other combinations also work.
The reason for the Linux installation requirement is due to the case-sensitive filenames used by the Linux kernel source repository. Attempting to clone the source repository to a non-case sensitive file system such as Mac OSX HFS+ or Windows FAT would result in a corrupted repository.
Eclipse. I used Helios Service Release 1, but I know more recent versions will also work.
...
The build scripts found in lms2012/open_first are very fragile and have little or no error checking at any stage of the build process.
I propose we migrate them to an actual build system such as make or ant and use targets for each part that the build system is dependent on.
The buildmod scripts found in each of the lms2012/d_* folders are a good example of this as well.
See mindboards/ev3sources-xtended#2
In this version the modified code starts at line 2270, if anyone is interested.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.