Comments (17)
When you got MAX_RT bit set after transmit, this means what the nRF24 did not received an ACK packet from the receiver side.
The reasons can be: poor reception, incorrectly configured receiver, etc.
As for receiver configuration: if you use the auto acknowledgement, then you must properly configure the PIPE#0 on the receiver side (address of the transmitter for auto ack, transmit power).
And this "library" (if you use the one from the "Nrf24l01" directory in that repo) is very old and contains some nasty errors. Didn't remember all of them, but the royal one is that the address is programmed in reverse order, e.g. if you program it as "12345", then actually in the nRF24 it will be "54321" and if your receiver side is configured by other soft (what programs the address correctly), nothing will work.
In the "stm32l151rdt6-dev" directory present more recent nrf24.c, but I don't like it too. I have more decent "library" for nRF24, but I've not uploaded it to github yet. It needs an usage example, but right now I don't have free time for it.
from stm32.
I've re-uploaded the nRF24 project with new library and some stupid demo code (TX and RX). Look at it, maybe it will be useful. I've especially got my old good F103 boards and write a demo code using SPL...
I've tried to write this library 'hardware-independent', with purpose of moving to other platform with minimal code changes. So far it worked on STM32L151, STM32L476, STM32F103, STM8L151 and Raspberry Pi3 (not by me)...
On the STM32 I can note one issue: when your CPU is really fast and the SPI speed is really slow, the code can fail due to early CSN pin de-assertion (while the SPI clock didn't finished last bit transmission). Maybe the CSN pin handling should be removed from nRF24 code... maybe other solution... I don't know yet. Arghhh... my pidgin english, I can't describe that issue properly :)
from stm32.
On the receiver part, have you set a correct transmit power level? Because default it is at the lowest value. Imagine situation: your TX part transmits at 0dBm (yelling), the RX part receives the packet, automatically switches to TX mode and replies with ACK packet at the -18dBm (whispers). As a result your transmitter did not hears the answer and retransmits the packet...
from stm32.
And one more thing comes to mind: on the receiver side, have you configured address for pipe#0 same as address on the TX side? The ShockBurst retransmits ACK packets using address of pipe#0.
from stm32.
I've played with ShockBurst, added a couple of functions for better handling of that feature. All working. Look at examples, if it doesn't help - RTFM (really, read datasheet, it written pretty good).
from stm32.
I'm not familiar with C++ and not shure what you want to do, but if it will be something usefull... it will be great. Let's see :)
from stm32.
it contains a lots of errors in transmit methods , i try to fix it but still has errors could you please upload the other lib you have ?
from stm32.
it's great thank you , i'm going to test it.
from stm32.
it works , but when I want to test it with Auto-ACK mode enable the receiver only received once and the transmitter got [1E] MAX RETRANSMIT ! why ? i just comment //nRF24_DisableAA(); in DEMO_TX_SINGLE section and comment nRF24_DisableAA(); and set nRF24_SetRXPipe to nRF24_AA_ON in DEMO_RX_SINGLE section ! do I need change something else to enable Auto-ACK in tx and rx single mode ?
from stm32.
I added nRF24_SetTXPower(nRF24_TXPWR_0dBm); to receiver section but it doesn't affect , however the transmitter and receiver are very close , I think there is a issue in the code ?
from stm32.
LOL, how can I say why it isn't working when I didn't see of your code neither hardware...
Later I will try ShockBurst on my hardware...
But take a little advice: forget about ShockBurst, it's pretty useless, slow and greedy for the power.
from stm32.
about code I use exactly your sample code , and about hardware I use simple STM32F103RET6 training board just to test NRF module and about ShockBurst I just want to use Auto-ACK mode to ensure the success of transmission .
from stm32.
Thank you for this ;) I really appreciate
from stm32.
Ok
from stm32.
Looks good, but I'm not familiar with the C++, so can't judge about it :)
So... what I've supposed to do?
from stm32.
No, I don't want to share my contacts :)
from stm32.
Ok , thank you ;)
from stm32.
Related Issues (18)
- codebase HOT 3
- What is the code license ? HOT 2
- Перевод sd card в high-speed mode HOT 3
- code HOT 1
- Stm32f103c8t6 DMA HOT 1
- Small issue with the nrf24l01 example polling transmitter code HOT 1
- Issue with the way that the nrf24l01 library writes the address HOT 1
- Read operation: pls add reference to datasheet. Chapter 4.8.2, page 19
- Don't do check for TRUE or FALSE at this place
- nRF24_ReadPayload for Dynamic Payload
- ls027b7dh01 blank display HOT 2
- idea: make it easier to determine if radio is working at all HOT 1
- We cannot select the port in the provided library HOT 2
- The usb-mic project hard fault HOT 1
- errors HOT 18
- wrong time DS3231 HOT 3
- error in delay function HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stm32.