dsvensson / cc1101

A platform agnostic driver to interface with the CC1101 (Sub-1GHz RF Transceiver)
Apache License 2.0
30 stars 16 forks source link

Add support for transmitting packets #14

Open dsvensson opened 6 years ago

dsvensson commented 6 years ago

Figure out a good API for transmitting data. Blocked by me not having an extra CC1101 module to talk to, nor a personal use case.

fmckeogh commented 6 years ago

[]() []()

Should have a PR once I tidy everything up. :)

dsvensson commented 6 years ago

I'm adding some wiggleroom in #21 to simplify experimenting with other ways of functioning.

fmckeogh commented 6 years ago

Sounds like a great idea, as I was using the crate in a project, I realised I was either going to have to make all the register functions public or make a public function configuring every single parameter.

dsvensson commented 6 years ago

@chocol4te As I see it, a low level module, or different crate will do what the constructor does today, and be responsible for, via public APIs, interacting with the registers. When creating the module like today, that inner SPI owner will not be exposed, nor the register interacting functions. So you would have either a simplified API for reception/transmission if you stay within a sweet spot, or you would be entirely on your own, but with the register names, fields, and defines for their possible values.

dsvensson commented 6 years ago

@chocol4te I'll be offline for the next 10 days or so, but I've pushed #21 which prepares the exposing thing, and created #22 for the second part of that. Ideally #10 would tie into that as well, but perhaps that can be added a bit later.

dsvensson commented 5 years ago

@chocol4te I've done said change now. Next up will be to change the macros to get proper type safety around the write/read methods. So now you chose between the limited high level cc1101::Cc1101 API, or the raw cc1101::lowlevel::Cc1101 API. Perhaps there should be some name cleanups in there at some point. I should have a second module within this month so I can play with transmission as well.

rubend056 commented 3 months ago

I just wanted to say, great work on this library @dsvensson, I managed to get my custom cc1101 915MHz modules communicating thanks to your work. I had to expose the spi device to experiment since the library is unfinished, but I got ~100m through walls with max pa + crc + fec with no errors :) , next up I'll see if I can get better range by implementing retransmissions.

Lmk if you still need a second module, I'll email you 3 of my own modules so you can keep going.

Here's a pic of my module

BrandonLeeDotDev commented 2 months ago

@rubend056 would you mind emailing me those modules as well? adidingbrandonlee@gmail.com