Port of RadioHead to c#

I can’t seem to find any c# code for accessing 433/915 wireless radios like the RFM96.

Radiohead is a popular library, does anyone have any example code to TX RX one of these radios?


i guess we could port the code, but that would take a while (like a month). is it really that popular?

I took a stroll through the radiohead source and it has tons of drivers and tons of options. The best option for a tactical port might be to identify what chip(s) you want to support and what functionality (mesh, p2p, etc) and just use the radiohead source as reference material. Then you get to decide whether you have created a derivative work or not because you could still run afoul of the radiohead dual license (gnu/commercial($)). If you want to avoid that, you’re better off doing a clean implementation direct from the datasheet.

@ Mr. John Smith - [quote]is it really that popular?[/quote]
The radio or the library? The library is very popular in the Arduino world.

Here is the use case:
Typical home automation network. Multiple battery powered sensors out in the field: house, garden, garage, parked car etc. These sensors will send tiny messages to a gateway device which will forward them onto Azure via Ethernet or Wi-Fi.

All of the sensors need to use low power radios. I am using LoRaWAN in other projects but it is too expensive per radio and I don’t need that much distance for this project. Wifi sucks too much power and does not have the range needed. So the next best thing and the sweet spot for this type of communication (I think) is RFM12 or RFM69 or Nordic’s NRF radios. We are talking $2-$5 each.

As I prefer c# to c++ so I need a c# library, but can’t seem to find one. Seems odd that no one else in our world is not working with these radios. Am I missing something for this type of application?

@ mcalsyn - [quote]you’re better off doing a clean implementation direct from the datasheet. [/quote]

Unfortunately this is above my pay grade and skill :slight_smile: and would take too long. It takes me long enough to implement business logic let alone write the underlying code. Surly it has already been written ?

Who are you calling surly? When well fed and properly watered, I can be completely mostly civil. :wink:

I’m not aware of any port, and regrettably (but profitably), my dance card is full or I might jump in.

I’ll be writing a driver for the Microchip modules for the IoT Labs Pluto ([url]https://www.ghielectronics.com/community/forum/topic?id=23448[/url]) and I’ll release it to the community. It may not have all the bells and whistles, but it will get the job done.

Martin, I know you would knock it out of the park. When one of my projects hits pay dirt, you are hired :slight_smile: Too bad we can’t sit down at the pub and discuss this over a pint or two.

1 Like

Looking forward to it.

Oh, and how is the LoRaWAN board coming along? There has been a vacuum of updates about it. :slight_smile:

@ Terrence - Is it this exact device? [url]http://www.ebay.com/itm/181425435597[/url] If I can I order 3 and look at them. If it’s simple then I’ll try writing a driver. Just one more leg up NETMF will have on Ardunio.

That is the target John. Yes let’s crush the arduino fan boys!

Ok, 3 modules ordered. I’ll use the G120 to do the development.

@ Terrence - With playing with all these radio devices (even low power) the generated electromagnetic fields are going shrive up your testicles and they will fall off…

Time for tin foil protection…


@ Terrence - What kind of signals is the RFM96 using to communicate with the mcu? Is it just pulses which have to be analyzed in pulse length or frequency by the mcu or is it over e.g. UART transmitting e.g. ASCII signs?
If it’s analyzing pulses it’s a lot of time critical work for the mcu and I fear that the sensors will disturb the transmissions from other sensors.
I have this project
to receive signals from a 433 MHz remote Thermometer. It works fine but it’s only for one sensor!

@ RoSchmi - SPI plus some lines for reset, cs, enable etc. You might be right about the timing though. Maybe it is better to make a custom build from the 4.4 github repo and do an add-on of the c stuff or if possible go for RLP.

In case you don’t have it already for the radiohead (not the music band) info:

On the link there are some simple samples as well to get you started.

Ok, I found this info:

So it seems that the the RF69 autonomously deals with the row pulses that come from the encoder and only sends an interrupt to the MCU when a valid data package is received. It should be a rather easy task to react on these interrupts. In my project I used a simple 433 MHz Receiver as shown in the picture. In this case the mcu has to react on every pulse of the RF encoder to find out when a data package is received.

@ Mr. John Smith - You are awesome.

What is AdaFruit doing here with the rfm module on a pcb?

Heartily agree!

@ Terrence - there is really a nice video on the AdaFruit page. Sounds awesome. Do you know something about the function of the additional electronic on the AdaFruit PCB?

@ RoSchmi - No I do not, that was what I was wondering?

So there is the bare radio

Then AdaFruit adds a pcb

The here is the radio attached to a M0. This is what we need, but a board programmable with c#

…uh Gus, can you whip up some of these please? :slight_smile: