Author Topic: Cant Enter RX in Listen Mode  (Read 1614 times)

Magmanus

  • NewMember
  • *
  • Posts: 9
Cant Enter RX in Listen Mode
« on: March 27, 2019, 07:43:41 PM »
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.

Code: [Select]
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

  • NewMember
  • *
  • Posts: 9
Re: Cant Enter RX in Listen Mode
« Reply #1 on: April 17, 2019, 05:56:10 PM »
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:
Code: [Select]
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?
« Last Edit: April 17, 2019, 06:39:37 PM by Magmanus »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Cant Enter RX in Listen Mode
« Reply #2 on: April 17, 2019, 07:53:25 PM »
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

  • NewMember
  • *
  • Posts: 9
Re: Cant Enter RX in Listen Mode
« Reply #3 on: April 18, 2019, 05:15:10 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Cant Enter RX in Listen Mode
« Reply #4 on: April 18, 2019, 08:24:40 AM »
If the radios you have work with simple messaging they should also work in Listen Mode. Have you tried the simple examples?

Magmanus

  • NewMember
  • *
  • Posts: 9
Re: Cant Enter RX in Listen Mode
« Reply #5 on: April 29, 2019, 03:52:20 PM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Cant Enter RX in Listen Mode
« Reply #6 on: April 29, 2019, 04:07:27 PM »
I want to write the "ListenModeSendBurst" to the Python Lib.
Which python lib?

Magmanus

  • NewMember
  • *
  • Posts: 9
Re: Cant Enter RX in Listen Mode
« Reply #7 on: April 29, 2019, 04:16:01 PM »
https://github.com/etrombly/RFM69
This one. Tried to call the function 'send' in a while loop. Didn't work

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Cant Enter RX in Listen Mode
« Reply #8 on: April 29, 2019, 06:01:56 PM »
Sorry, that's not my creation, so I can't offer any support on it.