Web connectivity for Aiko gateway.

3 views
Skip to first unread message

Luke Weston

unread,
Jan 15, 2010, 1:44:05 PM1/15/10
to Aiko distributed platform
Hi everyone.

I have finally gotten around to trying to configure the Asus router so
that it's bridged across to the LAN at home via the wireless network.
(Hint: It really doesn't seem to like WPA2 (psk2), so try changing the
wireless crypto to WPA (psk)). Now, I have done this seemingly
successfully - I can SSH into the router from the other computers on
the network, and from within the router I can ping google, meaning
that the router has got internet connectivity. So far so good.

I have grabbed Andy's Aiko code off GitHub again, to ensure everything
is up to date, and I've reprogrammed the Arduino, changing the node
name within the Arduino code to something more unique. I have set the
node name string on Smart Energy Groups so that it matches the one
programmed into the arduino.

I have edited the /etc/ser2net.conf and changed the default serial
baud rate. I can cat /dev/tts/0 in the router and watch the sensor
data expressions come in on the serial port from the microcontroller.

So, basically, it seems like everything should be in place - but I
can't seem to get it to show up as online on the SEG website. Any
ideas as to what I'm missing?

Thanks :)

Sam Sabey

unread,
Jan 15, 2010, 4:12:31 PM1/15/10
to aiko-p...@googlegroups.com
Hey Luke

I just grepped through the logs, and found a single api hit for your
node! Yippee!

It seems your site token needs an update for the Aiko Gateway. Edit
your site, and you will see this, which needs to get into the Aiko
Config file. You will see in SEG a "discover gateway" button that in
the future will do this tango for you.

Also, have you done a ps to make sure that the Aiko Gateway file is
running? I found that the latest head revision on git had a few
problems auto booting related to some lua links missing and also
something quite peculiar getting the local host name ASUS_ROUTER,
which worked when I set it to localhost.

Let me know how you get on with these mods, soon you should be online!

> --
> You received this message because you are subscribed to the Google
> Groups "Aiko distributed platform" group.
> To post to this group, send email to aiko-p...@googlegroups.com.
> To unsubscribe from this group, send email to aiko-platfor...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/aiko-platform?hl=en
> .
>
>

Sam Sabey

unread,
Jan 15, 2010, 4:14:47 PM1/15/10
to aiko-p...@googlegroups.com
Another way, possibly easier to find all your keys, tokens, node names
etc is to go here:

https://smartenergygroups.com/my_things/show_keys

Sam.

On 16/01/2010, at 5:44 AM, Luke Weston wrote:

Luke Weston

unread,
Jan 15, 2010, 10:36:56 PM1/15/10
to aiko-p...@googlegroups.com
The "discover gateway" button seems to fail in my case, it just sits there working (with the spinning ring busy icon) indefinitely without finishing.

I could manually copy that token from the site and plug it into the gateway I suppose... but I don't understand exactly where it has to go in the router.

When I do ps, what exactly should I be looking for?

Sam Sabey

unread,
Jan 16, 2010, 12:43:38 AM1/16/10
to aiko-p...@googlegroups.com
Hey Luke,

The "Discover" will work when the gateway supports it, in due course.

In the meantime, in the WRT in the home of the root user, you will
find either one or two files. Not sure what your box has, I think
there is just one file called aiko_gateway.lua

Edit this file, and look for a variable called site_token

This will equal some string, change this to your site token, save and
exit.

Reboot your router and the joy should be available.

Sam.

Reply all
Reply to author
Forward
0 new messages