Project

General

Profile

Unexpected behaviour of RF69 radio

Added by Rolf 8 days ago

Sending node is a jn-zero, the receiver a blue pill with RFM69. Node ID of the sender is 1 and that of the reciever 2. That works fine. I would expect that the receiver "sees" only packets send to its address (2), others neglecting. But that sems to be not the case (if I am not misleaded by some stupid mistake), the receiver gets everything.

Here is the sending program, sending 3 packets to adresses 2, 3 and 4:

forgetram
1 buffer: cmd

1 rf.nodeid !
42 rf.group !
8686 rf.freq !
rf-init
16 rf-power
100 ms

55 cmd !
cmd 1 2 rf-send 500 ms
cmd 1 3 rf-send 500 ms
cmd 1 4 rf-send


That of the receiver looks linke this:

forgetram

include ../../src_forth/rf69.fs

: node-init
2 rf.nodeid !
42 rf.group !
8686 rf.freq !
rf-init
16 rf-power
100 ms
;

: rf-l ( -- )
begin
rf-recv ?dup if
rf.buf 0 + c@ h.2 space
rf.buf 1 + c@ h.2 space
rf.buf 2 + c@ h.2 cr
then
key? until
;

node-init 1000 ms cr rf-l


This is the output of the receiver:

82 01 37
83 01 37
84 01 37

The first byte of every line beeing the address of the receiver, (with parity bit $80), the second that of the sender and the third the payload ($37 == 55). Only the first line should be received by the node with ID 2? Or is there a stupid mistake from my side?

Supposing it could be a bug in the rf69-driver for the blue pill (I have an older version of rf69.fs, the new one does not work, "Error LED not found"), I tried it with a jn-zero as receiver, which has the driver build in, but the result was the same.

Could anyone help, please?