Dienstag, 30. Dezember 2014

RaspberryPI Webcam on Archlinux

This blog post describes how to set up the RaspberryPI camera and use it with Motion. Motion is a motion detecting web cam software.

As prerequisite we need a prepared SD card with the latest ArchLinux system.
The installation is described on http://archlinuxarm.org/platforms/armv6/raspberry-pi (tab Installation).

Insert the SDcard into the PI and power it.
Logon to the console with user/pwd root .

btw: My favorite editor is nano.

First we set a new password

Welcome to Arch Linux ARM

     Website: http://archlinuxarm.org
       Forum: http://archlinuxarm.org/forum
         IRC: #archlinux-arm on irc.Freenode.net
[root@alarmpi ~]# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
[root@alarmpi ~]#

Now we set a meanigful hostname for the PI to identify it easily on the network ( i normally do this right after preparing the SD card on my laptop to be able to easily ssh on to).

[root@alarmpi ~]# nano /etc/hostname

Change the name "alarmpi" to something else if you like. I call mine "flypi"
save with ^O and exit nano with ^X

Enabling the RaspberryPi Camera

Enabling the RaspberryPI camera is done via the boot configuration file /boot/config.txt

[root@alarmpi ~]# nano /boot/config.txt

Add the following line at the end of the file

#enable PI camera

save with ^O and exit nano with ^X

To have the camera as video device under /dev we need to make sure the the corresponding module (bcm2835-v4l2) is loaded at boot.

For this we edit /etc/modules-load.d/raspberrypi.conf

[root@alarmpi ~]# nano /etc/modules-load.d/raspberrypi.conf

Add the following line at the end of the file


save with ^O and exit nano with ^X

Now we reboot and check if the camera is enabled.

[root@alarmpi ~]# reboot now
Connection to alarmpi closed by remote host.
Connection to alarmpi closed.


Reconnect to console again.

Welcome to Arch Linux ARM
Last login: Tue Dec 30 09:30:13 2014 from xxxxxxx
[root@flypi ~]#

Check if the camera is enabled is done by checking if /dev/videox exists.

[root@flypi ~]# ls -l /dev/vid*
crw-rw---- 1 root video 81, 0 Dec 30 09:55 /dev/video0
[root@flypi ~]#

Lucky me, it's there! ;-)

Software update

Now it's time to bring all software packages to the latest version

[root@flypi ~]# pacman -Syu

Confirm all choices with Y. ..and wait until upgrade has been finished.

We install and enable the ntp package to have the correct time.

[root@flypi ~]# pacman -S ntp
resolving dependencies...
looking for inter-conflicts...

Packages (1): ntp-4.2.8-1

Total Download Size:    1.58 MiB
Total Installed Size:   3.76 MiB

:: Proceed with installation? [Y/n] Y
[root@flypi ~]# systemctl enable ntpd
Created symlink from /etc/systemd/system/multi-user.target.wants/ntpd.service to /usr/lib/systemd/system/ntpd.service.
[root@flypi ~]# systemctl start ntpd

[root@flypi ~]#

Installation and setup of Motion

[root@flypi ~]# pacman -S motion

Confirm all choices with Y. ..and wait until installation has been finished.

Now we reboot to be sure that all the latest software is running.

[root@alarmpi ~]# reboot now
Connection to flypi closed by remote host.
Connection to flypi closed.


Reconnect to console again.

Edit configuration

Change into the Motion config directory /etc/motion and backup the original config

[root@flypi ~]# cd /etc/motion
[root@flypi motion]# cp motion.conf motion.conf.old
[root@flypi motion]# 

Edit the configuration file

[root@flypi motion]# nano motion.conf

Depending on the orientation of the camera module you need to change rotate from 0 to 180°:

rotate 180

Change the directory where images/video is saved according your needs. I like mine to be saved under /srv/http.

target_dir /srv/http

If you like you can change the http port to 80. This allows you to access the live picture with the address http://name_of_raspberrypi (as set in /etc/hostname)

webcam_port 80

Allow access via the network

webcam_localhost off

save with ^O and exit nano with ^X

Configuration options are documented on the Motion web-home under Config File Options.

Enable Motion and start it. Afterward the red LED on the camera module should light up.

[root@flypi motion]# systemctl enable motion
Created symlink from /etc/systemd/system/multi-user.target.wants/motion.service to /usr/lib/systemd/system/motion.service.
[root@flypi motion]# systemctl start motion
[root@flypi motion]# 

Now you can test it from another PC on the network by opening the following URL:


if you have not changed webcam_port in the config file you need to use


Have Fun!

Donnerstag, 18. September 2014

AP510 / AVRT5 APRS tracker - HF signal

AVRT5 APRS tracker
With the help of one of my colleagues @ QRL we measured the HF signal (144.800MHz - European APRS QRG) of the AVRT5 APRS tracker with a R&S Spectrum analyzer (3kHz-7GHz).
All measurements were made with a 6dB attenuator and 1m RG58CU between the Tracker and the Analyzer.

HF Signal - 144.800MHz

Power Measuring: 30.46dBm / 1.1Watt

At -5khz from center freq we measured a delta of 41.18dB

Harmonic frequ: The 1st harmonic at 289.7MHz has a delta of -9.13dB. That is too high for using it for a permanent digi. A filter is needed to further lower the harmonic signal.

AFSK data signal burst (my beacon of DK7XE-8) ~1sec duration

AFSK data signal - last 320ms

Dienstag, 16. September 2014

Linux - downloading a MP3 file and converting to WAV if file has changed

For our local FM-repeater DB0HHW i wrote a script that downloads the weekly DARC broadcast / "Deutschlandrundspruch" and converts it into WAV audio whenever the file has been changed. The file can be played on demand via the repeater DB0HHW (svxlink tcl routine).
The script is executed by cron every 15min.
The download from the i-net is done with wget. The -N flag forces
wget to download only if the source file on the i-net is newer than the local copy.
The conversion from MP3 to WAV (the repeater software svxlink can only play WAV) is done with lame. The - freeformat -b 16 flags allows to create bitrate of 16kbps (again a svxlink requirement).
Finally the converted audio file is moved into the svxlink audio directory.

# variable definitions
# web source of the dl-rundspruch mp3 file
# filename of the dl-rundspruch mp3 / wav file (prefix need to be the same)
# local directory where the mp3 file is downloaded to
# check-file that holds the lates status after mp3 file has changed
# svxlink audio directory and filename. place where wav-file will finally be stored

# touch the check-file to make sure it exists

# change into the local download directory and
# start download of dlrs file only if new version is available
wget -q -t 5 -nd -N $DLRS_SRC_DIR/$DLRS_MP3_FILE

# check if there was a change on the mp3 file and convert to wav with
# lame if newer file available
# check if newer version is done by comparing the output of 'ls -l <mp3-file>'
# with the output of 'ls -l <mp3-file>' stored at last update into the check-file.
if [ "$(cat $LOCALDIR/$DLRS_CHECK_FILE)" = "$(ls -l $LOCALDIR/$DLRS_MP3_FILE)" ]; then
        echo "file is the same -> no conversion" > /dev/null;
#       echo "file has changed -> start conversion"
        # store output of 'ls -l <mp3-file>' into the check-file
        # convert mp3 into wav format with lame
        lame --decode --freeformat -b 16 $LOCALDIR/$DLRS_MP3_FILE;

#copy the wav audiofile to the svxlink audio directory if newer version exists

# --- DONE ---

73' Gerald
- dk7xe -

Montag, 8. September 2014

AP510 / AVRT5 APRS tracker

The AP510 / AVRT5 APRS tracker is a tiny APRS tracker with built in GPS and bluetooth.
Transmitting power is around 1W (detailed measurement result available on ap510-avrt5-aprs-tracker-hf-signal).

The official website is http://www.y027.com/dvbbs8/dispbbs.asp?boardid=5&Id=829 (chinese) / webshop at  http://avrtt.taobao.com/ but there is an english group on Yahoo https://groups.yahoo.com/neo/groups/AP510/info
You will find the latest firmware / configuration software there as well.

For the German's: Klaus, DJ7OO hat einen Erfahrungsbericht auf seiner Homepage.

I got mine from a Taiwanese Hamradio friend while being there on a business trip in June 2014.

Some details

  • Transmission can be set to a fixed timing, smart beaconing or triggered manually via button.
  • Built in GPS.
  • Acts as a WIDE1-1 or WIDEn-n digipeater if needed.
  • Fixed position can be programmed (e.g if used as a fixed station).
  • Tracks can be stored on MicroSD card.
  • Built in Battery
  • Configuration / Charging to be done via serial connection (miniUSB connector).
  • KISS / Waipoint / UI frame output on serial (4800Bd) and Bluetooth.
  • Works perfectly with APRSdroid as BluetoothTNC (Output to be set to KISS).
  • Operating frequency can be set via configuration program.
  • Some parameters can be set via AT commends
I'm really happy with this device since it works perfectly with APRSdroid and fit's in every pocket.


  • Bluetooth connection only works after GPS lock therefore you have to wait some seconds before connecting to the device. Bluetooth pairing code is 1234.
  • miniUSB connector is a Serial Port therefore the included USB cable needs to be used for programming (charging works with every standard USB cable).
  • Help is provided via the AP510 / AVRT5 Yahoo Group.
  • Be aware that the TX power is low compared to other stations therefore not every transmission might reach a Digi/Gate when being in a busy APRS area.
  • If you have problems on connection via serial take a look at the Video on AP510 APRS tracker configure software and firmware

Serial / BT commands

According the info on http://avrtt.taobao.com/ some settings can be changed by sending AT commands.
Either you connect via the serial (USB) port with following settings 4800Bd 8N1. Or you use a bluetooth, e.g. BluetoothTerminal on Android.
Import: serial/bluetooth communication seems to work ONLY after GPS lock.

To make it work you have to follow the steps below
1) connect
2) send ^M
3) send the AT command. E.g. AT+BEEP=0
4) the device will send OK back.
5) reboot the device to have the NEW settings active.

The following commands are currently known

setting the callsign

setting frequency

switch tone on

switch tone off


Montag, 7. Juli 2014

Antenna setup for BV0TPSJ

I joined the the CTARL team on Sunday July 6th to setup the Antenna's for BV0TPSJ JOTA activity at Municipal Dongmenguomin Elementary School.

We managed to setup a 2m/70cm GP, a 3element HF beam and a end fed wire for 40m monoband.

I was damned hot at the roof at noon. Also the 3 ele HF beam did not work as expected. No resonance on any of the bands.
Therefore a readjustment of the element lengths was done in the afternoon but even then we did not manage to get it work.
The guys tried out 40m on the longwire but the conditions were far off from being perfect.

I hope the guys can manage the problem with the 3ele HF yagi during the next days.

Therefore no operation on the higher bands at the moment. As far as i have been told there will be also no operation on Monday / Tuesday.
I hope i manage to join them when they are on air. But the chance is very low at the moment (due to none working antenna / unknown operating schedule).

Setup up 2m/70cm GP

Setup of 3ele HF yagi

Hua-Wei, BX2AI testing the 3ele yagi

Readjustment of the yagi in the afternoon

The 40m station setup
The 20m long-wire for 40m band.

BM1CDD calling CQ on 40m.

Mittwoch, 2. Juli 2014

QRV in Taipei 06.07.2014-10.07.2014

I'm invited to join the local CTARL team operating BV0TPSJ from 06.07.-12.07.
The station will be located at a school in Taipei.

Current planning is to get two stations on air using the following equipment

Transceiver: Yaesu FT-897, Icom ic-746
Antenna: C4S Yagi, Longwire+ATU

Planned operation schedule (UTC)

7/6(Sun) 02:00 – 05:00 Station setup; maybe i'm allowed to operate afterwards
7/7(Mon) 01:00 – 15:00 operation
7/8(Tue) 01:00 – 15:00 operation
7/9(Wed) 01:00 – 15:00 operation
7/10(Thu) 01:00 – 04:00, 10:00 – 15:00 operation
7/11(Fri) 01:00 – 15:00 operation
7/12(Sat) 01:00 – 04:00 operation; from 05:00 onwards Station packing

I will post pictures and some more information while i'm there.

I will be there on Sunday for the station setup and try to join Mo-Thu from 12:00 UTC/each day.

73' Gerald
- BW/DK7XE -

Mittwoch, 25. Juni 2014

Operating permit for Taiwan

I just received today via BV2FP the temporary operating permit from the Taiwanese government to work on a local radio station as BW/DK7XE.

Looking forward to get on air soon.


Dienstag, 24. Juni 2014

Meeting with CTARL members

local CTARL radio club members
nice welcome present i got
Today i have met some of the taiwanese hamradio club (CTARL) members at their weekly meeting in Taipei.
It was a very nice welcome by David, BV2FP and the others.

I'm invited to give a presentation on APRS in Germany on 9th of July. As well as to an IOTA activity on Sunday, July 6th. Chances are high that you can hear me "on air" on that day.

Information for foreigners wishing to do hamradio operation in Taiwan

Important is that it is not allowed to bring own equipment.
Transmission by visitors is only allowed by approval of government via a Temporary Operating Permit.

The CTARL website is providing some further information on how to apply for an operating permission.
73' de Gerald
- BW/DK7XE -

Dienstag, 3. Juni 2014

L/2-Coaxcable Antenna for 2m

Halfewave  Coax-cable Antenna (J-Antenna) according DJ8EI and DL5PC

In CQDL 2014/06 was an article by Hans, DJ8EI/PA8EI and Helmut, DL5PC about building a L/2-Coaxialcable antenna.
Since the construction is easy to do i decided to use our last (tech)talk meeting at our local RadioClub M21 to build a version for 2m.

The design is a J-Antenna build completely with coax-cable.

So i brought 7m RG58CU, BNC crimp-connectors and one BNC T-connector in.

Target was to get the antenna resonant at 144.800MHz since main usage is for APRS.

Since there is an calculator for the dimensions vailable  i cutted the cable into pieces according the instruction and crimped the BNC connectors on. The radiator i kept a bit longer to be on the save side.

Finally a small rope was attached to the end of the radiator to be able to put the antenna on the ceiling for adjustment.

Measuring and adjusting the antenna
First measurement with our RigExpert Antenna analyzer showed a resonance at 143.900MHz.
After cutting some small pieces off the radiator we reached nearly 144.800MHz.

Resonance on 144.791MHz


The Antenna is easy to build with minimum of costs and easy to adjust.
Building up and adjustment took ~30min overall.

Further Pictures

Antenna with Cable

5m RG58 and Halfewave J-Antenna for 144.800MHz

Antenna Parts

BNC T-connector

T-Connector and stub

73' de Gerald
- dk7xe -
- oe6dld -