Comments (8)
Aah ok, what I read from that is the more the bit pattern differs from the preamble, the easier it is for the receiver to calibrate to the signal. And if the first part of the byte is already different, that should be sufficient for the reader to do that.
from rf24.
Exactly. Hope you don't mind if I close this issue now.
from rf24.
There's a little more to it. Arrays in C++, like an array of characters (aka string), are stored in memory using little endian. Fortunately, the nRF24L01 expects the address (& payloads) to be transferred over SPI in little endian... Essentially, "1Node"
is stored is as 0x65646F4E31
. This is why printDetails()
(and printPrettyDetails()
) outputs the addresses bytes backwards:
>>> from pyrf24 import RF24
>>> radio = RF24(22, 0)
>>> radio.begin()
True
>>> radio.openReadingPipe(1, b"1Node")
>>> radio.printPrettyDetails()
# [... omitted data for brevity ...]
TX address = 0x65646f4e31
pipe 0 ( open ) bound = 0x65646f5555
pipe 1 ( open ) bound = 0x65646f4e31
pipe 2 (closed) bound = 0x0a
pipe 3 (closed) bound = 0xa0
pipe 4 (closed) bound = 0x00
pipe 5 (closed) bound = 0xab
to see it binary (again using python for brevity)
>>> address = b'edoN1'
>>> [bin(x) for x in address]
['0b1100101', '0b1100100', '0b1101111', '0b1001110', '0b110001']
so
char | binary |
---|---|
e |
01100101 |
d |
01100100 |
o |
01101111 |
N |
01001110 |
1 |
00110001 |
Given that 1
in binary starts with a 0011
, it is not as problematic as anything that starts with a 1010
or 0101
.
I would be more concerned with addresses that start with T
>>> bin(b'T'[0])
'0b1010100'
from rf24.
Also, note the scanner examples use the worst possible addresses (with an unofficially supported length of 2 bytes) on purpose:
RF24/examples_linux/scanner.py
Lines 30 to 40 in 5d645ae
This why my output above has
0x55
set to pipe 0 MSB because I last ran the scanner example for testing.from rf24.
wow, fast response :-) thx.
Is the letter 'e' not as problematic because only the last nibble is 0101 ? The article only mentioned to not use these four nibbles.
from rf24.
Is the letter 'e' not as problematic because only the last nibble is 0101 ?
No, because it starts with a 0110
. In general, anything that starts with a repeating and alternating pattern of 1 and 0. should be avoided. Recall what the datasheet says:
7.3.1 Preamble
The preamble is a bit sequence used to synchronize the receivers demodulator to the incoming bit stream. The preamble is one byte long and is either 01010101 or 10101010. If the first bit in the address is 1 the preamble is automatically set to 10101010 and if the first bit is 0 the preamble is automatically set to 01010101. This is done to ensure there are enough transitions in the preamble to stabilize the receiver.
The article that the docs link to is a bit more empirical as it is written from observations/experiments.
from rf24.
Other radio's may actually use a 2-byte (or more) preamble. IIRC, the RFM69 uses 2-4 byte preambles, but they are sub-GHz transceivers (so they might require longer time to demodulate signals seen from the antenna).
from rf24.
Sure, thanks for the fast detailed explanation!
from rf24.
Related Issues (20)
- reorganize examples HOT 5
- revise MRAA driver's GPIO
- Phasing out most Linux drivers HOT 1
- Library blocks 11 pin HOT 1
- Unable to use SPI1 on the raspberry pi pico HOT 3
- NRF24L01 does not show all characters in the receiver HOT 4
- Problem using stopListening() and startListening() HOT 3
- [Question] Some modules take way longer to write() HOT 6
- can't find RF24 method inside RF24 module HOT 18
- Change `SERIAL_DEBUG` into `RF24_DEBUG` HOT 7
- Trouble with receiving data on RP2040 HOT 1
- CE set LOW twice consecutively in `startConstantCarrier()` HOT 1
- NRF24s not Working with Arduino UNO or Pro Mini but do on ESP8266 HOT 9
- [Question]: PICO's not communicating HOT 3
- Not setting channels or data rate properly HOT 7
- Problem with communicating to the module HOT 5
- [Question]: Pico fails to transmit HOT 8
- FHSS HOT 27
- Get Signal Strength HOT 3
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 rf24.