You are on page 1of 11

Atmel’s NGW100 (Network Gate Way)

Hello,

I have explained here the enviroment required for NGW100 to start with.

WARNING:
Don’t ever forget to setup ftp and telnet access using
environment settings before playing with the system files. Else
you probably end up with no option remain rather than loading
new kernal and uImage (jffs2) for the board which has to be
done only via JTAGICEmkII. So be aware.

For Users having Windows:

Required Hardware:

Get 1 LAN Cable with RJ45 Connector both side and it has to be straight cable.

Get 1 RS232 Cable to connect NGW100 and Your Computer.

Power adapter for powering up the NGW100.

A-type to B-type USB Cable.

Software Required:

AVR32 Tool Chain available at

www.atmel.com/dyn/products/tools_card.asp?tool_id=4102

Now assign the environment variables to NGW100

Connect all the hardware at their respective sockets.

Now power up the NGW100 board.


When it prompts press space to abort the auto boot.

Now you are in uboot environment.

It should display as given below:

uboot>

Now you have to set the environment variables for board.

Use the following command to check/display the environment variables of board.

uboot> printenv

This should look like this:

If all the mentioned variables are not being displayed when you type “printenv” in
your consol then it means that they are not seted yet. So you have to set/assign
the NGW100 these variables using “setenv variable_name argument” command.

For example:

uboot> setenv ethaddr 00:16:49:D3:19:94:F9

**IMP NOTE:

Don’t forget to save them before booting.

uboot> saveenv

Now you can check/confirm the environment settings by typing again “printenv”

Once you have seted the required environment variables for the board then save
then using “saveenv” and reset the cpu and let it boot.

uboot> reset
if it doesn’t boot using this command then please press the RESET key provided
on the board.

Once it completes the booting and loading the “jffs2” image, it’s ready to use.

It will glow the RED LED on the board when it has finished booting.

The consol will look like these after boot is completed:

You can see in your task bar that your computer’s LAN is connected/active now.

The ip address of the board is “10.0.0.1”

You can open your web browser and type 10.0.0.1 in the address bar

This will display a blue web page with for tags. This is the web page stored inside
NGW100 and now you can access to many resources/setting of the board.

If you want to access the 8 MB Flash given on the board, then follow the given
steps:

My Computer  Tools  Map Network Drive

Now it should automaticaly select z: drive (or you select it manually)

Below type \\samba\netdisk

And click “Finish”.

If you find trouble via this method then plz do as following:

My Computer  Tools  Map Network Drive

Now it should automaticaly select z: drive (or you select it manually)

Below type \\10.0.0.1\netdisk

And then click on different user name

Username: root
Password: roota

Click “OK”.

And click “Finish”.

This should work fine and the extra window for the mapped drive should pop-up.

Now the new window will prompt which is the Flash Drive of the NGW100.

You can Copy-Paste anyfile here.

The process explained till now can be understood more practically by viewing the
video given on the link below:

www.avrtv.com/2007/06/29/avrtv-special-002

www.avrtv.com/2007/07/02/avrtv-special-003

You can create your “hello.c” file and can compile it using cygwin:

This will generate “hello.o” and “hello” files

Now you can put this “hello” file on NGW100 through samba network drive.

Once you have copied the file to NGW100 do the folling to run the file.

In the console type as follows:

~ # cd media/sdcard

~ # ls –all

Note: You can see here that colour of the name of your file is GRAY. Means it is
not executable file.
~ # chmod +x hello

~ # ls –all

Note: You can see here that colour of the name of your file is GREEN. Means it
is set to executable file. You must give it permission to execute in order to run it.

~ # ./hello

After entering you will see the out put of your “hello” file.

All the required information is available at the link given below:

www.avrfreaks.net/wiki/index.php/Documentation:NGW

Probably now it’s the time for you to learn how and for what “vi” commands
works. This is very important while dealing with LINUX or UNIX.

Try www.google.com for better knowledge of “vi” commands.

Royal@PERK ~

$ ftp 10.0.0.1

Connected to 10.0.0.1.

220-Setting memory limit to 1024+1024kbytes

220-Local time is now 00:28 and the load is 0.00.

220 You will be disconnected after 1800 seconds of inactivity.

User (10.0.0.1:(none)): Royal

331 User Royal OK. Password required.

Password:

230 OK. Current directory is /home/Royal

ftp> bin

200 TYPE is now 8-bit binary


ftp> put hello

502-PORT/EPRT is disabled for security reasons.

502 Please use PASV/EPSV instead ("passive on")

425 No data connection: No such file or directory

ftp> ls

425 No data connection: No such file or directory

ftp> bye

221-Goodbye. You uploaded 0 and downloaded 0 kbytes.

221 CPU time spent on you: 0.064 seconds.

Royal@PERK ~

For debbuging FTP Communication reffer the following link:

http://www.avrfreaks.net/wiki/index.php/Documentation:AVR32_Linux_Developm
ent/FTP_demon

Once you have done this, I believe your FTP connection can be established
withought any problem.
How to mount USB SD CARD and How to detect it:

~# umount /dev/mmcblk0p1
~# modprobe atmel-mci
~# modprobe mmc_block
~# modprobe g_file_storage file=/dev/mmcblk0p1 removable=1
~# usb-mass-storage on
Now your computer will show “New Hardware Found” and it will detect the SD
card as USB Storage.

~# usb-mass-storage off

~# cd media

~# mkdir sd

~# cd

~# mount dev/mmcblk0 media/sd

Trial & Error Part: No Guaranty, No Warranty

If you want to run your application automatically after boot then go to:

/etc/init.d/

Now go to the edit mode for the “rcS” file using “vi” commands.

At the end of the file, but before “exit 0”; add a line and speciffy the path of your
executable file.

For example (in my case):

/home/xxhimanp/HelloWorld

Now save and exit.. and now reboot..

At the end you will see the output according to your code file.

WARNING:
Don’t ever forget to setup ftp and telnet access using
environment settings before playing with the system files. Else
you probably end up with no option remain rather than loading
new kernal and uImage (jffs2) for the board which has to be
done only via JTAGICEmkII. So be aware.

USB device has been detected automatically upon complition of booting process.

For this I had to add a line in the end of “rsC” file under “/etc/init.d” and this
command is used to probe the usb device.

“CONGO..!!”
Command Set
[ flash_info mknod smbclient
[[ flash_lock mkswap smbd
addgroup flash_otp_dump mktemp smbpasswd
adduser flash_otp_info modprobe smbstatus
arping flash_unlock more smbtar
ash flashcp mount sntp
automount.sh fold mtd_debug sort
awk free mv stat
basename fsck nanddump strings
bunzip2 ftl_check nandwrite su
busybox ftl_format netstat sum
bzcat ftpd nftl_format sumtool
cal gawk nftldump swapoff
cat gawk-3.1.5 nice swapon
chgrp getopt nmbd swat
chmod getty nmblookup sync
chown grep nohup sysctl
chroot gunzip nslookup syslogd
chvt gzip ntp-keygen tail
cksum halt ntp-wait tar
clear haserl ntpd tdbbackup
cmp head ntpdate tdbdump
cp hexdump ntpdc tdbtool
crond hostname ntpq tee
crontab httpd ntptime telnet
cut id ntptrace telnetd
date ifconfig openvt test
dbclient ifdown passwd tickadj
dd ifup patch time
deallocvt igawk pdbedit top
delgroup inetd pgawk touch
deluser init pgawk-3.1.5 tr
df insmod pidof true
diff install ping tty
dirname ip pivot_root udhcpc
dmesg iptables poweroff umount
dnsmasq iptables-restore printenv uname
doc_loadbios iptables-save ps uniq
docfdisk jffs2dump pwd unix2dos
dos2unix kill readlink unzip
dropbear killall reboot uptime
dropbearconvert klogd renice usb-mass-storage
dropbearkey last reset usleep
du ldconfig rfddump vi
echo ldd rfdformat watch
egrep less rm wc
eject ln rmdir webif-page
env logger rmmod wget
expr login route which
false ls run-parts who
fdisk lsmod rx whoami
fgrep md5sum sed winbindd
find mdev setconsole xargs
findsmb mkdir setsid yes
flash_erase mkfs.jffs sh zcat
flash_eraseall mkfs.jffs2 sleep