tftelkamp / single_chan_pkt_fwd

Single Channel LoRaWAN Gateway
Other
235 stars 310 forks source link

Pin mapping #22

Open InternUSMC opened 7 years ago

InternUSMC commented 7 years ago

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 commented 6 years ago

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 commented 4 years ago

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 commented 4 years ago

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.