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

Pinout changed for Dragino HAT? #6

Open
Nanne118 opened this issue May 15, 2018 · 8 comments
Open

Pinout changed for Dragino HAT? #6

Nanne118 opened this issue May 15, 2018 · 8 comments

Comments

@Nanne118
Copy link

Hey all, I know this is not within the scope or ''support'' for this, but I cannot seem to get this software / library working with the Dragion GPS/Lora HAT for the Raspberry Pi (3). Although there are a variety of tutorials that describe it as working with this software and hardware combination, the issue I run into is that the pin 4 is not found:

lmic3

Most likely this is due to the newer version of the GPS/Lora board having a different pinout than the previous versions: anyone here that has also run into this issue and knows how to solve it?

@simoncozens
Copy link

I'm also trying to get this working, but with no luck yet. I think I have a different problem to you, though. I do have files in /sys/class/gpio/gpio4/. Have you enabled SPI in boot/config.txt?

In my case I'm just getting:

FAILURE
radio.c:666

I have got the Lora HAT working with the Radiohead library, using the LORASPI board option, which defines the following pins:

#define RF_LED_PIN RPI_V2_GPIO_P1_16 // Led on GPIO23 so P1 connector pin #16
#define RF_CS_PIN  RPI_V2_GPIO_P1_24 // Slave Select on CE0 so P1 connector pin #24
#define RF_IRQ_PIN RPI_V2_GPIO_P1_22 // IRQ on GPIO25 so P1 connector pin #22
#define RF_RST_PIN RPI_V2_GPIO_P1_15 // IRQ on GPIO22 so P1 connector pin #15

I'm not sure how these CS/IRQ/RST pinouts relate to the lmic_pins.

@brady-aiello
Copy link

Has anyone been able to get this to work with the Raspberry Pi 3 B+ (esp. for the US) ? I have it running, but it doesn't show up in the TTN console. I did the following:

  1. Change config.h to have: #define CFG_us915 1
  2. Change line 764 of lmic.c to LMIC.channelMapp[channel/16] &= ~(1<<(channel&0F));
  3. Added in all session keys, eui's and dev address.

@Hacklog24
Copy link

Hi,

I’m using a raspberry pi 3b and a Dragino gps/hat v1.4 as a sender. When I run thethingsnetwork code with sudo, I get this error:

Failure
radio.c 664

this does not happen if I launch it normally. It would seem a pin connection problem, could anyone please help me?

Thank you all

@simortus
Copy link

you need to check the pin mapping in your lmic code. i had the same error before but as soon as you set the pins properly

// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 10,
.rxtx = LMIC_UNUSED_PIN,
.rst = 9,
.dio = {2, 6, 7},
};

@koldogut
Copy link

Anybody solved this? I've changed everything according to the instructions and posts here but no luck, still same radio.c:664
error and no idea how to debug it.

@lazarusCantini
Copy link

I'm stuck with the same Problem. I changed the mapping like @simortus recommended with one correction of mine: LMIC_UNUSED_PIN changed to UNUSED_PIN

you need to check the pin mapping in your lmic code. i had the same error before but as soon as you set the pins properly

// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 10,
.rxtx = LMIC_UNUSED_PIN,
.rst = 9,
.dio = {2, 6, 7},
};

But the Problem is still:
FAILURE
radio.c:664

@asanz060
Copy link

asanz060 commented Mar 3, 2021

Hi @lazarusCantini did you solve this issue? I am having the same problem. Thank you!

@lazarusCantini
Copy link

Hey @asanz060 Indeed, I solved THIS Problem. Now I'm struggling with another Problem, but the issue above I solved with the configuration:
// Pin mapping
lmic_pinmap pins = {
.nss = 6,
.rxtx = UNUSED_PIN, // Not connected on RFM92/RFM95
.rst = 0, // Needed on RFM92/RFM95
.dio = {7,4,5}
};
This Configuration works with the Dragino LoRa/GPS HAT for RPi v1.4
You can find the Infos needed:
Pin Mapping LoRa Chip to Raspberry
Translation wiringPi to Raspberry Pinout
Hope this is helpfull!

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

8 participants