Skip to main content

FLL EV3 Robot

This blog post is about our current EV3 robot we're planning to use in the 2023/2024 FLL competition. Some features: 2 large motors for steering. 2 medium motors for attachments.  2 colour sensors for picking up the white and black lines, also used for line squaring. 1 gyro sensor. To enable attachments to be changed as quickly as possible we're using gravity to keep the gears connected, i.e. you don't need to fasten anything to the robot. Every attachment has 2x 12 tooth double bevel gear (part 32270) which comes in contact with the 2x 20 tooth double bevel gears (part 32269) on the robot. The medium motors are horizontally aligned on the robots, but we use 12 tooth double bevel gears to convert that to vertical alignments. These in turn are connected to 20 tooth double bevel gears, and the attachments in turn connect to these 20 tooth double bevel gears with their 12 tooth double bevel gears.  The complete robot is modelled in Bricklink Studio 2 . You can download the rob

OpenWRT Attitude Adjustment 12.09

My TP-Link MR3420 router was running OpenWRT Backfire 10.03.1 for quite some time now. OpenWRT has released a new version recently: Attitude Adjustment 12.09, so I've decided to upgrade.

When choosing an image file to download, you have 4 different choices. First of all you can choose between a factory or upgrade image, and for each one you can choose between squashfs and jffs2 - the filesystem used, either making use of a read-only squashfs with a overlay filesystem (jffs2) - i.e. overwriting read-only files, or completely jffs2. I've decided to go for the upgrade image, but in the end (and I'm only realising this now) probably chose the wrong filesystem because my router won't boot after the upgrade. The SYS LED keep blinking but no wired and wireless access. I've tried to do the factory reset but no luck.

(By the way - I recommend to use the squashfs image. One of the benefits of squashfs is that you have a failsafe option available when things go wrong - by simply ignoring the overlay filesystem and running from  squashfs only.)

So the serial port was the only way to try and revive the router. I've used the Raspberry Pi again (see previous post). In the mean time I've upgraded the Raspberry Pi to the Raspbian OS. You cannot simply kill the process responsible for the terminal over the serial port, as this will simply spawn another process. Instead you need to modify /etc/inittab and comment out the line that has ttyAMA0 in it. It's also a good idea to disable the serial port while booting - see http://www.hobbytronics.co.uk/raspberry-pi-serial-port for more information.

When booting the MR3420 I got the following messages:
U-Boot 1.1.432 MB
sector count = 64Flash:  4 MBUsing default environment
In:    serialOut:   serialErr:   serial
Net:   ag7240_enet_initialize...

And after a while the following:
Autobooting in 1 seconds
## Booting image at 9f020000 ...
OK

Starting kernel ...

OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos
Looking for OpenWrt image... found at 0xbf022000
Starting kernel at 80060000...
[    3.030000] Bridge firewalling registered
[    3.030000] 8021q: 802.1Q VLAN Support v1.8
[    3.040000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    3.050000] Freeing unused kernel memory: 212k freed
Right at the end the following happens:
[   10.900000] JFFS2 compression type 0x06 not available.
[   10.900000] Error: jffs2_decompress returned -5
[   10.910000] JFFS2 compression type 0x06 not available.
[   10.910000] Error: jffs2_decompress returned -5
[   11.100000] JFFS2 warning: (732) jffs2_do_read_inode_internal: no data nodes found for ino #9
[   11.100000] JFFS2 notice: (732) jffs2_do_read_inode_internal: but it has children so we fake some modes for it
_inode_internal: Truncaa) with[  580.530000] System halted.
So it's trying to mount the overlay partition as a JFFS2 partition, but it fails. Unfortunately it does not ignore the overlay, but simply gives up.

Luckily U-Boot provides various ways to load a new image. First of all, you need to type "tpl" to force U-Boot into a special mode. If you do it quickly enough, you'll get the following command line:
ar7240> 
So I've downloaded the factory image on my Raspberry Pi, started minicom (also see previous post), boot the router and type "tpl" to get into the U-Boot command prompt.

The first command is to erase the current flash - it will take a minute or so to execute:
ar7240>erase 0x9f020000 +0x3c0000
Then we need to upload the new image. In this case I've used to upload it via the serial port (Y-modem protocol) because it's relative straight-forward to do. Simply type:
ar7240>loady
The press Ctrl A - S and select Y-Modem, then choose the file to upload by tagging it with the spacebar, then choose Okay. Minicom will now transfer this file to U-Boot and will take a couple of minutes to complete. U-Boot will store it in RAM, but we need to copy it to the flash memory. So the next command to use is:
ar7240>cp.b 0x81000000 0x9f020000 0x3c0000
Once it's done, instruct U-Boot to reboot
ar7240>bootm 0x9f020000
If all went well you'll see the initial U-Boot messages, then all messages from OpenWRT. Phew!

I've followed more or less the same steps to do my setup - see Installing Openwrt on TP-Link MR3420. With the new release you don't need to add the "noipdefault" line to /etc/config/network - it's already set in /etc/ppp/options. Also you can now configure all the LEDs via the LuCI web interface: System - LED configuration. I've changed the 3G led to trigger on the 3g-wan netdev with trigger mode "Link On". The latest release for the usb_modeswitch already includes most 3G modems, so I didn't have to specify my custom modeswitch file.

What's interesting is that Attitude Adjustment now supports up to 150MBps wireless speeds, this was limited to 65Mbps for Backfire. And I get the impression that I've got more free space on my overlay partition. It's not even 50% now, but I remember running out of diskspace with Backfire.

So was it worth the effort? I think so at this stage, everything seems to be pretty stable and functioning, but only time will tell.

Comments

Popular posts from this blog

Installing Lego Digital Designer (LDD) on Windows 10

If you're using Windows 10 18.09 or later and try to install Lego Digital Designer (LDD) 4.3.11 you'll probably get an installation error for Adobe Flash Player. However, there is an easy way around it: Download the installation file for LDD 4.3.11. Rename the .exe file to .zip. If you don't see the .exe extension in Explorer, go to "View - Options" on the Explorer menu, then under the "View" tab deselect the "Hide extensions for known file types". Open the zip file with Windows Explorer. Copy all files in the zip to another directory on your computer. In the new folder: Delete install_flash_player_active_x.exe. Copy OpenGLChecker.exe and rename it to install_flash_player_active_x.exe. Run LDDSetup.exe. In short the installer will execute install_flash_player_active_x.exe during the installation process, but all it does now is to execute the same logic as what OpenGLChecker does. In theory you can run any .exe that will not retu

Windows Hyper-V Server 2019

This post will explain how to use the free Hyper-V Windows 2019 Server version. This version doesn't come with any GUI interface as provided in the full Windows 2019 Server version. Instead it comes with a character interface, but with the help of some third party tools you can easily get a fully functional Hyper-V server for free. The following will be assumed: You have a dedicated server connected to a network and you want to install Hyper-V 2019 on this server to run Virtual Machines and/or act as a file server. You have physical access to this server to do the installation. You have another machine connected to the same network to do remote management, running a recent version of Microsoft Windows. You don't want to join a domain or use Active Directory. You can do this if you want to, but this is not included in this post. First you'll need to download the Hyper-V 2019 ISO from  https://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2019 . You’ll

Install OpenWRT 14.09 on TP-Link MR3420 with Huawei E353 3G dongle

This post will describe how to install OpenWRT 14.09 on a TP-Link MR3420 router, plus configure it to use a Huawei E353 3G dongle to connect to the internet. First download the firmware, plus extra packages we'll need later. Store this on your computer: http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/openwrt-ar71xx-generic-tl-mr3420-v1-squashfs-factory.bin http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/kmod-mii_3.10.49-1_ar71xx.ipk http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/kmod-usb-net_3.10.49-1_ar71xx.ipk http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/kmod-usb-net-cdc-ether_3.10.49-1_ar71xx.ipk http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/kmod-usb-net-rndis_3.10.49-1_ar71xx.ipk http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/libpthread_0.9.33.2-1_ar71xx.ipk http://downloads.openwrt.org/