Python3 code is below…
also available at this Gitlab link
https://gitlab.com/Alex-rtnVFRmedia/pagertest2
Control the Arduino pager TX via Python running on a Linux machine
Python3 code is below…
also available at this Gitlab link
https://gitlab.com/Alex-rtnVFRmedia/pagertest2
Control the Arduino pager TX via Python running on a Linux machine
These UHF portable radio sets are good value, [I am obtaining some for use by the janitorial and maintenance teams at work] but the supplied mains chargers aren’t the safest design – and like most similar chargers they also cook the accus if they are left on charge constantly which often happens when these sets are used by less technically minded endusers.
Update: Newer versions of this radio sold on Amazon are now supplied with a desk charger with a USB plug; it seems Baofeng have been monitoring the various comments from European users (and their modifications to the chargers) widely posted on blogs and social media (fair play to them!)
This is of course much safer and can also be used with any suitable USB power supply including cigarette lighter adapters for vehicles, but there are still a fair few units being sold with the mains powered desktop charger as well as many others in regular use worldwide.
You can also get better 6 unit chargers from HongKong which have a separate low voltage PSU (similar in size to a laptop charger) that connects to the desktop unit but in the meantime I investigated and modified one of the chargers I already have to make it slightly safer – a fiddly and awkward job due to the way this cheap charger is constructed.
ATTENTION: Don’t try this unless you are confident with working on mains voltage equipment!
Below are some pictures showing whats inside, a very simplified explanation of how this kind of charger works and why changing the cable is a good idea (I also used a better plug with a 5A fuse). The good news is that it all worked when I put the case back together (I definitely wasn’t going to attempt testing it with the live PCB exposed), and the output voltage at the terminals was correct (compared with that of an identical unit)
Since putting this project on Youtube I’ve had a surprising amount of interest from across the world about the modifications I made to the original code from ON1ARF ( a radioamateur in België) to allow 1200 and 2400 bps pager transmissions as well as the default 512bps (I wanted to use the circuit to test commercial POCSAG pager receivers used at one site at my work).
The original code is here
https://github.com/on1arf/pocsag
To get 1200 and 2400 bps you must alter the radiohead libraries it depends on.
Two files must change – the first is RH_RF22.cpp. The code snippet is below (cut and paste this into your editor)
header file for Arduino POCSAG RF22 tx
Also the header file RH_RF22.h must change so the modemconfig table has values that reflect the changed modulation schemes.
RF22 headerfile
the rest can then be used as normal – remember to alter the main Arduino sketch code to select these new bps rates.
NB: I am based in the UK/Europe; we always use wide deviation for POCSAG signals (although much other PMR traffic is now on narrow deviation).
If your country’s Communications Ministry requires narrow deviation to be used you will have to recalculate the modem settings using the spreadsheet referred to in the library files. (Its not as bad as it might seem; I had to use it to get the 1200/2400bps settings and I am not an RF nor a coding expert by any means)
Yesterday I was watching a news documentary about the BNetzA (German Communications Ministry) at work with a Peilwagen (radio tracking vehicle) searching out stray signals that caused havoc with vehicle alarm/lock systems and TV-sets for some kilometres around and even got into the communications systems of the aircraft.
It turned out that the middle aged couples complaining about the interference had accidentally caused it themselves by defects in cheap gadgets like weather stations (the signal had also cut across the DWD’s far more accurate weather stations) and animal scarers!
In one bit the BNetzA chap got an urgent call from Bremen aerodrome because of “Störung durch Pfeifton” on aviation frequencies. A Pfeifton (as its name suggests) is a high pitched sound that may or may not be wanted (it can mean the ringtone on a mobile (Handy)). it is definitely unwanted on those frequencies. Not just Angst but Gefahr; DE has had plenty enough trouble with aircraft recently.
The facial expressions of the BNetzA chap and the way he said Pfeifton made it clear whatever was causing it would be made to pipe down – at ARCEP in France he might be equally likely to pipe his eye 😉 )
Also: bald muß die BNetzA mit dem Peilwagen für den Pfeifton suchen.
(I might even have got at least half of the cases and genders right in the above [in German the govt, police agencies are always feminine] 😉 )
but there are times when the Pfeifton is desirable:
you can hear and see it on the spectrum display (it is the two brighter yellow lines). The Pfeifton is part of the Signal, but the rest of the yellow is Rausch (noise, but can also mean the effect of booze or drugs!).
“cq cq cq de ddh47 ddh9 ddh8” means that everyone who can receive the signal is permitted to monitor it – BNetZA have licensed the Deutscher Wetterdienst to transmit it, Ofcom, Agentschap Telecom, ARCEP etc allow you to monitor it because we are in the EU (it wasn’t always the case!).
DDH47/DDH9/DDH8 are the callsigns to identify the transmitter (required by international law).
more info about it (in German) https://de.wikipedia.org/wiki/DDH47
if you look at the wave display you can see why they also send “ryryryryryryryryryryryryryryry”.
even with a 20 000W TX there is a lot of interference on LF (worse on HF) – because of the type of signal used (an upper sideband) you also need a radio receiver which can generate the Pfeifton using a special circuit.
The signal I am decoding is at 147.3 KHz so why is the radio tuned to a different frequency? 147.3 – 146.01 Khz = 1.29 Khz – just right to make an audio signal strong enough to get above the noise.
if the sound is familiar from those documentaries about Bletchley Park; that is because its exactly the same signal! Today its used for more peaceful purposes – eventually you get messages like this
and the stuff which looks like “secret codes” if decoded on a Linux machine (doesn’t work on Windows even with the same software) is actually just the weather; except from ships at sea or weather monitoring stations.
This weather boat is funded by the EU and operated by (I think) the French Navy – BATEU00 = bateau (fr) 😉
By now you probably are wondering – why go to all this trouble in the 21st century when you can get the weather info online?
one reason is much of the online stuff for Europe is the exact same data but processed via private companies in USA who know little about Europe’s geography and introduce flaws into the data, in the UK the BBC and Met Office computer links regularly go wrong.
Doing this also unearths any particularly bad interference from gadgets in your building or if the Russians are doing anything sketchy – the small weather boat (which often does some surveillance work as well) is sent elsewhere or told to switch off its radio transmitters unless its an emergency); a lack of weather reports from any European country which isn’t obviously too skint to keep their weather service working also means something unusual is going on. There is always Weather in Europe.
Particularly rough weather means even the Russians stop with all of their spying as well (and even warn Europe of any particularly harsh weather, usually via Norway). Germans and Dutch call that “Unweather” (something so bad it is dangerous to everyone on land, sea and in the air). This whole setup doesn’t even need the Internet; as long as there is some electricity to keep the radio receiver and relatively old netbook going it will operate and this can be done with equipment older than I am…
Weather faxes and RTTY from Germany and UK; plus some of the equipment used