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 router connected to two networks

This post will explain how to set up your OpenWRT router to connect to two networks and configure it to route the traffic to the correct network. In this case we will connect both to a corporate network (i.e. enabling you to access the corporate network) and the internet (via an Internet Service Provider). Although most corporate networks allow you to access the internet they usually block specific ports (e.g. for Remote Desktop) and apply all sorts of weird and wonderful restrictions.

I'm using an old Linksys WRT54GL with OpenWRT Backfire 10.03.1. Later OpenWRT releases can't run on the WRT54GL due to limited memory, but OpenWRT 10.03.1 is capable enough of doing this type of work.

To access the corporate network I'm using the WAN port on the router (eth0.1), mapped to interface WAN.

For access to the internet I'm running Wifi in client mode (wl0), mapped to interface WWAN.

In principle it does not matter how you connect to the different networks - it could be via 3G, VPN or whatever other connection - as long as you can connect you can configure the router to route traffic to the different connections. In fact you can connect to more than two networks if you want to.

For the corporate network there's not much setup to do. OpenWRT will by default use eth0.1 for interface WAN. Make sure you get an IP address on eth0.1 either by using the web interface or typing "ifconfig" in a SSH session.

You also need to determine the scope of the corporate network you need to access. Usually corporate networks are larger than the subnet you're connected to. Ping every machine on the corporate network you'll need to access, and make note of every IP address outside of the subnet you're connected to. This includes the DNS servers.

In my case I get the following ifconfig back for eth0.1:
eth0.1    Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          inet addr:11.23.8.81  Bcast:11.23.8.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1285412 errors:0 dropped:0 overruns:0 frame:0
          TX packets:69531 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:95851366 (91.4 MiB)  TX bytes:7617381 (7.2 MiB)

This means by default I can access every IP on the 11.23.8.x subnet. But by pinging machines on the network I determined I also need access outside of this subnet:
11.9.43.x
11.11.21.x
11.12.6.x
11.12.18.x
11.12.62.x

The last three I can group into one big 11.12.x.x subnet.

To add static routes you can use the Static Routes option under the Network menu. Specify the network - in this case wan - plus the target and netmask. In my case this becomes:

    wan 11.9.43.0 netmask 255.255.255.0
    wan 11.11.21.0 netmask 255.255.255.0
    wan 11.12.0.0 netmask 255.255.0.0

Note 1: Although all the IP addresses above are on the 11.x.x.x subnet it's probably not a good idea to add the complete 11.x.x.x subnet, albeit possible. The golden rule is to only map the ranges you really need.

Note 2: With only one WAN connection you will have access to all IP addresses from your network. But once you add another WAN connection with a lower metric you'll lose the access.

To set up the internet access over Wifi you need to configure it to connect to the correct network. The web interface makes it an easy task. Simply go to Network - Wifi - Click Scan. Pick the Wifi network you want to join and click "Join Network". Choose replace wireless configuration, keep the name of the network "wwan" (Wireless WAN) and keep the firewall zone "wan". Click on Submit.

Now because we want to route all traffic on wifi (WWAN) by default and only route to the corporate network (WAN) when we need to we need to set up different metrics on the interfaces. The metric defines the sequence the router will access different interfaces. To make WWAN the default one we need to have a lower metric on WWAN as on WAN. In this case I'll assign a metric of 10 to WWAN and 20 to WAN. From the web interface Go to Network - Interfaces - WWAN - Advanced settings and set "Use gateway metric" to 10, then click on Save. Do the same for WAN but use a metric of 20. Then click on Save & Apply. When you go back to the Status screen it should now display the wifi settings under IPv4 WAN Status.

To test you setup you can first try to ping IP address on the corporate network. Then try to ping using server names instead of IP addresses - it should resolve the IP address from the corporate network's DNS server. Then try to ping any machine on the internet, e.g. www.google.com.

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/