Ubuntu VPN

I’ve previously used a home router as a VPN gateway to my corporate network at AESTE. However, I’ve recently noticed that Ubuntu comes with its own PPTP client and I could use this instead while leaving the home router for devices that are not capable of connecting directly, such as a consumer NAS device at home.

I didn’t realise it but configuring it on Ubuntu was a snap. Just use the network manager and set the following settings:

VPN:
Connection Name: Any VPN
Gateway: ip of the PPTP server
User Name: CHAP username
Password: CHAP password

Advance:
Use Point-to-point encryption (MPPE): checked

IPV4 Settings:
Method: Automatic VPN

Routes:
Use this connection only for resources on its network: checked

Add in any necessary routes to reach your private network.

HylaFax on Debian Squeeze

The installation of hylafax on Debian Squeeze went like a charm. I just had to plug the UM3100 modem into the usb port and follow the instructions on the official Debian wiki.

# apt-get install hylafax-server
# faxsetup

The only tricky part was with handling fax attachments. While there are problems getting PDF attachments to work, postscript attachments worked right out of the box as it is pure text.

It seems that ‘metamail’ is required to get PDF to work but this package has since been abandoned in Debian.

Since I do not expect to be getting volumes of faxes, I decided not to waste too much time in getting PDF to work. I am happy enough with just getting PS attachments instead.

If someone else manages to get PDF fax attachments to work on Debian (post etch), please feel free to add to the comments below.

Unifi Speed Test

I had Unifi installed at home today. The whole process was rather cumbersome but the contractors managed to get things done in about 2-hours or so. Instead of drilling holes in the wall, I had them thread the fibre through the ceiling into my server rack. This cost me RM200 extra.

After that, the contractor showed me the speedtest results with OOKLA.

I had ordered the VIP5 package, which comes with a 5Mbps line. Seeing that OOKLA reported a 4.8Mbps speed was quite a good sign. However, instead of just trusting OOKLA, I decided to do a little test of my own. I ran my own iperf tests against my servers in the UK, US and Germany.

The results are a mixed bag but generally, it averages above 3Mbps.

I won’t really complain much at the moment until I complete testing it further. One thing that I’m not quite happy with though, is the need to use the supplied DIR-615 router. I will need to investigate the possibility of using my own router further.

PS: I noticed that the results depend on the network that I get to connect to. This is another result that I obtained later in the night. Look at the speeds and ping latency!

UM3100 Linux Modem

The Aztech UM3100 USB modem is the easiest USB modem that I’ve gotten to work with Linux. It worked amazingly straight out of the box with Ubuntu 10.04 LTS. I am going to try it with Debian Squeeze this weekend but I’m assuming that it’ll work just as well too.


Nov 3 21:35:24 1810TZ kernel: [15232.924056] usb 4-2: new full speed USB device using uhci_hcd and address 3
Nov 3 21:35:27 1810TZ kernel: [15235.530776] usb 4-2: configuration #1 chosen from 2 choices
Nov 3 21:35:27 1810TZ kernel: [15235.533700] cdc_acm 4-2:1.0: ttyACM0: USB ACM device

I tried making a call and receiving a call from the modem using AT commands and they work. So, I’m guessing that it’ll work okay for fax operations, which is the reason why I bought the modem to begin with.

I’m going to set up hylafax at the office this weekend because, for some reason, everyone still expects you to have a fax machine in this day and age. I plan to just hook the modem to my print server and set it up as a soft fax – receiving faxes as email and sending faxes as a print job.

Hope it all works.

FreeRTOS Paradigm

I’ve just completed a 4-day training course on embedded systems development using FreeRTOS. I had a few days to prepare the training material for it and through the course of the training, I learned the virtues of writing on an RTOS platform.

Some of my trainees were from the ‘old skool’ of embedded development and are used to the traditional paradigm of using a state machine loop with a bunch of interrupt service routines to make things work.

That’s all fine and dandy except that once you discover the power of coding on an RTOS platform, it blows your mind. And to thoroughly exploit the power of an RTOS, you need to do a paradigm shift and move up one level of abstraction in application design.

A typical embedded developer would be in control of everything in a chip, which puts all the responsibility and power in the hands of the developer. Every little thing needed to be taken care of in order to avoid problems.

But with an RTOS, one moves up the ladder and thinks merely in terms of tasks, priorities and synchronisation. That’s it! (Blows your mind)

As part of AESTE’s platform development, I had FreeRTOS ported to our AEMB platform. However, I still had never actually done any RTOS platform development before this. Through the course of developing the training material, I was forced to jump in head-first into FreeRTOS.

It was an educational experience and I now understand the guts of FreeRTOS inside out. As a result, I can appreciate all the complexity that went into and and have now learned why it is a useful tool to have in our arsenal. We will continue to devote more resources to developing it into a full fledged product.

I will try to set things down in a structured way and write a tutorial into getting a basic FreeRTOS application working in 5-minutes.