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
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:
And after a while the following:
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:
The first command is to erase the current flash - it will take a minute or so to execute:
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.
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...
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 +0x3c0000Then 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>loadyThe 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 0x3c0000Once it's done, instruct U-Boot to reboot
ar7240>bootm 0x9f020000If 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