tx/rx feather M0

Started by oymyakon, November 16, 2016, 01:10:11 PM

oymyakon

Hi,
I am having trouble getting RX to work straight after Tx.
I have a feather M0 with RFM69.
I am using the radio.sendWithRetry to the reciever which works and then i am using the same from the receiver to send some setup data but the transmitter does not receive anything.

Any ideas.
Paul.

Felix

There are several examples in the RFM69 lib that work out of box as long as the settings are setup correctly. Those should get you started right away.
Otherwise feathers are a product of adafruit so anything hardware/M0 specific you might want to ask for support in their forums.

perky

As a quick hack, you could try making sure the receiver is in SLEEP rather than STANDBY mode just prior to enabling RX mode. I've seen exactly this problem on my setup that doesn't use any of the open source libraries and uses custom hardware. If this fixes the problem it adds weight to the theory that the receiver is not fully reset when going from STANDBY to RX mode, but is when going from SLEEP to RX mode.
Mark.

RoSchmi

Hi, I'm just working with the Adafruit Feather M0 RFM69 as well and noticed some issues:
When I wanted both,  receive and send in the Arduino loop() and a delay(xxx) command was used, the program on the Feather M0 never returned from the delay() function. This could be avoided by going to RF69_MODE_STANDBY for the time of the delay:
void loop() {
int8_t lastMode = _mode;   // Save last mode   
setMode(RF69_MODE_STANDBY
delay(5000);                       // Wait x seconds between transmits, could also 'sleep' here!
setMode(lastMode);          // Restore previous mode
.......
another issue I saw was, that the canSend()  method did never return true as the constant CSMA_LIMIT with -90 was set to low, the RSSI I got from readRSSI method was always around -82, for me it worked, when I set CSMA_LIMIT to 75

Felix


RoSchmi

My bad, saw it at Adafruit first, so I came to your awesome library (thank's a lot!), the next board to use as a sender will of course be a Moteino. On the receiver side I'm just trying to port your driver to NETMF/Gadgeteer Mainboards.

Felix

Thanks  :)

RE NETMF - Why would you ever make your life miserable by running the managed .net behemoth on a microcontroller?
I tried that a very long time ago and it's one of the worst ideas coming from Redmond.

RoSchmi

I think, cool things can be done on many platforms, why I got there? May be by accident, but I like it. :)

perky

@RoSchmi
That's a bit strange, a delay function's execution which is normally just a tight loop engineered to give the right delay is somehow dependent on the mode of the radio! The only mechanisms I can think of that could cause that is constantly firing interrupts, or maybe stuck in an ISR somewhere, or possibly the delay function itself assumes the radio is providing a clock and that clock is disabled in SLEEP mode. All a bit odd.
Mark.

TomWS

Quote from: Felix on November 17, 2016, 01:53:48 PM
it's one of the worst ideas coming from Redmond.
WHOA!  THAT is an ACCOMPLISHMENT!
They have had some real duzzies!
Tom

Felix

Quote from: RoSchmi on November 17, 2016, 03:22:42 PM
I think, cool things can be done on many platforms, why I got there? May be by accident, but I like it. :)
Back in the day when I first started doing electronics after work, I started out with a Netduino and tried doing realtime tasks that would otherwise take 50lines of easy code on a UNO. I chose Netduino because I was doing some projects requiring ethernet and that was the only thing that had everything in a "compact" package. I was also doing c# at the dayjob so I thought how cool it must be to write c# for a micro. Who needs all that soldering and reflow rubbish when there's the power of .net to fuel such a revolution in electronics!

Well turns out it was next to impossible to run unmanaged code because .netMF by nature is managed so to get out of that shell and do realtime was "bleeding edge" around 2010 and just flipping bits with precision timing was a nightmare.
At that time my electronics arsenal was a few simple tools, a UNO and a $15 soldering iron for soldering wires to LEDs :) so naturally plug and play was the ideal choice for a .net programmer doh, who needs that when there's gadgeteeeer, aka electronics lego for the .net folk :D

Sorry for the rant comrades!