Cant Enter RX in Listen Mode

Started by Magmanus, March 27, 2019, 07:43:41 PM

Magmanus

Hey Folks,
Im trying the ListenMode on my Arduino. When i try to send a message from my Raspberry to my Arduino, when he is in Standard RX Mode, i get an Interrupt and everythink works fine. Now im trying to use the ListenMode. I send a burst over 2 Seconds from my Raspberry to the Arduino in which one Send Function last 60ms seconds to process. But i cant hit the RX time in my ListenMode.

uint32_t rx = 100000;
uint32_t i =  200000;

void loop()
{   
    if(!radio.listenModeSetDurations(rx, i)){
      Serial.println("Listen Mode Duration set failed!");
    }
    
    radio.listenModeGetDurations(rx, i);
    Serial.println(rx);
    Serial.println(i);
    
    radio.listenModeStart();
    Serial.println("uC Sleep");
    Serial.flush();
    LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);

    Serial.println("Woke up!");


Here is my Arduino Code. The ListeMode should stay for 100ms in RxMode and 200ms in IdleMode. Will set down the duration of my burst but for now on im just trying to get things work. Is there something im missing? 

Magmanus

#1
It seems that the listen mode doesnt work. I read the Registers and in RegOpMode(0x01) is ListenOn = 0. I dont understand why. After "ListenModeStart" the Bit in ListenOn should be 1. Any ideas?

So i tried something different. After calling:
radio.receiveDone();
radio.readAllRegs();

at the end of my setup function i get as ouput:

Address - HEX - BIN
1 - 40 - 1000000

Soory but im confused. The radio should be in rx mode, not in sleep mode? Am i missing something?

Felix

Try the examples in the ListenMode branch. But use ListenMode in the main branch.
FWIW it was pretty well documented previously that the native ListenMode is broken and the transceiver can get stuck in RX mode after some time, thus draining the battery. See this thread: https://lowpowerlab.com/forum/low-power-techniques/ultra-low-power-listening-mode-for-battery-nodes/

Magmanus

Thank you felix. Tried the example. Same problem. I receive normal messages. But when i enter listen mode nothing happens. Read also the registers and got an '1' in "ListenAbort" after the function "listenModeStart". Should i try a other radio?

Felix

If the radios you have work with simple messaging they should also work in Listen Mode. Have you tried the simple examples?

Magmanus

Alright. Tried the Examples and it works. So my problem is not on arduino side. Last question. I want to write the "ListenModeSendBurst" to the Python Lib. Don't know if i get this done but whats the difference between "ListenModeSendBurst" and the Function "SendFrame"? Of course the Burst function sends out more messages. But i saw that the function also writes a lot of registers. Should i mention something?

Felix

Quote from: Magmanus on April 29, 2019, 03:52:20 PM
I want to write the "ListenModeSendBurst" to the Python Lib.
Which python lib?

Magmanus

https://github.com/etrombly/RFM69
This one. Tried to call the function 'send' in a while loop. Didn't work

Felix

Sorry, that's not my creation, so I can't offer any support on it.