Git Product home page Git Product logo

Comments (14)

slater0013 avatar slater0013 commented on May 25, 2024

Waiting like a minute, I noticed one partly/received packet in debug mode in the middle of all messages.

I modified the radio.transmit with a shorter message :

int state = radio.transmit("GorD");

And now on the receiveing side :

R	75	1	
CMD	W	3A	0F
R	2	46	
W	2	46	
R	2	46	
CMD	W	34	0F
R	3F	4	
R	7	66	
R	3F	0	
R	7F	47	6F	72	66	
R	7	66	
R	3F	98	
R	3F	98	
R	17	30	
CMD	W	36	0F
R	75	1	
CMD	W	3A	0F
success!
[CC1101] Data:		Gorf
[CC1101] RSSI:		-126.00 dBm
[CC1101] LQI:		24
[CC1101] Waiting for incoming transmission ... CMD	W	36	0F
R	75	1	
CMD	W	3A	0F
R	2	46	
W	2	46	
R	2	46	
CMD	W	34	0F
CMD	W	36	1F
R	75	1	
CMD	W	3A	0F
failed, code -6

You can see that the message was slightly modified during transmission.

Tried again with "HelloWorld" string without the debug mode :

[CC1101] Waiting for incoming transmission ... failed, code -6
[CC1101] Waiting for incoming transmission ... success!
[CC1101] Data:		HelloWorlt
[CC1101] RSSI:		-106.00 dBm
[CC1101] LQI:		64
[CC1101] Waiting for incoming transmission ... failed, code -6
[CC1101] Waiting for incoming transmission ... failed, code -6
[CC1101] Waiting for incoming transmission ... success!
[CC1101] Data:		HelloWorlr
[CC1101] RSSI:		-105.50 dBm
[CC1101] LQI:		65
[CC1101] Waiting for incoming transmission ... failed, code -6
[CC1101] Waiting for incoming transmission ... failed, code -6
[CC1101] Waiting for incoming transmission ... failed, code -6

Could it be related to some "timing" problem like Rx window too short to get the entire message ?

GS

from radiolib.

jgromes avatar jgromes commented on May 25, 2024

Did you read what -6 means? It's shown here: https://jgromes.github.io/RadioLib/group__status__codes.html

-6 is RADIOLIB_ERR_RX_TIMEOUT, which is to be expected in blocking mode. I would suggest trying interrupt mode.

from radiolib.

slater0013 avatar slater0013 commented on May 25, 2024

Thanks @jgromes but are
https://github.com/jgromes/RadioLib/blob/master/examples/CC1101/CC1101_Receive_Address/
and
https://github.com/jgromes/RadioLib/tree/master/examples/CC1101/CC1101_Transmit_Address
dealing with blocking mode ? I juste copy/paste those 2 codes and modified the pinning at the beggining.

I can definitely give a try to the 2 other exemples
https://github.com/jgromes/RadioLib/tree/master/examples/CC1101/CC1101_Receive_Interrupt
and
https://github.com/jgromes/RadioLib/tree/master/examples/CC1101/CC1101_Transmit_Interrupt

if this is what you mean ?

GS.

from radiolib.

jgromes avatar jgromes commented on May 25, 2024

if this is what you mean ?

Yes, that's what I meant. I was under the impression that the CC1101 examples also included explanation of the timeouts in blocking mode, but apparently not. That's an oversight on my part, the examples should be clearer in this regard. The purpose of Receive_Address and Transmit_Address is only to showcase how to use addressing on CC1101. I guess a note to that effect in these and other examples would be useful.

from radiolib.

slater0013 avatar slater0013 commented on May 25, 2024

Ok, following your advice, tried to use the CC1101 interrupt exemples :

Juste copy/paste of the Tx and Rx files, just adapting the pinout regarding Arduino Nano and ESP32 boards.

Sending devices (Arduino Nano) seems to be ok :

[CC1101] Initializing ... 
RadioLib Debug Info
Version:  6.4.2.0[CC1101] Initializing ... 
RadioLib Debug Info
Version:  6.4.2.0
Platform: Arduino AVR
Compiled: Mar  4 2024 23:11:26

R	71	14	
M	CC1101
CMD	W	30	0F
CMD	W	36	0F
R	75	1	
R	18	4	
W	18	14	
R	18	14	
R	18	14	
W	18	14	
R	18	14	
R	2	3F	
W	2	2E	
R	2	2E	
R	0	29	
W	0	2E	
R	0	2E	
R	7	4	
W	7	4	
R	7	4	
R	8	45	
W	8	5	
R	8	5	
R	8	5	
W	8	5	
R	8	5	
CMD	W	36	0F
R	D	1E	
W	D	10	
R	D	10	
R	E	C4	
W	E	B5	
R	E	B5	
R	F	EC	
W	F	2B	
R	F	2B	
R	3E	C6	
W	3E	C0	
R	3E	C0	
CMD	W	36	0F
W	15	17	
R	15	17	
R	15	17	
W	15	14	
R	15	14	
R	3E	C0	
W	3E	C0	
R	3E	C0	
R	8	5	
W	8	5	
R	8	5	
R	6	FF	
W	6	3F	
R	6	3F	
R	7	4	
W	7	64	
R	7	64	
R	13	22	
W	13	2	
R	13	2	
CMD	W	36	0F
R	75	1	
R	12	2	
W	12	2	
R	12	2	
CMD	W	36	0F
R	75	1	
R	12	2	
W	12	2	
R	12	2	
R	8	5	
W	8	5	
R	8	5	
R	12	2	
W	12	2	
R	12	2	
R	4	D3	
W	4	12	
R	4	12	
R	5	91	
W	5	AD	
R	5	AD	
CMD	W	3A	0F
CMD	W	3B	0F
success!
[CC1101] Sending first packet ... CMD	W	36	0F
R	75	1	
CMD	W	3B	0F
R	0	2E	
W	0	6	
R	0	6	
W	3F	C	
R	7	64	
W	7F	48	65	6C	6C	6F	20	57	6F	72	6C	64	21	
CMD	W	35	0F
transmission finished!
CMD	W	36	0F
R	75	1	
CMD	W	3B	0F
[CC1101] Sending another packet ... CMD	W	36	0F
R	75	1	
CMD	W	3B	0F
R	0	6	
W	0	6	
R	0	6	
W	3F	F	
R	7	64	
W	7F	48	65	6C	6C	6F	20	57	6F	72	6C	64	21	20	23	30	
CMD	W	35	0F
transmission finished!

But On the receiving side (ESP32) a first empty message is received and then nothing. Even when the Tx device is off, rebooting the Rx device always shows a first empty message, strange...

23:36:40.776 -> �������������������������������CE+tL0�\���C�s�[CC1101] Initializing ... 
23:36:40.872 -> RadioLib Debug Info
23:36:40.903 -> Version:  6.4.2.0
23:36:40.936 -> Platform: ESP32
23:36:40.936 -> Compiled: Mar  4 2024 23:12:05
23:36:40.968 -> 
23:36:40.968 -> R	71	14	
23:36:40.968 -> M	CC1101
23:36:41.001 -> CMD	W	30	0F
23:36:41.132 -> CMD	W	36	0F
23:36:41.164 -> R	75	1	
23:36:41.164 -> R	18	4	
23:36:41.164 -> W	18	14	
23:36:41.164 -> R	18	14	
23:36:41.195 -> R	18	14	
23:36:41.195 -> W	18	14	
23:36:41.195 -> R	18	14	
23:36:41.227 -> R	2	3F	
23:36:41.227 -> W	2	2E	
23:36:41.227 -> R	2	2E	
23:36:41.227 -> R	0	29	
23:36:41.259 -> W	0	2E	
23:36:41.259 -> R	0	2E	
23:36:41.260 -> R	7	4	
23:36:41.260 -> W	7	4	
23:36:41.292 -> R	7	4	
23:36:41.292 -> R	8	45	
23:36:41.292 -> W	8	5	
23:36:41.292 -> R	8	5	
23:36:41.324 -> R	8	5	
23:36:41.324 -> W	8	5	
23:36:41.324 -> R	8	5	
23:36:41.324 -> CMD	W	36	0F
23:36:41.355 -> R	D	1E	
23:36:41.355 -> W	D	10	
23:36:41.355 -> R	D	10	
23:36:41.355 -> R	E	C4	
23:36:41.388 -> W	E	B5	
23:36:41.388 -> R	E	B5	
23:36:41.388 -> R	F	EC	
23:36:41.388 -> W	F	2B	
23:36:41.420 -> R	F	2B	
23:36:41.420 -> R	3E	C6	
23:36:41.420 -> W	3E	C0	
23:36:41.452 -> R	3E	C0	
23:36:41.452 -> CMD	W	36	0F
23:36:41.452 -> R	10	8C	
23:36:41.483 -> W	10	87	
23:36:41.483 -> R	10	87	
23:36:41.483 -> R	11	22	
23:36:41.483 -> W	11	83	
23:36:41.516 -> R	11	83	
23:36:41.516 -> CMD	W	36	0F
23:36:41.516 -> R	10	87	
23:36:41.548 -> W	10	F7	
23:36:41.548 -> R	10	F7	
23:36:41.548 -> CMD	W	36	0F
23:36:41.579 -> R	15	47	
23:36:41.579 -> W	15	17	
23:36:41.579 -> R	15	17	
23:36:41.612 -> R	15	17	
23:36:41.612 -> W	15	14	
23:36:41.612 -> R	15	14	
23:36:41.612 -> R	3E	C0	
23:36:41.644 -> W	3E	C0	
23:36:41.644 -> R	3E	C0	
23:36:41.644 -> R	8	5	
23:36:41.676 -> W	8	5	
23:36:41.676 -> R	8	5	
23:36:41.676 -> R	6	FF	
23:36:41.676 -> W	6	3F	
23:36:41.676 -> R	6	3F	
23:36:41.707 -> R	7	4	
23:36:41.707 -> W	7	64	
23:36:41.707 -> R	7	64	
23:36:41.740 -> R	13	22	
23:36:41.740 -> W	13	2	
23:36:41.740 -> R	13	2	
23:36:41.740 -> CMD	W	36	0F
23:36:41.772 -> R	75	1	
23:36:41.772 -> R	12	2	
23:36:41.772 -> W	12	2	
23:36:41.772 -> R	12	2	
23:36:41.803 -> CMD	W	36	0F
23:36:41.803 -> R	75	1	
23:36:41.803 -> R	12	2	
23:36:41.835 -> W	12	2	
23:36:41.835 -> R	12	2	
23:36:41.835 -> R	8	5	
23:36:41.835 -> W	8	5	
23:36:41.868 -> R	8	5	
23:36:41.868 -> R	12	2	
23:36:41.868 -> W	12	2	
23:36:41.868 -> R	12	2	
23:36:41.900 -> R	4	D3	
23:36:41.900 -> W	4	12	
23:36:41.900 -> R	4	12	
23:36:41.900 -> R	5	91	
23:36:41.931 -> W	5	AD	
23:36:41.931 -> R	5	AD	
23:36:41.931 -> CMD	W	3A	0F
23:36:41.964 -> CMD	W	3B	0F
23:36:41.964 -> success!
23:36:41.964 -> [CC1101] Starting to listen ... CMD	W	36	0F
23:36:42.027 -> R	75	1	
23:36:42.027 -> CMD	W	3A	0F
23:36:42.027 -> R	2	2E	
23:36:42.060 -> W	2	46	
23:36:42.060 -> R	2	46	
23:36:42.060 -> CMD	W	34	0F
23:36:42.092 -> success!
23:36:42.092 -> R	3F	0	
23:36:42.092 -> R	7	64	
23:36:42.092 -> R	7F	
23:36:42.124 -> R	7	64	
23:36:42.124 -> R	3F	14	
23:36:42.124 -> R	3F	80	
23:36:42.124 -> R	17	30	
23:36:42.156 -> CMD	W	36	1F
23:36:42.156 -> R	75	1	
23:36:42.156 -> CMD	W	3A	0F
23:36:42.188 -> [CC1101] Received packet!
23:36:42.220 -> [CC1101] Data:		
23:36:42.220 -> [CC1101] RSSI:		-64.00 dBm
23:36:42.253 -> [CC1101] LQI:		0
23:36:42.284 -> CMD	W	36	0F
23:36:42.284 -> R	75	1	
23:36:42.284 -> CMD	W	3A	0F
23:36:42.317 -> R	2	46	
23:36:42.317 -> W	2	46	
23:36:42.317 -> R	2	46	
23:36:42.350 -> CMD	W	34	0F

The comments states :

   To successfully receive data, the following settings have to be the same
   on both transmitter and receiver:
    - carrier frequency
    - bit rate
    - frequency deviation
    - sync word

But I guessed not changing anything to the default values would result in being the same values on both sides ! Am I right ?

I don't think my 434.0 MHz is saturated, but tried to switch to 433.300 MHz or 434.400 MHz with no more success :( But always the same empty packet when booting the Rx device.

Either Tx or Rx deivce (or both) is lying but how to debug... ?

thanks,
GS

from radiolib.

jgromes avatar jgromes commented on May 25, 2024

But On the receiving side (ESP32) a first empty message is received and then nothing

This seems to ring a bell, I think I saw a similar issue at one point. I'll try to replicate this. In the meantime, could you try swapping the transmitting and receiving side, so that Arduino Nano is te ereceiver? I'm assuming that by "Arduino Nano" you mean the old ATmega328P Nano, not one of the new ones.

from radiolib.

slater0013 avatar slater0013 commented on May 25, 2024

Ok, tried swapping the boards. (I can also test 2 ESP32 and 2 Nano if that's interesting) ! Yes, tha arduino nano is the old ATmega328P board.

Arduino Nano receiving side :

[CC1101] Initializing ... 
RadioLib Debug Info
Version:  6.4.2.0[CC1101] Initializing ... 
RadioLib Debug Info
Version:  6.4.2.0
Platform: Arduino AVR
Compiled: Mar  4 2024 23:11:26

R	71	14	
M	CC1101
CMD	W	30	0F
CMD	W	36	0F
R	75	1	
R	18	4	
W	18	14	
R	18	14	
R	18	14	
W	18	14	
R	18	14	
R	2	3F	
W	2	2E	
R	2	2E	
R	0	29	
W	0	2E	
R	0	2E	
R	7	4	
W	7	4	
R	7	4	
R	8	45	
W	8	5	
R	8	5	
R	8	5	
W	8	5	
R	8	5	
CMD	W	36	0F
R	D	1E	
W	D	10	
R	D	10	
R	E	C4	
W	E	B5	
R	E	B5	
R	F	EC	
W	F	2B	
R	F	2B	
R	3E	C6	
W	3E	C0	
R	3E	C0	
CMD	W	36	0F
R	10	8C	
W	10	87	
R	10	87	
R	11	22	
W	11	83	
R	11	83	
CMD	W	36	0F
R	10	87	
W	10	F7	
R	10	F7	
CMD	W	36	0F
R	15	47	
W	15	17	
R	15	17	
R	15	17	
W	15	14	
R	15	14	
R	3E	C0	
W	3E	C0	
R	3E	C0	
R	8	5	
W	8	5	
R	8	5	
R	6	FF	
W	6	3F	
R	6	3F	
R	7	4	
W	7	64	
R	7	64	
R	13	22	
W	13	2	
R	13	2	
CMD	W	36	0F
R	75	1	
R	12	2	
W	12	2	
R	12	2	
CMD	W	36	0F
R	75	1	
R	12	2	
W	12	2	
R	12	2	
R	8	5	
W	8	5	
R	8	5	
R	12	2	
W	12	2	
R	12	2	
R	4	D3	
W	4	12	
R	4	12	
R	5	91	
W	5	AD	
R	5	AD	
CMD	W	3A	0F
CMD	W	3B	0F
success!
[CC1101] Starting to listen ... CMD	W	36	0F
R	75	1	
CMD	W	3A	0F
R	2	2E	
W	2	46	
R	2	46	
CMD	W	34	0F
success!
```
No more empty packet at the begining. But... no packet even after :( 

ESP32 debug console (Tx device now) : 

```
[CC1101] Initializing ... 
RadioLib Debug Info
Version:  6.4.2.0
Platform: ESP32
Compiled: Mar  4 2024 23:12:05

R	71	14	
M	CC1101
CMD	W	30	0F
CMD	W	36	0F
R	75	1	
R	18	4	
W	18	14	
R	18	14	
R	18	14	
W	18	14	
R	18	14	
R	2	3F	
W	2	2E	
R	2	2E	
R	0	29	
W	0	2E	
R	0	2E	
R	7	4	
W	7	4	
R	7	4	
R	8	45	
W	8	5	
R	8	5	
R	8	5	
W	8	5	
R	8	5	
CMD	W	36	0F
R	D	1E	
W	D	10	
R	D	10	
R	E	C4	
W	E	B5	
R	E	B5	
R	F	EC	
W	F	2B	
R	F	2B	
R	3E	C6	
W	3E	C0	
R	3E	C0	
CMD	W	36	0F
R	10	8C	
W	10	87	
R	10	87	
R	11	22	
W	11	83	
R	11	83	
CMD	W	36	0F
R	10	87	
W	10	F7	
R	10	F7	
CMD	W	36	0F
R	15	47	
W	15	17	
R	15	17	
R	15	17	
W	15	14	
R	15	14	
R	3E	C0	
W	3E	C0	
R	3E	C0	
R	8	5	
W	8	5	
R	8	5	
R	6	FF	
W	6	3F	
R	6	3F	
R	7	4	
W	7	64	
R	7	64	
R	13	22	
W	13	2	
R	13	2	
CMD	W	36	0F
R	75	1	
R	12	2	
W	12	2	
R	12	2	
CMD	W	36	0F
R	75	1	
R	12	2	
W	12	2	
R	12	2	
R	8	5	
W	8	5	
R	8	5	
R	12	2	
W	12	2	
R	12	2	
R	4	D3	
W	4	12	
R	4	12	
R	5	91	
W	5	AD	
R	5	AD	
CMD	W	3A	0F
CMD	W	3B	0F
success!
[CC1101] Sending first packet ... CMD	W	36	0F
R	75	1	
CMD	W	3B	0F
R	0	2E	
W	0	6	
R	0	6	
W	3F	C	
R	7	64	
W	7F	48	65	6C	6C	6F	20	57	6F	72	6C	64	21	
CMD	W	35	0F
transmission finished!
CMD	W	36	0F
R	75	1	
CMD	W	3B	0F
[CC1101] Sending another packet ... CMD	W	36	0F
R	75	1	
CMD	W	3B	0F
R	0	6	
W	0	6	
R	0	6	
W	3F	F	
R	7	64	
W	7F	48	65	6C	6C	6F	20	57	6F	72	6C	64	21	20	23	30	
CMD	W	35	0F
transmission finished!
```

ESP32 keeps transmiting packet over and over every second.

GS.

from radiolib.

slater0013 avatar slater0013 commented on May 25, 2024

Ok just tried with 2 arduino nano boards. same thing. :(

from radiolib.

jgromes avatar jgromes commented on May 25, 2024

I tried to replicate this issue using an Arduino Uno, ESP32 and two CC1101s, and unfortunately I cannot replicate it. While there is sometimes an empty "packet" being received at the beginnig on ESP32 (which is the behavior I've seen before), after that, packets from Uno are received. I tested with CC1101_Transmit and CC1101_Receive_Interrupt examples with default CC1101 configuration, just changed pins.

One thing I forgot - are you using any logic level converter for the Arduino Nano? It's a 5V logic device, and the CC1101 does not tolerate 5V on its digital input pins (see the datasheet, the absolute maximum rating is VDD + 0.3 or 3.9V). Without that, you are damaging the device.

from radiolib.

slater0013 avatar slater0013 commented on May 25, 2024

Yes I use dedicated 3.3V output from nano board !
Do you think it could miss some power ? How do you power them ?

I ordered them from Ali (8pin connection) if you have any recommendation or a better designed module for what I need to do (simple remote control)…

Thanks,
GS

from radiolib.

jgromes avatar jgromes commented on May 25, 2024

I'm not talking about the power source, I'm talking about the votlage level on the Arduino digital pins. It sends out 5V signals, that exceeds the CC1101 maximum votlage rating of 3.9V. You need a logic level converter, such as this one: https://www.sparkfun.com/products/12009

Closing as I wasn't able to replicate the issue with neither Uno nor ESP32.

from radiolib.

slater0013 avatar slater0013 commented on May 25, 2024

Just one last comment, Arduino nano and ESP32 have 3V3 Pins, where I connect the modules.

from radiolib.

slater0013 avatar slater0013 commented on May 25, 2024

Awww... I think I just understand what you mean... I need to double check the datasheet ❌

from radiolib.

slater0013 avatar slater0013 commented on May 25, 2024

According to https://www.ebyte.com/en/downpdf.aspx?id=165

Communucation Level : 3.3V maxi (5V TTL It may be at risk of burning down)

oops... the first CC1101 I tested (SmartRC-CC1101) just have a warning at top Notes I did not read : A logic level converter is recommended for arduino. It also works well without. Use at your own risk.

My bad :(

from radiolib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.