This page contains tutorials, recipes, articles, forums, etc. related to all the Acme Systems boards.
By default each Acme board get the IP address from the DHCP server on your LAN. To define instead a static IP address replace in /media/etc/network/interfaces these lines:
allow-hotplug eth0 iface eth0 inet dhcp
allow-hotplug eth0 iface eth0 inet static address 192.168.1.90 netmask 255.255.255.0 gateway 192.168.1.1
If you need to get the IP address manually from the DHCP server on your LAN simply shut down the eth0 interface:
~# ifdown eth0 Internet Systems Consortium DHCP Client 4.1.1-P1 Copyright 2004-2010 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Listening on LPF/eth0/00:04:25:a8:9d:5e Sending on LPF/eth0/00:04:25:a8:9d:5e Sending on Socket/fallback DHCPRELEASE on eth0 to 10.55.98.1 port 67 eth0: link down
and bring it back up by typing:
~# ifup eth0 Internet Systems Consortium DHCP Client 4.1.1-P1 Copyright 2004-2010 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ ADDRCONF(NETDEV_UP): eth0: link is not ready Listening on LPF/eth0/00:04:25:a8:9d:5e Sending on LPF/eth0/00:04:25:a8:9d:5e Sending on Socket/fallback eth0: link up (100/Full) ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4 DHCPOFFER from 10.55.98.1 DHCPREQUEST on eth0 to 255.255.255.255 port 67 DHCPACK from 10.55.98.1 bound to 10.55.98.19 -- renewal in 33627 seconds.
it comes up and grabs its IP (in this case 10.55.98.19 )
Your Acme board has two clocks:
Setting the System Clock
date is the Linux command to manage the systems clock.
To read the currently System Clock type:
~# date Fri Oct 8 17:44:42 CEST 2010
To set it type:
~# date -s "8 OCT 2010 18:45:00" Fri Oct 8 18:45:00 CEST 2010
This time is active until the main power supply board is on. When off the system clock is lost.
Setting the Real Time Clock
To read the Hardware Clock type:
~# hwclock -r Fri Oct 8 17:46:43 2010 -0.004115 seconds
To set the Hardware Clock using the System Clock current time type:
~# hwclock -w
Now check it typing:
~# date Fri Oct 8 18:49:02 CEST 2010 ~# hwclock -r Fri Oct 8 18:49:10 2010 -0.004076 seconds
When you get access to the Acme board command line the prompt is something like this:
Where ariag25 is the current hostname.
If more Acme boards or other Linux systems are reacheable on your LAN it could be important to have different hostnames tfor each board to avoid for example to give commands to the wrong system.
The hostname is saved in /etc/hostname.
Change it for example with myboard by typing:
~# echo "myboard" > /etc/hostname ~# /etc/init.d/hostname.sh start
then logout typing:
and login again. The prompt will be:
The hostname is very important also when using Bonjour to get the right IP address to the Acme board in form of http://myboard.local.
This article explains how to automount an USB stick when inserted and unmount it automatically when unplugged
Install the required packages
The automounter facility is managed by autofs. Autofs controls the operation of the automount daemons. The automount daemons automatically mount filesystems when they are used and unmount them after a period of inactivity. This is done based on a set of pre-configured maps.
To install autofs type:
~# apt-get update ~# apt-get install autofs
Insert an USB stick and check on which device it appears by typing:
~# dmesg ... usb 1-2: new full speed USB device using at91_ohci and address 2 scsi0 : usb-storage 1-2:1.0 scsi 0:0:0:0: Direct-Access UDISK PDU01-8G 8AH2.0 0.00 PQ: 0 ANSI: 2 sd 0:0:0:0: [sda] 15794176 512-byte logical blocks: (8.08 GB/7.53 GiB) ... sd 8:0:0:0: [sda] Assuming drive cache: write through sda: ...
In this case the device is /dev/sda. If your USB stick has more than one partition you will see sda1, sda2, etc. for each partition.
Edit the file /etc/auto.master adding this line:
/var/autofs/removable /etc/auto.removable --timeout=2
Now create the file /etc/auto.removable with this contents:
usbstick -fstype=vfat,rw,umask=002 :/dev/sda
then restart autofs typing:
~# /etc/init.d/autofs restart
Now move to the /var/autofs/removable directory:
~# cd /var/autofs/removable /var/autofs/removable# ls /var/autofs/removable# ls usbstick [ .. list on my files on the usbstick ]
As you can see the usbstick directory will appear when requested and disappear after 2 seconds.
Change the Ethernet setting on the fly
To change the Ethernet parms on the fly type this command:
~# mii-tool [-F mode] eth0 ...
Where mode can be:
The setting will be valid until the next system reboot.
Change the Ethernet setting at the end
Edit the /etc/network/interfaces file and the bold line if you are using the dchp:
auto eth0 iface eth0 inet dhcp up mii-tool -F 10baseT-HD eth0
or this line if you are using a static IP configuration:
auto eth0 iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.1 up mii-tool -F 10baseT-HD eth0
the reboot or type:
~# ifdown eth0 ... ~# ifup eth0 ...
~# cd /sys/class/mmc_host/mmc?/mmc?:* /sys/class/mmc_host/mmc0/mmc0:aaaa# cat serial 0x015c5340
A lot of other info are available:
/sys/class/mmc_host/mmc0/mmc0:aaaa# ls -al total 0 drwxr-xr-x 4 root root 0 Jun 27 15:37 . drwxr-xr-x 4 root root 0 Jun 27 15:37 .. drwxr-xr-x 3 root root 0 Jun 27 15:37 block -r--r--r-- 1 root root 4096 Jun 28 07:18 cid -r--r--r-- 1 root root 4096 Jun 28 07:28 csd -r--r--r-- 1 root root 4096 Jun 28 07:28 date lrwxrwxrwx 1 root root 0 Jun 27 15:37 driver -> ../../../../../../bus/mmc/drk -r--r--r-- 1 root root 4096 Jun 28 07:28 erase_size -r--r--r-- 1 root root 4096 Jun 28 07:21 fwrev -r--r--r-- 1 root root 4096 Jun 28 07:21 hwrev -r--r--r-- 1 root root 4096 Jun 28 07:21 manfid -r--r--r-- 1 root root 4096 Jun 27 15:37 name -r--r--r-- 1 root root 4096 Jun 28 07:18 oemid drwxr-xr-x 2 root root 0 Jun 28 07:28 power -r--r--r-- 1 root root 4096 Jun 28 07:28 preferred_erase_size -r--r--r-- 1 root root 4096 Jun 28 07:28 scr -r--r--r-- 1 root root 4096 Jun 27 15:37 serial lrwxrwxrwx 1 root root 0 Jun 27 15:37 subsystem -> ../../../../../../bus/mmc -r--r--r-- 1 root root 4096 Jun 28 07:28 type -rw-r--r-- 1 root root 4096 Jun 27 15:37 uevent
The most part of application program log created on /var/log are created by rsyslog daemon. To disable it type:
~# cd /etc/rc2.d /etc/rc2.d# mv S01rsyslog K01rsyslog
The system message log on /var/log/dmesg is created by bootlogs daemon. To disable it type:
~# cd /etc/rc2.d /etc/rc2.d# mv S01bootlogs K01bootlogs
Comment the line:
session optional pam_lastlog.so
The Debian package installation utility apt-get keeps all the packages it has downloaded in case they are needed in the future in /var/cache/apt/archives directory.
It is possible to save space removing them by typing:
This is a selection of "Hello World !" examples in all the languages we tried on the Acme boards:
Linux Kernel 3.11 and EmDebian "7.1" Wheezy
Linux Kernel 2.6.xx and Debian "6.0" Squeeze
Atmel© Certified Partner
Acme Systems provides this documentation "as is" without warranty or guarantees of any kind. The mantainer of this site (Sergio Tanzilli), has gone to a great deal of effort into making this documentation as correct as possible. Acme Systems doesn't provide any direct support for the Open Source preinstalled software but provides, through these pages and forum posts, all the information required to obtain the sources, install, use and update the Open Source softwares runnable on the FOX Board, NetusG20, AriaG25 and Terra platforms. Please note that all the preinstalled softwares, used on the Acme Systems products, are Open Source and you will have to check the license terms provided (usually the GPL) by each author before using it in any commercial or non-commercial product, by yourself. Before sending emails or calling the Acme staff here are our contacts please note that WE ARE MAINLY HARDWARE DESIGNERS and NOT LINUX GURUS so could be better to post your questions directly to the forum listed below to be sure that all the contributors of this site and the large software developers community will read and reply to your questions.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.