Wednesday, February 16, 2011

POCSAG encoder and Arduino modem published

Last spring I wrote a bit about our POCSAG paging network project, and published a Youtube video showing a 200W POCSAG transmitter being driven by my POCSAG encoder and an Arduino-based modem.

Well, I finally got around to documenting and publishing the code a couple weeks ago, open source. The answers to the FAQs are:
  1. I've run it on Linux and Mac OS X only, but it should run on any operating system with a Perl interpreter, including Windows, maybe. But I can't help you if it doesn't run on Windows - please find someone with Windows programming experience if you run into trouble.
  2. The POCSAG message encoding happens within the POCSAG::Encode Perl module. On the computer. Not within the Arduino modem. The Arduino modem software is not useful on it's own, the perl code is required to send POCSAG messages.
  3. The Arduino modem is needed because (1) my computers don't have serial ports any more, and (2) bit-banging synchronous 512/1200/2400 bit/s FSK using handshaking pins of a serial/parallel port, like the Baycoms did, is not possible using an USB serial adapter cable (the timing is too strict). The Arduino is a convenient and relatively low-cost platform with a good bunch of TTL level I/O pins and an USB port, and could be easily programmmed to drive the transmitter. If you wish, you can write a kernel driver to drive the FSK bits generated by the encoder, baycom-style, on a serial port (if you have one) and skip the Arduino part.
  4. If you feel the Arduino Duemilanove/Uno boards are too expensive, you can look at the other boards too. Just get one with enough SRAM. If you're brave, you can also put the CPU and a few necessary components on a breadboard or a custom printed board of your own. Instructions here and here and here.
  5. The POCSAG::Encode module is published on the CPAN, and the Arduino modem on the wiki.
  6. Yes, the POCSAG encoder can be connected to any VHF/UHF radio which has a suitable FSK input. Many radios (including some that do have a 9600 bit/s data input) aren't up to the task. I've tried the Motorola GM340 and the Teknomen POCSAG radio only. The GM340 needed some configuration (using the programming software) to make the data input work the way it should for this application. See the comments on the previous post for wiring tips.
  7. Yes, the POCSAG::Encode perl module should be useful when trying to transmit POCSAG with other kinds of modems.
Happy hacking!

10 comments:

Oleg XE1QRP said...

Hi!

Very interesting project you have with POCSAG pagers! Congratulations!

I am following your instructions on your wiki to make similar system and I would like to ask for your kind help - could you please mention on your wiki (or here) which paging receivers you have bought? May be you remember the nickname of the seller?

Thank you in advance for your kind attention, 73! de Oleg XE1QRP

ON6ZG said...

Hi,

I uploaded the software in a ARDUINO DUEMILANOVE, i get the serial response, but there is no response when i send the U1X or U2X commands.
Any guesses what could be wrong ?

best regards Jan ON6ZG

oh7lzb said...

ON6ZG: Please download the pocsag arduino software again (from the same link, on the Wiki page). I had accidentally uploaded wrong version of the source code there. Sorry! The U*X commands are present in the version that is currently there now.

ON6ZG said...

Thanx for the fix. That's working now. Next step was linux but getting some errors.
on the test line execution i get:

tools/pocsag-send: line 2: use: command not found
tools/pocsag-send: line 3: use: command not found
tools/pocsag-send: line 5: use: command not found
tools/pocsag-send: line 6: use: command not found
tools/pocsag-send: line 8: my: command not found
tools/pocsag-send: line 9: \n: No such file or directory
tools/pocsag-send: line 10: Example:\n: No such file or directory
tools/pocsag-send: line 11: pocsag-send /dev/ttyUSB0 123456 'Hello, world!'\n: No such file or directory
tools/pocsag-send: line 12: \n: No such file or directory
tools/pocsag-send: line 13: This program uses the PISS protocol to talk to an external POCSAG\n: No such file or directory
tools/pocsag-send: line 14: modem. No, it does not drive the transmitter directly.\n: No such file or directory
tools/pocsag-send: line 16: syntax error near unexpected token `$port,'
tools/pocsag-send: line 16: `my($port, $dest, $message) = @ARGV;'

73 Jan.

oh7lzb said...

ON6ZG: It seems like you're trying to execute a perl script with a unix shell. Either run it with 'perl' (ie. 'perl tools/pocsag-send') or add the perl interpreter's run command as the first line of the pocsag-send script, '#!/usr/bin/perl').

I'll do the latter for the next version of the tools.

Alin said...

How send to all pager time(clock)For all pagers to update the time?

Achim Hasenfuss said...

Hello,

Unfortunately the site

http://wiki.ham.fi/POCSAG_Encoder_and_modem

is not reachable anymore. :(

Does there exist a mirror?

Achim

Scott Talbot said...

I am also in search of a working link to the code. 73's KD8RWX

Heikki Hannikainen said...

wiki.ham.fi was lost due to multiple disk failure around the same time, and no backups taken by the admin of that wiki.

Arduino modem source code: http://he.fi/pocsag/arduino_kpss.pde
POSAG encoder module + example program to send with the modem: http://he.fi/pocsag/POCSAG-Encode-1.01.tar.gz

Luke said...

hello,

can you tell me what are the pinout of Arduino to motorola GM340.

Luke.