02 Jan 2015, 17:50

Run a full Wikipedia copy from any computers

Today I’m releasing Gozim a side project written in Go.

It’s a set of tools to serve ZIM files, (compressed copy of Wiki articles), use it to run your full copy of Wikipedia off the grid.

It runs great on a small computer as the Raspberry Pi or your own laptop.

It could be a solution to give access to knowledge in countries without stable internet connections.

13 Dec 2014, 07:55

Airspy on Linux

Airspy is an SDR with amazing specs, but drivers are slowly coming to your prefered os.

This apply to Arch but should apply to any recent Linux.

I’ve first compiled libairspy but always had the error AIRSPY_ERROR_NOT_FOUND and "usbfs: interface 0 claimed by airspy while 'airspy_info' sets config #1"

Since Linux 3.17 comes with an airspy v4l autoloaded driver making impossible to use it with libusb: no airspy_info and no gqrx.

Simply get rid of it with a modprobe config like /etc/modprobe.d/airspy.conf

blacklist airspy

You need some deps: the airspy lib, gnuradio-osmosdr (gr-osmosdr) and a recent gqrx

Here are my Arch AUR pkg that will build airspy-git, gr-osmosdr-git and gqrx-git (note that you need to uninstall the packages from community to avoid conflict).

Have fun

28 Nov 2014, 20:29

FreeBSD on Google Compute Engine

First you need to create a VirtualBox FreeBSD install using a 10G qcow format, use an SCSI controller for the install as the disk will be visible as da0 inside GCE.

On FreeBSD 10.1 I had to load virtio manually, so set this in /boot/loader.conf


Copy your ssh key in your home user .ssh/authorized_keys, be sure to be in the wheel group.

On a Mac you need to install GNU tar (brew install gnu-tar), shutdown your VirtualBox vm and upload your image to GCE

`VBoxManage clonehd -format RAW ../VirtualBox\ VMs/FreeBSDGCE/BSDGCE.qcow
gtar -Szcf freebsd.tar.gz disk.raw
gsutil mb gs://bsdimage
gsutil cp freebsd.tar.gz gs://bsdimage/gce-bsd.tar.gz
gcutil addimage freebsd  gs://bsdimage/gce-bsd.tar.gz`

You should now see “freebsd” as available install image in your console

28 Jul 2014, 17:36


APRS is a tactical digital communications system used between amateurs radio, to exchange positions & messages, here I blog my experience decoding/encoding APRS with a small Arduino as it may help some of you too.

Some transceivers are incorporating this functionalities but most of them don’t, a lot of new technicians start with cheap Baofeng radios (30$) which don’t provide advanced functionnalities but here is a way to solve that.

I’ve first looked at Bertos project, a realtime os for micro controllers as Atmel 328p (Arduinos), you can see my 1st attempt there:

This was the receiver only, a simple divider, the “hard” part was to understand the Baofeng/Kenwood mic jacks.

It takes me a long time to figure out that the Baofeng was too slow to trigger the squelch, so the Arduino missed the beginning of the message, hopefully I have a Kenwood too …

So for a Baofeng using this kind of APRS decoder, you have to disable the squelsh completly, and set the volume very high it has to reach a proper signal on the arduino around -3v/+3v.

For the AFSK modulation, the Bertos project use a DAC made with 4 resistors.

Later, I’ve discovered the wonderful work of Mark Qvist MicroAPRS, mostly the same circuit as the Bertos project but with an awesome documentation of the code, it’s a pleasure to read & learn.

So I’ve started to work on a circuit using a Bluno Nano an Arduino Nano with Bluetooth Low Energy, as an iPhone developer, this piece of electronics is just incredible and gives me the capabilites to connect my circuits to iphone Apps.

It’s working but hardly a mobile solution :)

Later I’ve designed a PCB for it you can find the full Gerber files in my Github.

I’m using Frizting to design and then export to OSHPark for the PCB manufacturing, it’s far from perfect but I will improve the circuit and publish it soon !

This plus an iPhone app and you’ll rock APRS !

73 de KK6NXK

08 Jul 2014, 01:22

Got my amateur radio license KK6NXK

When I was a young child, I remember listening to an old radio receiver with my grandfather, looking for morse transmission.

30 years later, I take the opportunity to get my radio amateur license in the US, it was not difficult (Technicial license is easy), especially cause US radio amateurs are using the metric system (almost all the time …), the only difficulties were to learn some terms and simple formulas from french to english and to know some parts of regulation by heart (I have never been able to learn by heart).

A lot of people keep asking me why are you doing this? Do you want to speak to a microphone to a stranger?

First why not, it’s not the craziest thing I’ve ever done :)

Then they probably have forgotten that every single piece of technology today are using radio waves, from your 4G phone to wifi to Bluetooth, learning and understanding that is really useful.

For example Radio amateur bands overlap some of the “civil” bands, it gives some extended privileges to a radio amateur to experiment with long distance wifi transmissions.

So it’s not just about voice but data too.

Another aspect is electronic, a lot of radio amateur are sharing hardware and electronic circuits to build your own receiver/transceiver, before it was cool on the Internet.

Learning electronic to build something real is a lot more rewarding than it was at school…

Even without a license this is a brand new world to explore, receiving satellite images of the Earth is one of the many possibilities you can get entering radio world.

This is the beginning of a new knowledge branch to conquer !

See my work on an APRS bluetooth Modem

73 de KK6NXK

By the way in french it’s radio amateur and not amateur radio :)

19 Feb 2014, 05:05

FreeBSD 10 on Dedibox SC gen 2 or any remote server with a rescue shell

FreeBSD 10 is out and it’s time to replace your Linux boxes cheeky

SC gen 2 is a VIA U2250 with 2Gb memory.

Start the rescue shell in amd64 12.04 Ubuntu, connect to the box via SSH with the temporary password

sudo -s
cd /tmp
wget http://ftp1.fr.freebsd.org/pub/FreeBSD/snapshots/ISO-
apt-get update
apt-get install qemu-kvm

sudo qemu-system-x86_64 -no-kvm -hda /dev/sda -cdrom ./FreeBSD-10.0-STABLE-
amd64-20140216-r261948-disc1.iso -net nic,model=e1000 -vnc :1,yourpassword
-boot d

This install qemu and run the FreeBSD installer from the downloaded CD.

Run a VNC client on your computer and connect to your dedibox ip, you should watch FreeBSD boot from the CDROM.

Complete a normal installation, at the end it will ask if you want to run a shell **answer is YES **and then type this to reinstall the bootloader.

If you are using UFS (default)

fdisk -B -b /boot/boot0 /dev/ada0

If you are using ZFS:

gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0

Type exit and reboot to the normal mode.

Happy FreeBSD !

Further notes:

  • If you are not using ZFS, you can enable softupdate and TRIM as the SC gen 2 contains an hybrid SSD, you should theoretically have better performance
  • The last fdisk command is not the normal process but it was the only way I get it boot
  • Do not use qemu with KVM as there is a bug with this particular cpu, so yes the installation will be dead slow
  • The DHCP won’t answer it’s ok

30 Jan 2014, 17:37

FreeBSD on RaspBerry Pi

FreeBSD images for arm are now built from the FreeBSD Foundation ! So it’s an easy process to get it on your Pi.

Download your image from the ftp repository

Insert a 4Gb or more SD card in your PC and copy the FreeBSD image into it, here are the commands for a Mac:

sudo diskutil list​
sudo diskutil unmountDisk /dev/disk1​
sudo dd if=/Users/akh/Downloads/FreeBSD-10.0-STABLE-arm-
armv6-RPI-B-20140127-r261200.img  of=/dev/rdisk1 bs=1m​
sudo diskutil eject /dev/disk1​

Boot your pi with the card and welcome to FreeBSD !

If you are using the wifi dongle from Adafruit this may help:

echo legal.realtek.license_ack=1 >> /boot/loader.conf
echo wlans_urtwn0="wlan0" >> /etc/rc.conf
echo ifconfig_wlan0="wpa DHCP" >> /etc/rc.conf`

And set your wifi password with wpa_passphrase

wpa_passphrase yourssid yourwifipassword >> /etc/wpa_supplicant.conf

15 Jun 2013, 17:59

7shape my first iphone application

As an iphone developer contractor, I’ve released some applications on the Apple Store for my customers but not on my own.

Here is my 1st personal (30 hours) toy project: 7shape a 7 minutes workout training application, based on an NYT blog post.

I’ve spent 20 hours on website release, marketing, 3D for the human trainer and application design, and last 10 hours to create the app and release it to Apple …

It’s a free app and available on the Apple Store, have fun.

My next personal project will be a game, stay tuned ;)

24 Apr 2013, 18:51

Enhance your Go

After my Enhance your Python post, which is my Python bible reference, I wanted the same for Golang:

Last edit: 2014 February

19 Feb 2013, 16:53

Remove keys from a list of dicts in Python

I often have this need to remove some keys from a list of dict, like cleaning it before passing it.

Comment on Gist