LowPowerLab Forum

Hardware support => Moteino => Topic started by: MLH on September 17, 2017, 09:57:47 PM

Title: Unlimited packet mode
Post by: MLH on September 17, 2017, 09:57:47 PM
Hello All,

Just received my first Moteino's and have a question for the group. A forum search revealed a brief mention of unlimited packet mode, my application does not require AES encryption. According to the RFM69 documentation, registers 0x37 and 0x38 need to be reconfigured on the RF board.  It appears that the only way to do this is to edit the RFM69.cpp file. Is this correct, or is there another more simple means of enabling this mode?

Thanks,

Mike
Title: Re: Unlimited packet mode
Post by: ChemE on September 18, 2017, 08:07:00 AM
Yes, it is easier to call:

void writeReg(uint8_t address, uint8_t value)  and
uint8_t readReg(uint8_t address)

To tinker with individual registers rather than editing the .cpp file itself.
Title: Re: Unlimited packet mode
Post by: TomWS on September 18, 2017, 08:29:57 AM
Quote from: ChemE on September 18, 2017, 08:07:00 AM
Yes, it is easier to call:

void writeReg(uint8_t address, uint8_t value)  and
uint8_t readReg(uint8_t address)

To tinker with individual registers rather than editing the .cpp file itself.
A minor tweak to prevent OP from going off track:
these are methods of the RFM69 object, so the calls would be:

   radio.writeReg(REG_NAME, value);

   radio.readReg(REG_NAME, value);

Where REG_NAMEs are defined in the RFM69registers.h file...

Tom
Title: Re: Unlimited packet mode
Post by: MLH on September 18, 2017, 10:59:30 AM
Thanks guys,

I appreciate the guidance.

My programming experience to this point has been assembly language, zero C until receiving these Moteino's .  Manipulating the supplied code examples has been enlightening, looking forward to the learning experience.

Mike
Title: Re: Unlimited packet mode
Post by: ChemE on September 18, 2017, 09:37:28 PM
Funny, ASM is the one language I've sorta always wanted to learn despite being decent at a handful of others.  I guess the grass is always greener eh?
Title: Re: Unlimited packet mode
Post by: MLH on September 18, 2017, 11:20:00 PM
By comparison to compiled languages, ASM is like building a house brick by brick. A drawback to ASM is the variation between manufacturers instruction sets. Microchip vs. Atmel for instance is like speaking different dialects of a similar language.  My perception is that C affords greater transparency between hardware platforms. Programming in C has been on my to do list, the Moteino has become a catalyst.
Title: Re: Unlimited packet mode
Post by: ChemE on September 19, 2017, 06:41:41 AM
Correct.  The hardware has zero impact on the C you write.  It is the compiler's job to know what instructions, sequences, and tricks to use to get the most out of the hardware.  I have read a great many threads in several languages where someone asserts that compiled code can never touch hand-tuned ASM only to be proven wrong again and again.

However, my interest has always been on the efficiency side of compiled languages and there can be monumental differences in performance and size between well-written C and poorly written C.  The same is certainly true of Visual Basic, FORTRAN, SQL, VBA, and Matlab as well (purists would argue the last two are not languages).