Tag Archives: DECODER

ROBOGUARD PROTOCOL

#133 Decoding an ASK Alarm Protocol

A few years ago I wanted to add multiple devices to my Roboguard HQ. Unfortunately I had to make my own custom solution because the original product can only allow up to 8 zones for sensors. I created a prototype using the classic Atmega328p but since then I’ve made 3 PCB designs all with different ICs: Attiny, STM8s and STM32 versions, all working with great success

Now I would like to talk a bit about the RF side of things and since I am a licensed ham radio operator as well. I think sharing a blog post will be quite interesting.

So first of all I needed to use an SDR with the correct antenna for the correct frequency in this case it was the tried and true good ol standard (ISM 433.92mhz). Since I’m located in a rural area the air waves are relatively uncongested so for me this is great.

Now I needed to record the signal I used a few tools mainly SDRSharp (because I like writing my own private plugins in C# ) Universal Radio Hacker and Audacity. Honorable mentions go to paint.net I used it for the picture editing

So firstly I observed my device for a few days, triggering it and pressing buttons etc. all while locked on to the frequency. Each time it did something I would record the time and make a high quality .wav recording of the signal.

Once I had learnt a few of the patterns and habits of the device i was able to use this in conjunction with the recorded wave files in audacity to start putting meaning to the patterns of bits and bytes.

Though to make my life a bit easier I calibrated Universal Radio Hacker for my RTL SDR and mad some recordings using some .complex16s files.

The nice thing about URH is that it tries to figure out the patterns for you but I find there’s always a bit of manual labour needed so clankers-0 meatsacks-1 in this regards

URH helped clean up the signal a bit but I still needed to make some fine tuning adjustments and re record the signals a few times with different crystal offsets.

Eventually I got decent results and was able to easily read the bitstream.

So the basic signal is 1x preamble then 8x repeating pattern containing the id and type of signal being sent.

looks like this:

Now everything is about timing. The preambles timing is very different to the payloads timing sure you can just grab the payload and call it a day but the preamble is critical in this day and age. It helps prevent false positives and also adds a bit of time so that the listener can “wake up” and grab the signal reliably so it has and important purpose.

So I used URH since it captures the timings in μs where Audacity can’t really show you accurate timings.

And I came up with the values like in the picture.

This is a nice and simple AM signal to reverse engineer and so far I have not seen anyone else do this for this specific signal so I think I’ll add it to the RTL_433 devices list.

Now once we understand the signal we need to send that signal and receive that signal.

I have done this in bare-metal C programming for the Attiny, STM8 and STM32 microcontrollers as well as added the decoding library to the RTL_433 project on Github.

The cool thing about this was that now I got to extend my bit banging knowledge using bit arrays and shifting bits around. Plus really simplicity is genius in this case. complexity just confuses an already confusing pattern of radio waves, the simple solution is always there as humans we are mostly just to dumb to see it and require time running our biological processors thinking about it until one night suddenly there’s a solution.

The main purpose was to make a cool system for myself at the time but now the secondary objective is to get more people interested in Radio and signals, SDR making plugins etc.

Reverse engineering this signal required multiple different skills and the ability to learn new things so it’s a wonderful educational and useful thing to do with a youngster.

In my opinion it opens the door to curiosity about further complex signals in a moderate way, the individual could then take up more demanding tasks like decoding FSK and other more complex signals like digital voice DMR as an example.

DSTV CUTS CORNERS

#96 A mystery chip causing IR remote trouble

Recently I had to update a DSTV system from the old explorer to the new HD decoder + remote.
Unfortunately older remotes don’t work with the new decoders however when you purchase a decoder you get a new remote in package.

Now I had a bad experience with the B8 remote which brought an even worse issue to light.

The decoder was checked by the technician in the shop and all was well however when I setup the decoder at home I noticed the remote was not working and upon inspection I noticed the orange LED was emitting a very weak signal when I pressed the buttons.

B8 remote

I really did not want to go all the way back to the shop so I opened the remote and I noticed that the IR chip had its numbers filed off… so now the remote also had a mystery chip that I couldn’t search for in order to find potential solutions…

Looking at the PCB everything seemed fine.. the traces, solder joints, button pads, and overall condition was good so the culprit had to be the IR mystery chip. This was confirmed once I received a new remote from the shop after explaining to them what the problem was.

Shaved mystery IR chip

I opened the new remote in order to do a simple comparison. Immediately I noticed that the IR chip in the new remote had text I could read. literally everything else was the same. I also noticed the orange LED was now shining brightly when the buttons were pressed. Keep in mind that these remote PCB boards have are exactly the same in version number and part placement. Only the IR IC is different..

Working chip with markings.

So I came to the conclusion that the unmarked mystery chip was the problem. They even went through the hassle of sanding the text off that inferior chip they used. from here on I can only speculate as to why the factory did this. One reason could be to hide the chip from competitors also they could have been using a cheap replacement which obviously failed yet they still went out to the public. There is a lot to speculate and non of it looks good for DSTV and their made in South Africa labelling.. seems they have been up to some shady business. We will see what else comes out in the future but for now that’s all I have to say.