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

Compatibility with RAK811 #59

Closed
sabas1080 opened this issue Mar 25, 2018 · 1 comment
Closed

Compatibility with RAK811 #59

sabas1080 opened this issue Mar 25, 2018 · 1 comment
Assignees
Labels

Comments

@sabas1080
Copy link

Hi

I am trying to make this library work with the RAK811 module, but I can not find the correct configuration, I think my problem is in the definition and use of the pins

RADIO_RF_CRX_RX PB_6 //CRF3 (ANT_SWITCH_TX_BOOST)
RADIO_RF_CBT_HF PB_7 //CRF2 HF (ANT_SWITCH_TX_RFO)
RADIO_RF_CTX_PA PA_4 //CRF1 PA (ANT_SWITCH_RX)

// LORA
#define RADIO_RESET_PORT PB13
#define RADIO_MOSI_PORT PA7
#define RADIO_MISO_PORT PA6
#define RADIO_SCLK_PORT PA5
#define RADIO_NSS_PORT PB0
#define RADIO_DIO_0_PORT PA11
#define RADIO_DIO_1_PORT PB1
#define RADIO_DIO_2_PORT PA3
#define RADIO_DIO_3_PORT PH0
#define RADIO_DIO_4_PORT PC13
//#define RADIO_DIO_5_PORT PA4

#define RADIO_RF_CRX_RX PB_6 //CRF3 (ANT_SWITCH_TX_BOOST)
#define RADIO_RF_CBT_HF PB_7 //CRF2 HF (ANT_SWITCH_TX_RFO)
#define RADIO_RF_CTX_PA PA_4 //CRF1 PA (ANT_SWITCH_RX)
#define RADIO_XTAL_EN PH_1

My Pin mapping

const lmic_pinmap lmic_pins = {
.nss = RADIO_NSS_PORT,
.rxtx = RADIO_RF_CRX_RX,
.rst = RADIO_RESET_PORT,
.dio = {RADIO_DIO_0_PORT, RADIO_DIO_1_PORT, RADIO_DIO_2_PORT},
// the RAK811 module needs D29 high for RX, low for TX.
//.rxtx_rx_polarity = 1
.rxtx_rx_active = 0,
// the Murata module is direct-wired, we can use 8 MHz for SPI.
.spi_freq = 8000000
};

Datasheet: https://github.com/RAKWireless/WisNode-LoRa/blob/master/Doc/RAK811%20SCH.pdf

sx1276-board.c: https://github.com/RAKWireless/RAK811_BreakBoard/blob/master/src/boards/RAK811BreakBoard/sx1276-board.c

Thanks

@terrillmoore terrillmoore self-assigned this Mar 25, 2018
@terrillmoore
Copy link
Member

This is a big and somewhat tough problem. I'm not familiar with the RAK module. I can't tell from the schematic which STM32 is being used. See my comments on #61 about possibility (3) -- you have to be using the right BSP. Our BSP does not define PB13, etc, so I'm pretty sure you're not using ours. I'm afraid that, based on experience with timing problems with the code in stm32duino-based releases, I have no resources to help with other BSPs right now. If you want to try to add support for the RAK to our board support package, we will definitely accept a pull request.

Basic recommendations:

  1. have one or two known-good modules -- MCCI uses Adafruit LoRa M0 Feathers because the BSP is stable and we have lots of good experience. You have to add a wire, either on the board, or using a wing such as the MCCI Catena 4450.
  2. make the raw example work between them
  3. then make sure a known-good module will run the OTAA example
  4. get your new module talking to a known good using the raw example.
  5. try to get your new module to talk to the gateway using the OTAA example

Good luck!
--Terry

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

No branches or pull requests

2 participants