NGW100 Software

NGW100 software.


Updating the kernel requires an AVR32 tool chain.


I found some magic atmel builder scripts which will happily download all the various components and compile them to finally produce a JFFS2 image suitable for flashing the NGW100 with.

This takes a long time to download (about 200 MB of compressed source) and even longer to compile.

The next step is to write a program to talk to the I2C bus. The linux kernel docs have a guide for this that looks pretty reasonable. Assuming I can wrestle the tool chain into shape.

The DS2482 should be on the same I2C bus as the ATtiny-8 on the NGW100 board, at address 0x30 assuming I haven't stuffed up the board.

Sample software is here. This talks to the DS2482 via the I2C bus, searches for 1-wire devices and asks each of them what their temperature is.

You'll need to modprobe i2c-dev and i2c-gpio to have this work.

There were a few learnings from writing the software.

1. The triplet command on the DS2482 still need a search command sent first. This burned an hour.

2. The DS2482 going into some strange modes when you're adding 1-wire devices. At one point I briefly shorted a 1-wire signal to ground. The DS2482 nicely told me about it by setting the SD bit in the status register. But then it basically disconnect itself from all buses, but pretended it was still connected. So I could happily send search command et al without error, but there was nothing out there. Very strange. It needed a power cycle to bring it back into normal operation.

3. The linux kernel I2C drivers are nice! :)

I now got a simple script running every minute and putting the results into rrdtool.

Example output:


The Wavy area in the green line is where the air-conditioning was oscillating between it's set points.