etrombly / RFM69

Python RFM69 library for raspberrypi
GNU General Public License v3.0
115 stars 77 forks source link

Pi 2 B is not receiving from moteino. Transmit is OK. #29

Open morrowwm opened 6 years ago

morrowwm commented 6 years ago

I am testing communication between a Raspberry Pi model 2B and moteino. On the Pi I am using the radio1.py script, with slight changes. On the moteino I am using a modified version of LowPowerLab's "Struct_receive" example script. They're in the attachment.

On the Pi, I see:

starting loop...
tx to radio 2: I'm radio 1: 0
start recv...
timed out waiting for recv
end recv...
 ***  from 0 RSSI:0
ack not requested...

and so on. On the moteino, I see

[1]  [RX_RSSI:-65]Got: I'm radio 1: 2 - ACK sent. Pinging node 1 - ACK...nothing
[1]  [RX_RSSI:-66]Got: I'm radio 1: 1 - ACK sent.

the [1] means the message came from node 1, which is the Raspberry Pi. So it transmits and the moteino receives.

However, the ACK back fails, and any transmitting I try from the moteino side is not received by the Pi.

I'm using a perfboard hack to attach the RFM69 to the Pi. I've attached the RFM69 according to the pins in README.md here, except I'm using ground pin 20. I have RFM69W, so not enabling high power. files.tar.gz

LDavidFr commented 6 years ago

Hello I have same problem. You have solution ?

morrowwm commented 6 years ago

No solution. I gave up on the Pi and I am using an ESP8266 with RFM69 as a gateway to ethernet.

blooem commented 6 years ago

@morrowwm Same problem here, When you say ESP8266 with RFM69 what do you mean?

Thanks, B

morrowwm commented 6 years ago

It's a LoLin nodeMCU board. I connected the RFM69CW module with a homemade cable. 20180208_091618

LDavidFr commented 6 years ago

Work for wemos D1 and esp07.

supershiye commented 6 years ago

I have the same issue. It can send but not receive.

labaude commented 6 years ago

I am experiencing similar problem within 2 PIs.. It seems I receive the ACK maybe 10% of the time.. Anyone has an idea of the reason why the PI would act as such?

Thanks

labaude commented 6 years ago

OK, it seems adding 2 milliseconds delay before sending the ACK does the trick for me. (i.e now receive the ACK 100 % of the time). This delay seem to be used in a few examples cases from the original library.

From the radio1.py line 58 it would look like:

    if radio.ACKRequested():
        print "sending ack..."
        time.sleep(0.002)
        radio.sendACK()
supershiye commented 6 years ago

Can you please describe the problem you meet?

Thanks

On Tue, Aug 14, 2018 at 8:38 AM, labaude notifications@github.com wrote:

I am experiencing similar problem within 2 PIs.. It seems I receive the ACK maybe 10% of the time.. Anyone has an idea of the reason why the PI would act as such?

Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/etrombly/RFM69/issues/29#issuecomment-412857208, or mute the thread https://github.com/notifications/unsubscribe-auth/AlCbiB_28K5mFdoaa5Jgvy7AfwSFD_HAks5uQsTbgaJpZM4RBdYf .

labaude commented 6 years ago

Actually the trick described above do not work anyore for me after reboot. I'll edit when I'll have finish my investigation.

I am trying to connect 2 RFM69HCW using a RPI 3 B+ and RPI 2 B.

I am using radio1.py and radio2.py exemple sighlty modified. I can get the radio2 to send msg to radio1, which receives it and send the ACK. But I can't get the radio2 to systematically get the ACK back. (i.e sendWithRetry should turn to True and so print ( ack_recieved)). It only print it some time, maybe 1 out of 10...

I am using highpower.

Any idea if I am doing something silly? Thanks

supershiye commented 6 years ago

Hi This may be the problem of pin definition, if you check the PIN number by pinout, you may see it’s different from the user guide or the code. Another guess is about Pi2. I experience some pin name issues with pi3, but switching to pi 3 will help a lot.

On Tue, Aug 14, 2018 at 13:24 labaude notifications@github.com wrote:

Actually the trick described above do not work anyore for me after reboot. I'll edit when I'll have finish my investigation.

I am trying to connect 2 RFM69HCW using a RPI 3 B+ and RPI 2 B.

I am using radio1.py and radio2.py exemple sighlty modified. I can get the radio2 to send msg to radio1, which receives it and send the ACK. But I can't get the radio2 to systematically get the ACK back. (i.e sendWithRetry should turn to True and so print ( ack_recieved)). It only print it some time, maybe 1 out of 10...

I am using highpower.

Any idea if I am doing something silly? Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/etrombly/RFM69/issues/29#issuecomment-412950582, or mute the thread https://github.com/notifications/unsubscribe-auth/AlCbiK0SPz4VNNIEiRJuQzDXMbMsgGcWks5uQwemgaJpZM4RBdYf .