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 mapping #22

Open
InternUSMC opened this issue Aug 30, 2017 · 3 comments
Open

Pin mapping #22

InternUSMC opened this issue Aug 30, 2017 · 3 comments

Comments

@InternUSMC
Copy link

I am using an SX1276 transceiver module. I understand that the pin mapping is meant for SX1272, but why does it does not reflect the actual mapping on the raspberry pi?

image while the tutorial I saw used the following pin mapping
image with no error. When I tried to change to follow the actual pin mapping on raspberry pi and after restarting the raspberry pi, error printed is transceiver not recognised.

Hope someone can help explain the reason for the odd mapping and why.

Thanks

@lImbus
Copy link

lImbus commented Nov 1, 2017

it's not the PIN numbers, but the GPIO port numbers:
ssPin = 6 = NSS = GPIO6 = Pin 22
dio0 = 7 happens to be GPIO7 = Pin 7
RST = GPIO0 = Pin 11

@simortus
Copy link

The newest lora gps hat sx1276 has the same problem, unrecognized transceiver.
I have tried to change the dio0 pin mapping to another pin GPIO25, since GIPO7 has SCLK feature as well. but without a response!
If you check the the sx1276, it says that they use dio0, dio1 for TX_RX, and dio2 for RX_timeout.

@simortus
Copy link

The issue can be solved by modifying the code to :
`if (version == 0x22){ // for sx1272

} else{
sx1272 = false;
version= 0x12; // this is the version corresponding sx1276
}`

that is all what you need to do,
PS: if you are using the new Rpi with dragino LoRa-GPS_HAT change dio0 to any other wiringPi pin
like pin2. The wiringPi7 have SCLK as second feature and it cracks the device since the clock pin is constantly at HIGH.

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

3 participants