Internet rabbit rebuild – step 1

Back in Christmas 2006, I was lucky enough to get everything I asked for, and one of those things was one of the first commercially available Internet of Things devices – a Nabaztag.

A picture of my Nabaztag with other Christmas presents

This was a beautifully moudled piece of plastic designed to look like a rabbit. It connected to your wifi and triggers could control its LEDs, its individually rotating ears or play sound through the speaker. I had great fun with it but, in what would be a salutary lesson, the fact that it was proprietary hardware, talking over a proprietary protocol to a proprietary server was soon a problem when not only was my model made obsolete by newer models but then the company going bust. Suddenly, I had a great-looking paperweight.

Some keen nerds reverse-engineered the protocol and wrote their own servers (like NabAlive, NabaztagLives and OpenJabNab and there are a whole host of libraries listed here), but they’re not all straightforward to set up and there isn’t as much support for the first version of the Nabaztag.

All this means that mine has been in the loft for the best part of a decade, but commodity hardware is now affordable enough, and low-effort enough (no soldering for me!) that I thought I’d try and bring my internet bunny back to life, in particular after being inspired by Roy Tanck’s attempt at doing the same thing by replacing the insides with a Raspberry Pi.

Step 1 was to take it apart. There are some triangular screws on the bottom which came out pretty easily using one end of some needle-nosed pliers and then the rest is standards phillips-head. It’s impressive to see how far electronics manufactoring has come in the last decade – the wireless in the original rabbit was provided by a full-sized PCMCIA card!

A picture of the front of the Nabaztag's main PCB

Once the case was off, I removed the electronics and motors from a central plastic frame, and my next step is going to be to prototype replacing them using a Raspberry Pi Zero W with a Blinkt attachment.

Configuring the VS Code integrated terminal to use Bash instead of cmd.exe on Windows

Visual Studio has an integrated terminal and by default on Windows this loads cmd.exe – the standard, and fairly rubbish Windows command prompt.

I normally use cmder as my default terminal on Windows –
this is basically the excellent conemu tabbed console emulator, with a few customisations.

If you try and set VS Code’s integrated terminal to the cmder executable, it will open a new terminal window, rather than be integrated, so you need to point it at the bash.exe executable instead.

After installing cmder to to C:\cmder the bash binary is in C:\cmder\vendor\git-for-windows\bin and the setting you need to add to VS Code is this:

"": "C:\\cmder\\vendor\\git-for-windows\\bin\\bash.exe"

This will now give you bash when you open the integrated terminal! On one of my computers the default prompt came out ugly, so I changed it like this:

Open the integrated terminal and type

vi ~/.bashrc

Then enter insert mode by pressing ‘i’ and pasting in this:

export PS1="\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]\n\$ "

Save the file by pressing Escape, then typing ‘wq’ and pressing Enter.

Exit the terminal by typing ‘exit’ (rather than just hiding it by using the VS Code menu or keyboard shortcut.

Re-open it and tada! a much improved integrated terminal!