Welcome to the seventh instalment of Dive Into JeeNodes. Hello RPi, meet the JeeLink!
With all the RPi setup out of the way, it’s time to hook it up to the hardware. Fortunately, most of the essential ingredients are already included in the RPi. The JeeLink is based on an FTDI chip, for which the driver will be auto-loaded by Linux when it’s plugged in.
Proceed as follows:
- Plug the JeeLink in one of the two USB ports on the RPi.
- Type the following command in Linux:
dmesg | tail -20
You’ll get something like this:
This is the kernel log, reporting that it has recognised the inserted USB device, has loaded a kernel driver for it, and has created a new serial “device” in Linux, called “/dev/ttyUSB0”.
There are many ways to communicate with the JeeLink. Here’s a quick check that it works:
- Enter the command:
stty 57600 raw -echo </dev/ttyUSB0
- Then enter the command:
This sets up the serial ports and shows what is coming in. This is what I get:
Yippie! The JeeLink has restarted and shown its usual greeting, and is reporting incoming packets. You can hit
CTRL+c to stop the process.
The above commands are sufficient to prove that things work, but not convenient. For that, we need to install a serial terminal emulator. There are two we can use, minicom or screen:
- For minicom, install it with this command:
sudo apt-get install minicom
- To launch minicom, type:
minicom -b 57600 -o -D /dev/ttyUSB0
- For a help page in minicom, type:
- To exit and close the connection in minicom, type:
I tend to prefer screen, mostly because I’m used to it:
- For screen, install it with this command:
sudo apt-get install screen
- To launch screen, type:
screen /dev/ttyUSB0 57600
- For a help page in screen, type:
- To exit and close the connection in screen, type:
At this point, all the hardware, all the connections, and all the wireless communication are now known to work. All that remains, is to set up the HouseMon server on the RPi and to connect the light sensor.
(This series of posts is also available from the Dive Into JeeNodes page on the Café wiki.)
PS. There may be a potential issue with the FTDI driver on RPi. Will need to test this later.