Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pin connection #1

Open
Bob1237 opened this issue Dec 7, 2017 · 8 comments
Open

pin connection #1

Bob1237 opened this issue Dec 7, 2017 · 8 comments

Comments

@Bob1237
Copy link

Bob1237 commented Dec 7, 2017

Hello

Thanks for sharing your code.
Quick question what GPIO pin of the raspberry pi do you use to connect to the GDIO2 and GDIO0 of the cc1101 module.
Do you know what the problem could be as i get this as an outcome for transmitting:

outcomerror

@ghost
Copy link

ghost commented Dec 29, 2017

Hi Bob1237,

I'm using a Pi B+ with the pins connected as below. As far as I am aware GDIO2 is not essential for basic operation. The below pin config is working perfectly

pin 1 (3.3v) ---> VCC
pin 12 (GPIO 18) ---> GDIO0
Pin 33 (SPI MOSI) ---> SI
Pin 35 (SPI MISO) ---> SO
Pin 37 (SPI CLK) ---> SCK
Pin 38 (GPIO 20) ---> CS
Pin 39 (GND) ---> GND

@peter-kutak
Copy link

  • no IO pins are read in code = GDO0/GDO2 are ignored completly -> recvData() reads garbage from RXbuffer because packet is not fully received

-quick dirty fix is add delay in recvData()
if (rx_bytes_val & 0x7F and not (rx_bytes_val & 0x80)):
self._usDelay(20000)

@unixb0y
Copy link

unixb0y commented Dec 1, 2018

  • no IO pins are read in code = GDO0/GDO2 are ignored completly -> recvData() reads garbage from RXbuffer because packet is not fully received

-quick dirty fix is add delay in recvData()
if (rx_bytes_val & 0x7F and not (rx_bytes_val & 0x80)):
self._usDelay(20000)

Did you find a better solution to this?
I have a couple of issues with regards to receiving data. I do use a different modulation method and some other changes that you can see in my fork of this repo if you wish.
The output of the receiver part is completely full of 0xFF bytes as long as I don't click on my remote (I'd expect the module to just return nothing) and when I do, it's quite random looking bytes (always different, changing the whole time while holding the remote button pressed down).

@nahueldsanchez
Copy link
Owner

Hello @unixb0y I'm planning to do a full review of this code and implement other modulation types as well. I'll get back to you once I'm able to do some work on this. Thanks for your interest and sorry for the delay answering back.

@unixb0y
Copy link

unixb0y commented Dec 23, 2018

Hi @nahueldsanchez I ended up rewriting most of the code and ended up uploading it as a separate project 😊
Feel free to have a look if you find something that „inspires“ you :D
It’s OOK only for now though! I need to add that on my Readme 😉

@AT0myks
Copy link

AT0myks commented Jan 26, 2020

I don't know where the person above got their pin configuration but it didn't seem to be correct when looking at the SPI pins of the RPi. I tested it and indeed it doesn't work, or at least for me (I'm on RPi4 but I'm pretty sure the GPIO is the same as the RPi3B+).
I tested 1 or 2 other configurations that I found online but so far only one worked :

CC1101 <-> RPi
VCC <-> 3v3 (pin 1 or 17)
SI <-> SPI0 MOSI (pin 19)
SO <-> SPI0 MISO (pin 21)
CSN <-> SPI0 CE0 (pin 24)
SCK <-> SPI0 SCLK (pin 23)
GND <-> GND (pin 20 for example)

with device=0 (default value, which corresponds to /dev/spidev0.0).
Obviously this is not the only one but at least it works.
The only thing left is the GDO0 and GDO2, I don't know which pin to connect them to, and I couldn't find by looking at the code (I'm new to RPi and CC1101).
Does someone know which pins I should use?

@unixb0y
Copy link

unixb0y commented Jan 30, 2020

@AT0myks I don't work with a Raspberry Pi, instead with a Feather M4 and circuitpython. Don't remember how I found out which pins to use, I suppose I just read the datasheet of my board, the code and figured it out that way.

@AT0myks
Copy link

AT0myks commented Feb 2, 2020

Thanks for the quick answer.
After a bit more research I found Nahuel's blog where he says he "left GD0 and GD2 unconnected" so that answers my question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants