简体   繁体   中英

nRF24 - data received but not whole message

Here is the setup. Arduino #1 has a w5100 ethernet shield running a webserver accepting GET strings. It then parses out the data and sends it wirelessly to the other nodes using nRF24l10 transceivers. I'm using maniacbug's RF24 and RF24Network libraries. Also due to having the ethernet shield and the wireless I had to use a modified RF24 for the base that supports soft SPI.

Arduino #2 is just the nRF24L10.

What is working. Sending GET's to Arduino #1 works. It parses the information. It then calls the send routine and that says it's ok.

On arduino #2 I get a "Received:" printout but no message. I'm not sure what is wrong. The code is taken right from maniacbug's tx and rx example. Except I had to convert my sendString to a char to send.

I'm wondering if it's one of the following things but I'm not quite sure how to debug.

  1. That the addition of the RF24Network library broke the softSPI. I've been very careful to remove one libray and add the other when I compile. Though if this were the case I'd never see the "Received:" would i?

  2. It doesn't like my conversion from string to char?

Here is the code.

Base Station: http://pastebin.com/Ehy8pz4Z Receiver : http://pastebin.com/2mz9FjsR

Here is the modified RF24+ softspi library. https://github.com/shnae/rf24_plus_softSPI if that helps.

I don't think just adding the nrf24network library breaks that but since it calls SPI.begin() it might. That's beyond my skillset..

So as it turns out you need to put network.update(); in loop.... If you only call it per request like I did it will not work. Hence the //do this regularly comment that you see for this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM