Git Product home page Git Product logo

rfm12b's Introduction

NOTE: not actively maintained

This library is not actively maintained anymore but is kept for reference and can still be used with RFM12b transceivers.

RFM12B Library

By Felix Rusu ([email protected])
Based on the RFM12 driver from jeelabs.com (2009-02-09 [email protected])
http://opensource.org/licenses/mit-license.php

Features:

  • easy API with a few simple functions for basic usage
  • 127 possible nodes on 256 possible networks
  • 128 bytes max message length
  • customizable transmit power (8 levels) for low-power transmission control
  • customizable air-Kbps rate allows fine tuning the transmission reliability vs speed (transmitting slower is more reliable but takes more time which implies more power usage)
  • Sleep/Wakeup functionality for power saving
  • Low battery detector with customizable low voltage threshold
  • Interrupt driven
  • Support for targeted ACK instead of broadcasted ACK (possible because of the new source byte in the header) encryption with XXTEA algorithm by David Wheeler, adapted from http://en.wikipedia.org/wiki/XXTEA Support for these chips: ATMega8 family (ATmega168, ATMega328) ATMega2560, ATMega1280, ATMega644P, ATTiny84, ATTiny44, ATMega32u4. So far only tested on ATMega 328/P
  • wireless programming (for more info click here, here and here)
  • the library needed for wireless programming is now here, install it in your Arduino/libraries folder (WirelessHEX for RFM12B)

Installation

Copy the content of this library in the "Arduino/libraries/RFM12B" folder.
To find your Arduino folder go to File>Preferences in the Arduino IDE.
See this tutorial on Arduino libraries.

Saple usage

TODOs (in order of priority):

  • Support automatic ACK handling
  • Refactor changing the SPI CS signal
  • Add support for hosting multiple radios on 1 MCU

rfm12b's People

Contributors

ivankravets avatar lowpowerlab avatar ufuchs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rfm12b's Issues

Losing ACKs

I was running your Send/Receive examples testing out your library. I noticed that I consistently loose transmissions when packets are between ~50 and ~60 bytes long.

I modified the send.ino to request ACK with every transmission, turned off encryption, and increased ack time to 100ms. I get ACKs for every transmission bewtween Sending[1] through Sending[49] and Sending[60] through Sending[88]. I lose most messages between about [50] and [59], give or take. And every once in a while a few of those transmissions will get an ACK.

I'm using a pair of JeeNode V6's with 433 mhz radios.

ATTiny84

Hi,
im trying to get this lib to work an an attiny84.
jeelib does work great, but I would like to use this libary since it's simplicity is great.

The initialization does work great, but in the CanSend() method, this part of the first if does always return false:

rxfill == 0 && (Byte(0x00) & (RF_RSSI_BIT >> 8)) == 0

Do you know whats wrong?

Thanks in advance,
Markus

SPIFlash.h ?

This is looking a usable library for RFM12B.
Before I give it a try, could you please tell me where to find "SPIFlash.h"?

Thank you.

Example compiler error

WirelessProgramming_gateway.ino: In function 'void loop()':
WirelessProgramming_gateway:45: error: 'readSerialLine' was not declared in this scope
WirelessProgramming_gateway:48: error: 'CheckForSerialHEX' was not declared in this scope

Question?

Is it possible to make a general listener for my no-name weather station working on 868 Mhz? With this way, I am aiming to reverse engineering on its protocol/data frame.

Any input greatly appreciated.
Regards.

Serial issue

Hi,

thank you for your work!
Using it with Pro Micro as sender, and Mega 2560 for receiving data.
I have used your Send and Receive samples, and it worked from first trial.
But, there is an issue with serial communication: after receiving the first telegram from sender,
the reading of data from Serial does not work anymore.
Serial.available() returns 0, only reset brings it back to life, until next telegram from sender.

Best regards
Gogo

atmega 169pa

Salutari din Romania, Felix!

Any idea how to use the library with atmega169pa?
I'm especially interested about the wiring to rfm12b.

All the best!
Ionut

lowVoltageThreshold doesn't seem to be used

Hi,

thank you for your work!

In RFM12B::Initialize(), I don't see where the optional parameter lowVoltageThreshold is actually used. Maybe I'm missing something?

If I understand the datasheet correctly, I think the line

XFER(0xC043); // Clock output (1.66MHz), Low Voltage threshold (2.55V)

should be

XFER(0xC040 | lowVoltageThreshold); // Clock output (1.66MHz), Low Voltage threshold

? And the defines RF12_2v25 etc. are 4 bits, so according to the formula Vlb = 2.25 + V · 0.1 [V] they could be these:

//Low battery threshold (eg 2v25 = 2.25V)
#define RF12_2v25       0
#define RF12_2v35       1
#define RF12_2v45       2
#define RF12_2v55       3
#define RF12_2v65       4
#define RF12_2v75       5
#define RF12_2v85       6
#define RF12_2v95       7
#define RF12_3v05       8
#define RF12_3v15       9
#define RF12_3v25       10
#define RF12_3v35       11
#define RF12_3v45       12
#define RF12_3v55       13
#define RF12_3v65       14
#define RF12_3v75       15

Regards...
Michael

ESP8266

it is ready for porting to esp8266?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.