natevw / node-nrf

Pure-JavaScript nRF24L01 driver library
117 stars 31 forks source link

Can't make a RPI chat with an Arduino #39

Closed pirquessa closed 9 years ago

pirquessa commented 9 years ago

Hi,

Thanks for your work on this lib !

I'm trying to make it works on a Raspberry PI 2 to chat with an Arduino for days now. I'm facing a problem with the RPI, I can't send data to the Arduino. I succeed to send data from the Arduino to the RPI.

I got the error "[Error: Packet timeout, transmit queue flushed.]" each time I try to write in the tx pipe.

You can find all my code here: https://github.com/pirquessa/RPI-and-Arduino-nRF24L01P.

Here are the details of the connection:

For the Arduino: arduino

For the Raspberry: rpi

Do you have any idea where can be the problem ?

Thanks a lot for your help.

natevw commented 9 years ago

So it looks like the Raspberry Pi does receive from the Arduino, at least once? Be careful that the bytes are probably reversed (https://github.com/natevw/node-nrf/issues/3) but it looks like you are already reading as if Big Endian to flip back.

Your settings look correct, but it looks like neither the acks nor the writes from the RPi are getting back to the Arduino. Could you try a few things to debug:

pirquessa commented 9 years ago

Tanks a lot for this quick answer !

Set CE low.
blocked for 130µs.
Set CE low.
blocked for 130µs.
execCommand FLUSH_TX 0
execCommand [ 'W_REGISTER', 5 ] [ 76 ]
execCommand FLUSH_RX 0
execCommand [ 'R_REGISTER', 6 ] 1
setStates { PWR_UP: true,
  PRIM_RX: false,
  EN_RXADDR: 0,
  RX_DR: true,
  TX_DS: true,
  MAX_RT: true,
  EN_DPL: true,
  EN_ACK_PAY: true,
  EN_DYN_ACK: true }
 - exec read: <SlowBuffer 42 05>
execCommand [ 'R_REGISTER', 6 ] 1
 - exec read: <SlowBuffer 4e 05>
execCommand [ 'R_REGISTER', 0 ] 1
 - exec read: <SlowBuffer 4e 0f>
execCommand [ 'R_REGISTER', 4 ] 1
 - exec read: <SlowBuffer 4e 03>
execCommand [ 'R_REGISTER', 0 ] 1
 - exec read: <SlowBuffer 4e 0f>
execCommand [ 'W_REGISTER', 0 ] [ 14 ]
blocked for 130µs.
execCommand [ 'W_REGISTER', 2 ] [ 0 ]
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 4e 4e>
execCommand [ 'W_REGISTER', 7 ] [ 126 ]
execCommand [ 'R_REGISTER', 29 ] 1
 - exec read: <SlowBuffer 0e 07>
setStates { AW: 3,
  PRIM_RX: true,
  RX_ADDR_P1: <Buffer f0 f0 f0 f0 e1>,
  ERX_P1: true,
  ENAA_P1: true,
  DPL_P1: true }
setStates { AW: 3,
  RX_ADDR_P0: <Buffer f0 f0 f0 f0 d2>,
  ERX_P0: true,
  ENAA_P0: true,
  DPL_P0: true }
_checkStatus, irq = false checking = false
execCommand [ 'R_REGISTER', 0 ] 1
 - exec read: <SlowBuffer 0e 0e>
execCommand [ 'W_REGISTER', 0 ] [ 15 ]
blocked for 130µs.
execCommand [ 'R_REGISTER', 1 ] 1
 - exec read: <SlowBuffer 0e 3f>
execCommand [ 'R_REGISTER', 2 ] 1
 - exec read: <SlowBuffer 0e 00>
execCommand [ 'W_REGISTER', 2 ] [ 2 ]
execCommand [ 'R_REGISTER', 3 ] 1
 - exec read: <SlowBuffer 0e 03>
execCommand [ 'W_REGISTER', 11 ] <Buffer f0 f0 f0 f0 e1>
execCommand [ 'R_REGISTER', 28 ] 1
 - exec read: <SlowBuffer 0e 03>
Set CE true.
blocked for 130µs.
execCommand [ 'R_REGISTER', 1 ] 1
 - exec read: <SlowBuffer 0e 3f>
execCommand [ 'R_REGISTER', 2 ] 1
 - exec read: <SlowBuffer 0e 02>
execCommand [ 'W_REGISTER', 2 ] [ 3 ]
execCommand [ 'R_REGISTER', 3 ] 1
 - exec read: <SlowBuffer 0e 03>
execCommand [ 'W_REGISTER', 10 ] <Buffer f0 f0 f0 f0 d2>
execCommand [ 'R_REGISTER', 28 ] 1
 - exec read: <SlowBuffer 0e 03>
TX Ready
SPI device:  /dev/spidev0.0
CE GPIO:     24
IRQ GPIO:    25
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 0e 0e>
gotStates { RX_P_NO: 7, TX_DS: 0, MAX_RT: 0, RX_DR: 0 } null
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 0e 0e>
execCommand [ 'R_REGISTER', 23 ] 1
 - exec read: <SlowBuffer 0e 11>
gotStates { RX_DR: 0,
  TX_DS: 0,
  MAX_RT: 0,
  RX_P_NO: 7,
  STATUS: <Buffer 0e>,
  TX_FULL: 0 } null
STATUS:      0xe RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
execCommand [ 'R_REGISTER', 10 ] 5
 - exec read: <SlowBuffer 0e d2 f0 f0 f0 f0>
execCommand [ 'R_REGISTER', 11 ] 5
 - exec read: <SlowBuffer 0e e1 f0 f0 f0 f0>
execCommand [ 'R_REGISTER', 12 ] 1
 - exec read: <SlowBuffer 0e c3>
execCommand [ 'R_REGISTER', 13 ] 1
 - exec read: <SlowBuffer 0e c4>
execCommand [ 'R_REGISTER', 14 ] 1
 - exec read: <SlowBuffer 0e c5>
execCommand [ 'R_REGISTER', 15 ] 1
 - exec read: <SlowBuffer 0e c6>
execCommand [ 'R_REGISTER', 16 ] 5
 - exec read: <SlowBuffer 0e e7 e7 e7 e7 e7>
gotStates { RX_ADDR_P0: <Buffer f0 f0 f0 f0 d2>,
  RX_ADDR_P1: <Buffer f0 f0 f0 f0 e1>,
  RX_ADDR_P2: <Buffer c3>,
  RX_ADDR_P3: <Buffer c4>,
  RX_ADDR_P4: <Buffer c5>,
  RX_ADDR_P5: <Buffer c6>,
  TX_ADDR: <Buffer e7 e7 e7 e7 e7> } null
RX_ADDR_P0–1:  0xf0f0f0f0d2 0xf0f0f0f0e1
RX_ADDR_P2–5:  0xc3 0xc4 0xc5 0xc6
TX_ADDR:     0xe7e7e7e7e7
execCommand [ 'R_REGISTER', 17 ] 1
 - exec read: <SlowBuffer 0e 00>
execCommand [ 'R_REGISTER', 18 ] 1
 - exec read: <SlowBuffer 0e 00>
execCommand [ 'R_REGISTER', 19 ] 1
 - exec read: <SlowBuffer 0e 00>
execCommand [ 'R_REGISTER', 20 ] 1
 - exec read: <SlowBuffer 0e 00>
execCommand [ 'R_REGISTER', 21 ] 1
 - exec read: <SlowBuffer 0e 00>
execCommand [ 'R_REGISTER', 22 ] 1
 - exec read: <SlowBuffer 0e 00>
gotStates { RX_PW_P0: 0,
  RX_PW_P1: 0,
  RX_PW_P2: 0,
  RX_PW_P3: 0,
  RX_PW_P4: 0,
  RX_PW_P5: 0 } null
RX_PW_P0–5:    0x0 0x0 0x0 0x0 0x0 0x0
execCommand [ 'R_REGISTER', 0 ] 1
 - exec read: <SlowBuffer 0e 0f>
execCommand [ 'R_REGISTER', 1 ] 1
 - exec read: <SlowBuffer 0e 3f>
execCommand [ 'R_REGISTER', 2 ] 1
 - exec read: <SlowBuffer 0e 03>
execCommand [ 'R_REGISTER', 5 ] 1
 - exec read: <SlowBuffer 0e 4c>
execCommand [ 'R_REGISTER', 6 ] 1
 - exec read: <SlowBuffer 0e 05>
execCommand [ 'R_REGISTER', 28 ] 1
 - exec read: <SlowBuffer 0e 03>
execCommand [ 'R_REGISTER', 29 ] 1
 - exec read: <SlowBuffer 0e 07>
gotStates { CONFIG: <Buffer 0f>,
  EN_AA: <Buffer 3f>,
  EN_RXADDR: <Buffer 03>,
  RF_CH: 76,
  RF_SETUP: <Buffer 05>,
  DYNPD: <Buffer 03>,
  FEATURE: <Buffer 07> } null
EN_AA:       0x3f
EN_RXADDR:   0x03
RF_CH:       0x4c
RF_SETUP:    0x05
CONFIG:      0x0f
DYNPD/FEATURE:   0x03 0x07
execCommand [ 'R_REGISTER', 0 ] 1
 - exec read: <SlowBuffer 0e 0f>
execCommand [ 'R_REGISTER', 6 ] 1
 - exec read: <SlowBuffer 0e 05>
gotStates { EN_CRC: 1, CRCO: 1, RF_DR_LOW: 0, RF_DR_HIGH: 0, RF_PWR: 2 } null
setStates { RF_DR_LOW: true }
execCommand [ 'R_REGISTER', 6 ] 1
 - exec read: <SlowBuffer 0e 05>
execCommand [ 'W_REGISTER', 6 ] [ 37 ]
execCommand [ 'R_REGISTER', 6 ] 1
 - exec read: <SlowBuffer 0e 25>
gotStates { RF_DR_LOW: 1 } null
setStates { RF_DR_LOW: false }
execCommand [ 'R_REGISTER', 6 ] 1
 - exec read: <SlowBuffer 0e 25>
execCommand [ 'W_REGISTER', 6 ] [ 5 ]
Data Rate:   1Mbps
Model:       nRF24L01+
CRC Length:  16 bits
PA Power:    PA_HIGH
_checkStatus, irq = true checking = false
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 42 42>
gotStates { RX_P_NO: 1, TX_DS: 0, MAX_RT: 0, RX_DR: 1 } null
IRQ. { RX_P_NO: 1, TX_DS: 0, MAX_RT: 0, RX_DR: 1 }
execCommand R_RX_PL_WID 1
 - exec read: <SlowBuffer 42 04>
execCommand R_RX_PAYLOAD 4
 - exec read: <SlowBuffer 42 d0 4b 08 00>
setStates { RX_DR: true, TX_DS: false, MAX_RT: false }
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 4e 4e>
execCommand [ 'W_REGISTER', 7 ] [ 78 ]
_checkStatus, irq = false checking = false
Radio data:  543696
_checkStatus, irq = false checking = true
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 0e 0e>
gotStates { RX_P_NO: 7, TX_DS: 0, MAX_RT: 0, RX_DR: 0 } null
_checkStatus, irq = true checking = false
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 42 42>
gotStates { RX_P_NO: 1, TX_DS: 0, MAX_RT: 0, RX_DR: 1 } null
IRQ. { RX_P_NO: 1, TX_DS: 0, MAX_RT: 0, RX_DR: 1 }
execCommand R_RX_PL_WID 1
 - exec read: <SlowBuffer 42 04>
execCommand R_RX_PAYLOAD 4
 - exec read: <SlowBuffer 42 be 4e 08 00>
setStates { RX_DR: true, TX_DS: false, MAX_RT: false }
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 4e 4e>
execCommand [ 'W_REGISTER', 7 ] [ 78 ]
_checkStatus, irq = false checking = false
Radio data:  544446
_checkStatus, irq = false checking = true
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 0e 0e>
gotStates { RX_P_NO: 7, TX_DS: 0, MAX_RT: 0, RX_DR: 0 } null
_checkStatus, irq = true checking = false
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 42 42>
gotStates { RX_P_NO: 1, TX_DS: 0, MAX_RT: 0, RX_DR: 1 } null
IRQ. { RX_P_NO: 1, TX_DS: 0, MAX_RT: 0, RX_DR: 1 }
execCommand R_RX_PL_WID 1
 - exec read: <SlowBuffer 42 04>
execCommand R_RX_PAYLOAD 4
 - exec read: <SlowBuffer 42 ab 51 08 00>
setStates { RX_DR: true, TX_DS: false, MAX_RT: false }
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 4e 4e>
execCommand [ 'W_REGISTER', 7 ] [ 78 ]
_checkStatus, irq = false checking = false

This is what I get when I answered (line 15 uncommented):

Set CE low.
blocked for 130µs.
Set CE low.
blocked for 130µs.
execCommand FLUSH_TX 0
execCommand [ 'W_REGISTER', 5 ] [ 76 ]
execCommand FLUSH_RX 0
execCommand [ 'R_REGISTER', 6 ] 1
setStates { PWR_UP: true,
  PRIM_RX: false,
  EN_RXADDR: 0,
  RX_DR: true,
  TX_DS: true,
  MAX_RT: true,
  EN_DPL: true,
  EN_ACK_PAY: true,
  EN_DYN_ACK: true }
 - exec read: <SlowBuffer 0e 05>
execCommand [ 'R_REGISTER', 6 ] 1
 - exec read: <SlowBuffer 0e 05>
execCommand [ 'R_REGISTER', 0 ] 1
 - exec read: <SlowBuffer 0e 0e>
execCommand [ 'R_REGISTER', 4 ] 1
 - exec read: <SlowBuffer 0e 03>
execCommand [ 'R_REGISTER', 0 ] 1
 - exec read: <SlowBuffer 0e 0e>
execCommand [ 'W_REGISTER', 2 ] [ 0 ]
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 0e 0e>
execCommand [ 'W_REGISTER', 7 ] [ 126 ]
execCommand [ 'R_REGISTER', 29 ] 1
 - exec read: <SlowBuffer 0e 07>
setStates { AW: 3,
  PRIM_RX: true,
  RX_ADDR_P1: <Buffer f0 f0 f0 f0 e1>,
  ERX_P1: true,
  ENAA_P1: true,
  DPL_P1: true }
setStates { AW: 3,
  RX_ADDR_P0: <Buffer f0 f0 f0 f0 d2>,
  ERX_P0: true,
  ENAA_P0: true,
  DPL_P0: true }
_checkStatus, irq = false checking = false
execCommand [ 'R_REGISTER', 0 ] 1
 - exec read: <SlowBuffer 0e 0e>
execCommand [ 'W_REGISTER', 0 ] [ 15 ]
blocked for 130µs.
execCommand [ 'R_REGISTER', 1 ] 1
 - exec read: <SlowBuffer 0e 3f>
execCommand [ 'R_REGISTER', 2 ] 1
 - exec read: <SlowBuffer 0e 00>
execCommand [ 'W_REGISTER', 2 ] [ 2 ]
execCommand [ 'R_REGISTER', 3 ] 1
 - exec read: <SlowBuffer 0e 03>
execCommand [ 'W_REGISTER', 11 ] <Buffer f0 f0 f0 f0 e1>
execCommand [ 'R_REGISTER', 28 ] 1
 - exec read: <SlowBuffer 0e 03>
Set CE true.
blocked for 130µs.
execCommand [ 'R_REGISTER', 1 ] 1
 - exec read: <SlowBuffer 0e 3f>
execCommand [ 'R_REGISTER', 2 ] 1
 - exec read: <SlowBuffer 0e 02>
execCommand [ 'W_REGISTER', 2 ] [ 3 ]
execCommand [ 'R_REGISTER', 3 ] 1
 - exec read: <SlowBuffer 0e 03>
execCommand [ 'W_REGISTER', 10 ] <Buffer f0 f0 f0 f0 d2>
execCommand [ 'R_REGISTER', 28 ] 1
 - exec read: <SlowBuffer 0e 03>
TX Ready
SPI device:  /dev/spidev0.0
CE GPIO:     24
IRQ GPIO:    25
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 0e 0e>
gotStates { RX_P_NO: 7, TX_DS: 0, MAX_RT: 0, RX_DR: 0 } null
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 0e 0e>
execCommand [ 'R_REGISTER', 23 ] 1
 - exec read: <SlowBuffer 0e 11>
gotStates { RX_DR: 0,
  TX_DS: 0,
  MAX_RT: 0,
  RX_P_NO: 7,
  STATUS: <Buffer 0e>,
  TX_FULL: 0 } null
STATUS:      0xe RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
execCommand [ 'R_REGISTER', 10 ] 5
 - exec read: <SlowBuffer 0e d2 f0 f0 f0 f0>
execCommand [ 'R_REGISTER', 11 ] 5
 - exec read: <SlowBuffer 0e e1 f0 f0 f0 f0>
execCommand [ 'R_REGISTER', 12 ] 1
 - exec read: <SlowBuffer 0e c3>
execCommand [ 'R_REGISTER', 13 ] 1
 - exec read: <SlowBuffer 0e c4>
execCommand [ 'R_REGISTER', 14 ] 1
 - exec read: <SlowBuffer 0e c5>
execCommand [ 'R_REGISTER', 15 ] 1
 - exec read: <SlowBuffer 0e c6>
execCommand [ 'R_REGISTER', 16 ] 5
 - exec read: <SlowBuffer 0e d2 f0 f0 f0 f0>
gotStates { RX_ADDR_P0: <Buffer f0 f0 f0 f0 d2>,
  RX_ADDR_P1: <Buffer f0 f0 f0 f0 e1>,
  RX_ADDR_P2: <Buffer c3>,
  RX_ADDR_P3: <Buffer c4>,
  RX_ADDR_P4: <Buffer c5>,
  RX_ADDR_P5: <Buffer c6>,
  TX_ADDR: <Buffer f0 f0 f0 f0 d2> } null
RX_ADDR_P0–1:  0xf0f0f0f0d2 0xf0f0f0f0e1
RX_ADDR_P2–5:  0xc3 0xc4 0xc5 0xc6
TX_ADDR:     0xf0f0f0f0d2
execCommand [ 'R_REGISTER', 17 ] 1
 - exec read: <SlowBuffer 0e 00>
execCommand [ 'R_REGISTER', 18 ] 1
 - exec read: <SlowBuffer 0e 00>
execCommand [ 'R_REGISTER', 19 ] 1
 - exec read: <SlowBuffer 0e 00>
execCommand [ 'R_REGISTER', 20 ] 1
 - exec read: <SlowBuffer 0e 00>
execCommand [ 'R_REGISTER', 21 ] 1
 - exec read: <SlowBuffer 0e 00>
execCommand [ 'R_REGISTER', 22 ] 1
 - exec read: <SlowBuffer 0e 00>
gotStates { RX_PW_P0: 0,
  RX_PW_P1: 0,
  RX_PW_P2: 0,
  RX_PW_P3: 0,
  RX_PW_P4: 0,
  RX_PW_P5: 0 } null
RX_PW_P0–5:    0x0 0x0 0x0 0x0 0x0 0x0
execCommand [ 'R_REGISTER', 0 ] 1
 - exec read: <SlowBuffer 0e 0f>
execCommand [ 'R_REGISTER', 1 ] 1
 - exec read: <SlowBuffer 0e 3f>
execCommand [ 'R_REGISTER', 2 ] 1
 - exec read: <SlowBuffer 0e 03>
execCommand [ 'R_REGISTER', 5 ] 1
 - exec read: <SlowBuffer 0e 4c>
execCommand [ 'R_REGISTER', 6 ] 1
 - exec read: <SlowBuffer 0e 05>
execCommand [ 'R_REGISTER', 28 ] 1
 - exec read: <SlowBuffer 0e 03>
execCommand [ 'R_REGISTER', 29 ] 1
 - exec read: <SlowBuffer 0e 07>
gotStates { CONFIG: <Buffer 0f>,
  EN_AA: <Buffer 3f>,
  EN_RXADDR: <Buffer 03>,
  RF_CH: 76,
  RF_SETUP: <Buffer 05>,
  DYNPD: <Buffer 03>,
  FEATURE: <Buffer 07> } null
EN_AA:       0x3f
EN_RXADDR:   0x03
RF_CH:       0x4c
RF_SETUP:    0x05
CONFIG:      0x0f
DYNPD/FEATURE:   0x03 0x07
execCommand [ 'R_REGISTER', 0 ] 1
 - exec read: <SlowBuffer 0e 0f>
execCommand [ 'R_REGISTER', 6 ] 1
 - exec read: <SlowBuffer 0e 05>
gotStates { EN_CRC: 1, CRCO: 1, RF_DR_LOW: 0, RF_DR_HIGH: 0, RF_PWR: 2 } null
setStates { RF_DR_LOW: true }
execCommand [ 'R_REGISTER', 6 ] 1
 - exec read: <SlowBuffer 0e 05>
execCommand [ 'W_REGISTER', 6 ] [ 37 ]
execCommand [ 'R_REGISTER', 6 ] 1
 - exec read: <SlowBuffer 0e 25>
gotStates { RF_DR_LOW: 1 } null
setStates { RF_DR_LOW: false }
execCommand [ 'R_REGISTER', 6 ] 1
 - exec read: <SlowBuffer 0e 25>
execCommand [ 'W_REGISTER', 6 ] [ 5 ]
Data Rate:   1Mbps
Model:       nRF24L01+
CRC Length:  16 bits
PA Power:    PA_HIGH
_checkStatus, irq = true checking = false
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 42 42>
gotStates { RX_P_NO: 1, TX_DS: 0, MAX_RT: 0, RX_DR: 1 } null
IRQ. { RX_P_NO: 1, TX_DS: 0, MAX_RT: 0, RX_DR: 1 }
execCommand R_RX_PL_WID 1
 - exec read: <SlowBuffer 42 04>
execCommand R_RX_PAYLOAD 4
 - exec read: <SlowBuffer 42 5f ef 0c 00>
setStates { RX_DR: true, TX_DS: false, MAX_RT: false }
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 4e 4e>
execCommand [ 'W_REGISTER', 7 ] [ 78 ]
_checkStatus, irq = false checking = false
Radio data:  847711
Set CE low.
setStates { TX_ADDR: <Buffer f0 f0 f0 f0 d2>,
  PRIM_RX: false,
  RX_ADDR_P0: <Buffer f0 f0 f0 f0 d2> }
_checkStatus, irq = false checking = true
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 0e 0e>
gotStates { RX_P_NO: 7, TX_DS: 0, MAX_RT: 0, RX_DR: 0 } null
execCommand [ 'R_REGISTER', 0 ] 1
 - exec read: <SlowBuffer 0e 0f>
execCommand [ 'W_REGISTER', 0 ] [ 14 ]
blocked for 130µs.
execCommand [ 'W_REGISTER', 10 ] <Buffer f0 f0 f0 f0 d2>
execCommand [ 'W_REGISTER', 16 ] <Buffer f0 f0 f0 f0 d2>
execCommand W_TX_PAYLOAD <Buffer 00 0c ef 5f>
Set CE true.
blocked for 10µs.
Set CE false.
blocked for 4µs.
_checkStatus, irq = true checking = false
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 1e 1e>
gotStates { RX_P_NO: 7, TX_DS: 0, MAX_RT: 1, RX_DR: 0 } null
IRQ. { RX_P_NO: 7, TX_DS: 0, MAX_RT: 1, RX_DR: 0 }
execCommand FLUSH_TX 0
setStates { TX_DS: true, MAX_RT: true, RX_DR: false }
execCommand [ 'R_REGISTER', 7 ] 1
 - exec read: <SlowBuffer 1e 1e>
execCommand [ 'W_REGISTER', 7 ] [ 62 ]
Error sending:  [Error: Packet timeout, transmit queue flushed.]

I hope it will help you to understand my problem, I don't understand what it means :/

pirquessa commented 9 years ago

Hi,

Since you supposed that the RF module could switch too early to write mode, I try to delay a little bit the tx.write like that:

setTimeout(function(){
    tx.write(d);
}, 15);

It does not change anything :(

pirquessa commented 9 years ago

I just add my wiring in my repo if it can help...

pistoletov1974 commented 9 years ago

In my case (2 arduinos) and arduino+ cubieboard. Help capacitor on VCC and GND 47mF on nrf module

pirquessa commented 9 years ago

Here my 2 rf modules are really close. I thought the capacitor would only help to improve range... Is that wrong?

pistoletov1974 commented 9 years ago

Hi! In my case with capasitor the modules become connected. Without capasitors was no ping on approximately 1 meter distance.

pirquessa commented 9 years ago

Well I tried my two modules on two Arduinos, one is still not able to send data. The problem must be with one of the module that can't send or the other that can't receive. I've ordered a new module and some capacitors, I'll try both solutions...

pirquessa commented 9 years ago

Well, I finaly find some capacitor.

I went back to basic and test the modules with two arduinos (GettingStarted exemple). It really help to add capacitors (47uF) ! One of the module works well to send & receive data. The other send & receive too but when it send the data with "bool ok = radio.write( &time, sizeof(unsigned long) );", the bool ok is never true but the other module get the data and answer. It's strange.

pirquessa commented 9 years ago

\o/ I can send data to the Arduino from the RPI ! \o/

Thanks again for your lib !

Is there a way to be sure that the data has been well received ? Sometime the Arduino fail to decode the data :(