Skip to content

A dotnet library for CC1101 to be used on an raspberry pi. Work in progress

Notifications You must be signed in to change notification settings

erythana/CC1101.NET

Repository files navigation

CC1101 Library for .NET

This is a .NET library for RaspberryPi to communicate with CC1101 Tranceivers.
Please make sure to first enable the SPI-Interface on your RPi.

Requirements

  • Raspberry PI (or similar) with a Linux Distribution of your choice
  • .NET 8 Runtime
    TODO: Maybe checker whether to add dotnet to path variable is required - probably needed so this program can run with dotnet..

Wiring

Please refer to the Raspberry Pi Documentation for the GPIO Header scheme

The default settings for this library are listed here:

Either use

BUS 00

CC1101 Raspberry Pi
Vdd 3.3V (01)
SI MOSI (19) - GPIO10
SO MISO (21) - GPIO09
CS CEO (24) - GPIO08
SCLK SCK (23) - GPIO11
GDO2 GPIO (22) - GPIO25
GDO0 not used
GND GND (25)

OR

BUS 01

CC1101 Raspberry Pi
Vdd 3.3V (17)
SI MOSI (38) - GPIO20
SO MISO (35) - GPIO19
CS CEO (12) - GPIO18
SCLK SCK (40) - GPIO21
GDO2 GPIO (22) - GPIO25
GDO0 not used
GND GND (34)

OR

Custom BUS

If you really need to, you can also supply your own ConnectionConfiguration when instantiating the CC1101 library.
Make sure the configured PIN supports the specific SPI operation (see Raspberry Pi Documentation) for predefined buses. Read up on Device Trees and the Raspberry SPI

CC1101
SI
SO
CS
SCLK
GDO2 (whatever GPIO Pin you like)

Usage

Instantiate a new 'CC1101Controller', if you go with the default configuration (Bus 00, see 'Wiring' for more details ) you don't need to specify anything.
If you want to choose a different Bus, you can create supply a 'ConnectionConfiguration' with your own settings.
When doing so, you need to specify the logical Pin number, not the physical Pin from the header.
After creating the controller, you have to call "Init" and initially set a DeviceAddress (whatever you like).
This method returns a CC1101 object which allows you to talk with your CC1101 module.

Example:

var controller = new CC1101Controller();
var cc1101 = controller.Initialize(0x03);

Dependencies

This project uses System.Device.Gpio

Work in progress

This is still work in progress and pretty much untested.
Also, at this point in time, the exposed interfaces might change...

Credits

Thanks to SpaceTeddy to share his C++ Project - i ported this library to this .NET library:
https://github.com/SpaceTeddy/CC1101

About

A dotnet library for CC1101 to be used on an raspberry pi. Work in progress

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages