Flashing RT5350F Evaluation board from Olimex – Internet Of Things

Today I sucessfully flashed the RT5350F board. But my own openwrt build seems to be having some issue so I flashed back the prebuilt image supplied by Olimex in their Github . I am going to show you how flash the prebuilt image via TFTP.

TFTP an acronym for Trivial File Transfer protocol. It is a Server-Client based protocol which operates on top of UDP layer. It is widely used in Embedded Linux particularly U-boot for flashing firmware to the flash. For more more information refer to this wiki.

Below is the network setup I used for this purpose


TFTP Server:

I used my laptop running Lubuntu as TFTP Server  and  you need to install tftp server for setting up your own TFTP Server

# Install TFTP Server
sudo apt-get install atftpd 

#Install TFTP Client for testing
sudo apt-get install atftp

After installing the TFTP server you need to enable the server like this.

sudo update-rc.d atftpd enable

The TFTP Server will share its files from a directory specified in a configuration file. In case of Lubuntu the configuration file is /etc/default/atftpd.

OPTIONS="--tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr --mcast-ttl 1 --maxthread 100 --verbose=5 /srv/tftp"

Test your TFTP Server

You have installed the TFTP Server and Client. You also know the TFTP directory from the configuration file.

Now download the prebuilt binary file from Olimex Github and place it in the TFTP diretory.

wget https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/RT5350F/Prebuilt%20images/openwrt-ramips-rt305x-olinuxino-rt5350f-squashfs-sysupgrade.bin
mv openwrt-ramips-rt305x-olinuxino-rt5350f-squashfs-sysupgrade.bin  /srv/tftp/openwrt.bin

Now download the file using the TFTP Client and verify the md5sum

cd /tmp
tftp> connect localhost
tftp> get openwrt.bin
tftp> quit

$md5sum /tmp/openwrt.bin
ed5809f860610f3e452c27bf45fbc44f  /tmp/openwrt.bin

$md5sum /srv/tftp/openwrt.bin
ed5809f860610f3e452c27bf45fbc44f  /srv/tftp/openwrt.bin

If everything is working fine in the above steps then we are ready to flash the image to the board.
You need to get the serial terminal of the RT5350F board ready, in case if you do not know this then refer to
my getting started with rt535F post.

Open the serial console and be ready to type ’2′. Power the board and fire the number ’2′.
You should be prompted with a warning about flashing of the firmware with Y/N prompt.

Its a bit quick and tricky. You should not be too late to type ’2′ or type it too many times.
Otherwise the bootloader will not enter the flashing mode. But it will surely work if your timing is good :).

Check the IP address of your laptop and keep it ready beforehand and also get a free IP address for the board. I booted  the board normally using previous firmware and router assigned an IP  which I used for this purpose.

Once it enters the flashing mode, it will prompt for the device IP and then for server IP and then for the firmware file that needs to be downloaded and flashed. If everything is fine then it will flash like shown below. You may notice some errors during the download this is because of the fact that TFTP uses a unreliable UDP connection where packets can get lost. This is no worries as long as there errors are less. If there are too many error then your network is congested.

I will post about openwrt and python on my upcoming posts

The images used in the networ setup are taken from the below links



Building OpenWRT with python for RT5350F evaluation board – Internet Of Things

Its been some weeks since I got my hands on the RT5350F board from Olimex. I started building the openwrt for the board and it throwed some error and then put it to the shelf, then I started again this time and resolved the issues to build the image. In addition to that I also included python to the image.

I followed this link https://www.olimex.com/wiki/RT5350F-OLinuXino#Building_OpenWRT to build the openwrt.

mkdir openwrt
cd openwrt
git clone https://github.com/OLIMEX/openwrt -b rt5350f
cd openwrt

This should normally fetch you the freshly built opewrt image for the RT5350F board.
But due to some error it was not. So I used this command to know what error it was.

make  V=s

This gave me the information that it was unable to download a version openssl package from the link
ftp://ftp.sunet.se/pub/security/tools/net/openssl/source/ .

Then I decided to download the package manually from another source.

cd dl
wget ftp://ftp.openssl.org/source/openssl-1.0.2a.tar.gz
cd ..
make  V=s

I was trying to add python to the image, but in the menuconfig there was no option to select python. After some
googling I found the solution to add python to the openwrt image.

$scripts/feeds update
$scripts/feeds install python
$make menuconfig # Select python

Everything well smooth and I got the image at this location


The image I built is 8.6 MB but the flash size is 8MB So I need to prune the image to fit.
I will explain about flashing and other means of booting the board in my next blogs.

Getting started with ESP8266 – NodeMCU

ESP8266 is a Wifi  enabled microcontroller on the boom. The  rise of Internet of things and the launch of this chip has taken over many  other wifi modules which are quiet expensive. There are quiet a number of choice of selecting your esp8266 board. I got a couple of them manufactured by Olimex. I just ‘t started working on this chip, sure there will be more post about this one. At the moment I was able to flash  nocemcu lua intertpreter to the chip.

For flashing this chip I used 1. Sparkfun FTDI Basic breakout, wires,Breadboard and ESP8266 module. I connected them like shown below.




Which looks like this :)

ESP8266 Breadboard wiring



I downloaded a nocemcu firmware from here and  flashed it to the controller.