AWS-X GSM weather station daemon
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


- Python (tested with v2.6)
- MySQL interface for python (python-mysqldb on debian, MySQL-python on Fedora/Red Hat) 

1) Setup a database and proper privileges for it (awsxd needs INSERT-rights)
2) Initialize the awsx table using the supplied scheme (table_layout.sql).
	mysql -u YOUR_USER -p YOUR_PASSWORD YOUR_DATABASE < table_layout.sql

3) Edit the awsxd config (awsxd.conf) to reflect your database settings. There is an
example config file included called awsxd.conf.sample.

4) Start the AWS-X deamon -h <listen_ip> -p <listen_port>

5) Configure your AWS-X weather station to transmit packets to your host. Check
the manual for details:
The TCS OS (which runs on the AWS-X motherboard) also lists a few commands:

All configuration is carried out through SMS to your device. Short summary:

    Configure APN:
    This will configure the APN (Access Point Name) which is an operator-specific
    setting. Contact your mobile operator for details.

    Example: (set APN to

    Configure packet destination:
    It's important that you zeropad your IP, so it's always xxx.yyy.zzz.vvv, for
    example should be

    Example: #PWD123456#UIP083.168.059.029:9999# (transmit to

    Configure sample interval:
    #PWD<6-digit-password>#DSI<1-60 minutes>
    Example: #PWD123456#DSI10	(sample every 10 minutes)

    Configure transmission interval:
    #PWD<6-digit-password>#LGG<1-60 minutes>#
    This should always be equal or bigger than the sample interval
    Example: #PWD123456#LGG10	(transmit every 10 minutes)

    Configure windspeed measurement unit:
    Where <unit> is a number 0-3; 0=Km/h, 1=Mph, 2=Knots, 3=m/s
    Example: #PWD123456#SWU3#

6) (Optional) It is also possible to specify a callback file which is executed
each time new data arrives on the socket. This is useful if you want to generate
output from the data without polling the database on a regular basis. 
The application is called with the relevant station name as its command line 
argument, so you can choose to only update content for that station.

Example: -c
echo "Station $* just sent us new data .. "

7) (Optional) If you want to chain all received packets to another host, you may
enable the awsxd packet replication support. When enabled, awsxd will replicate
all valid (verified) packets, package it into a new UDP packet and send it to a
host of your choice. Invalid packets will be discarded.

This feature is useful because the AWS-X station itself only supports
transmission to a single host. If multiple systems contend for the sensor data,
the only way to share is by opening up your MySQL database. This is not
recommended as clients must rely on polling to detect new samples. It is also
not recommended to expose your MySQL instance to the public network.

Instead it is recommended to run multiple instances of awsxd, possibly on
different machines and networks, which each maintain a database of samples. This
is possible using the packet replication feature.

As packet replication also functions locally on a single machine, it may be used
to logically separate two systems and feed them individually. This is useful if
you want to run both your prototype and production environment with live data.

Example: -r