Raspberry Pi and OpenBTS

Great little article: “How to shrink a 30ft base-station into a three-inch Raspberry Pi” here:

http://www.youtube.com/watch?v=GCcKgrzbix4
http://uktispecialist.com/our-experience/how-to-shrink-a-base-station-into-a-raspberry-pi

Not quite sure a Raspberry Pi can be used to shrink a 30ft base-station without the additional costs of a duplexer and some power amplification! Also I have concerns that the Pi doesn’t have enough physical RAM. But hats off – it shows the art of the possible.

From my own experiences and like the folks at PA Consulting Group say “Overcoming some seriously complex obstacles along the way, we successfully managed to route voice and SMS traffic through the computer”. For me the biggest obstacle to date on Centos 5 / RHEL 5 has been sorting out all the package version dependencies.

For my project I’m planning to use a Fairwaves (http://fairwaves.ru/) UmTRX (http://code.google.com/p/umtrx/) as the GSM transceiver rather than an Ettus USRP (http://www.ettus.com/). This will give me a bit more flexibility to use the same hardware for other projects in the future.

Image

Also rather than having my own screened-room facility my research suggests that an old Microwave oven with some copper mesh should make a cheaper Faraday cage (although the UmTRXv2 is pretty low-power at 50-100mW anyway)!

More soon.

http://www.pasta-recipes.com

Share

Driving some relays from a Genesys routing strategy!

Firstly a very Merry Christmas and best wishes for a successful 2013. I’ve not written many blog posts in 2012 – just been too busy and plan to rectify that in 2013. Anyway, a little fun project to keep the brain cells working over the festive period …

For this project you need a Raspberry Pi (http://www.raspberrypi.org/) The Raspberry Pi allows peripherals and expansion boards to access the CPU by exposing the inputs and outputs. The Raspberry Pi board has a 26-pin expansion header, marked as P1, arranged in a 2×13 strip. Amongst other things this provides 8 GPIO pins.

We need to build a circuit to drive the relay from one of the Raspberry Pi General Purpose Input/Output (GPIO) pins (http://elinux.org/RPi_Low-level_peripherals) as shown below:

Image

The parts required are:

2N3904 transistor
6V 10A PCB Relay
1N4004S diode
1K2 Metal Film 0.6W Resistor

This circuit is needed as the Pi’s GPIO pins are 3.3V and the maximum current is 16mA which is not enough to drive a 5v relay directly but is enough to switch a transistor on and off. Essentially, to activate the relay, all the circuit does is send a few milliamps at 3.3V from the GPIO pin, through a 1K resistor. This current is enough to saturate the transistor, causing current to flow on the 5V rail through the transistor, and therefore also through the relay’s coil.

The relay circuit wired to GPIO 17 via the 26-pin expansion header:

Image

To control the GPIO pins we install Apache and PHP5 on the Pi and use a PHP library from here: http://www.huubknops.com/rpi-gpio. The following Linux commands do most of the work:

sudo apt-get update
sudo apt-get install apache2
sudo apt-get install php5 php-xml-serializer php5-gd

cd /var/www
sudo wget http://www.huubknops.com/rpi-gpio/gpio.tar.gz
sudo tar zxvf gpio.tar.gz
sudo bash -c “echo www-data ALL=\(ALL\) NOPASSWD: ALL >> /etc/sudoers”

All we need to do now is to call the relevant PHP scripts from Web Service blocks within a Genesys IRD based routing strategy:

http://xxx.xxx.xxx.xxx/gpio/rpi_init.php
http://xxx.xxx.xxx.xxx/gpio/rpi_flip.php?number=17

Image

Image

I can’t think of many real world applications at the moment. If you can then please drop me an email. For now I am using it to turn on a blue flashing light!

Image

Look out for some more posts soon – details of CLiDE (Craig’s Little Development Environment) including SBC, core IN, Voxeo, Sangoma and Genesys integration as well as my own GSM mobile test network using OpenBTS (http://en.wikipedia.org/wiki/OpenBTS) as the base transceiver station (BTS)!

Share