This page details some tricks we find very useful. |
When you plug a mote in your Linux-based OpenLBR, it will appear as Instead, the following script scans for the connected motes and returns a list containing the list of the serial ports a mote is connected to.
After running the
|
When you start a script which attaches to the serial port your mote is attached to, chances are it will crash if you unplug your mote while the script is running. Similarly, if you start your script while the mote is not connected, chances are your script will crash and exit. The following script is a way around. The function
This means that you can start running your script regardless of whether the mote is connected to the OpenLBR or not. Similarly, you can unplug your mote and replug it later on without having to deal with restarting the script. |
You may have configured your OpenLBR to acquire it's IPv4 address through DHCP. If that is the case, chances are that the DHCP server gives it a different IPv4 address everytime the OpenLBR reboots. Since the OpenLBR does not have a screen, you don't know what IPv4 address to point your PuTTY to configure it. One solution is to have the OpenLBR load a PHP script on a remote server. That server can store the IPv4 address of the OpenLBR which contacted it, and display it on some webpage for your to see. On the remote server (in our case http://wsn.eecs.berkeley.edu/), create a folder
Make sure you can see that page, in our case http://wsn.eecs.berkeley.edu/openserver/record_openlbr_ipv4.php. Once you have visited that page once, a file On the OpenLBR, create the file
We use the Now, add the following line at the end of
This instructs Debian to execute that script right after the OpenLBR's Ethernet interface is up. So now, each time your OpenLBR boots, read it's current IPv4 address at http://wsn.eecs.berkeley.edu/openserver/. |
The OpenLBR is meant to be "forgotten" once installed. Yet, the firmware which needs to run on it may need to be updated. One elegant solution is to enable a minimal script which runs as soon as the Ethernet interface of the OpenLBR comes up, and which downloads a script from a remote server. This technique can function in a cascading effect, i.e. the downloaded script can download another script, and so on. This is the technique we choose to use in the OpenWSN project. It is described in detail in OpenLbrRunIt. |
If you happen to be outside of the IPv6 cloud, and you still want to check whether a node is alive, you can ask http://lg.he.net/, which sits on the IPv6 cloud, to ping it for you. |
We recommend
It comes with an auto-indent feature. To configure that, edit the configuration file:
Add the following lines at the beginning to instruct the auto-indent engine to use soft tabulations of 3 spaces
When you edit some code, hit |
In an Administrator command window:
|
You can connect remotely to an OpenLBR or your OpenServer using PuTTY in Windows. Normally, you would specify a username in
Instead, you should use public key authentication:
|
The double flag Whenever the interface is up, the script is running. When logging on to the OpenLBR, use the flag
Then, reconnect to that session using the
To "detach" from a screen session (i.e. leave without terminating it), type |
For some reason, it happens sometimes that the
|
|
From a terminal cd to the desired directory then do the following:
|
|
|
|
Install Xcode from Mac OS X install DVD. This adds developer support applications. You must check Install pyserial from http://pyserial.sourceforge.net/ Install virtual com port driver from http://www.ftdichip.com/Drivers/VCP.htm for MAC OSX. A Crossbow TelosB mote shows up as something like |
|