Testing the serial module
After completing the serial module, it’s time to test it. According to the NSLU2-Linux wiki, the serial port is configured to 115200 baud, 8 bits of data, and no parity (8N1). If you are running Windows, you can use the hyperterminal program. In Ubuntu, I use picocom, which is available in the Ubuntu repositories.
sudo apt-get install picocom
Plug the slug into your PC’s serial port. Make sure the PC has a serial port in the first place, or you will need to look somewhere else! (newer PCs might be missing the serial port). Then, run picocom with the appropriate arguements:
picocom -b 115200 /dev/ttyS0
Turn on the power to slug, and you should see the boot messages immediately.
This is maddening simple, but I got tripped by it almost every time. How do you quit from picocom, back to bash prompt? The man page said to use the escape character “C-a” and “C-q”. Turned out these are most probably CTRL+a followed by CTRL+q.
Mount serial module into the slug’s casing
I don’t want the serial module dangling on the end of a serial cable. It’s ugly and might be prone to breakage. It is neater to mount the module somewhere inside the casing. I gave this some thoughts, and decided on brute force liberal-use-of-heat-glue approach.
As you can see from the pictures, I have completely encased the module in a lump of heat glue. I used double-side tape to keep the module in place above the memory ICs. This totally inelegant work served three purposes:
- prevents the module’s circuits of from accidentally touching the slug’s main board
- glues the module’s wire in place
- elevates the module from the main board, allowing the module’s connector to sit just below a cavity which I will make on the casing (see next picture)
Final result: a sneak peek of the completed slug.
You can see a serial cable plugged into the slug’s left side. Also, note the green lighted LED which comes from a USB flashdrive mounted inside (future post).