RAK2247 integration through SPI

Hello everyone,

I am new with RAK2247 module and trying to integrate it through SPI (I don’t have USB module). For that, I defined it structure in kernel dts file as per below.

&spi_controller0 {
spi-max-frequency = <20000000>;
pinctrl-names = “default”;
pinctrl-0 = <&spim0_pins>;
#address-cells = <1>;
#size-cells = <0>;
rak2247@0 {
compatible = “linux,spidev”;
reg = <0x0>;
spi-max-frequency = <20000000>;
status = “okay”;
};
};

spim0_pins: pinmux_spim0-pins {
sunplus,pins = <
SPPCTL_IOPAD(23, SPPCTL_PCTL_G_PMUX, MUXF_SPIM0_DO, 0)
SPPCTL_IOPAD(22, SPPCTL_PCTL_G_PMUX, MUXF_SPIM0_DI, 0)
SPPCTL_IOPAD(24, SPPCTL_PCTL_G_PMUX, MUXF_SPIM0_EN, 0)
SPPCTL_IOPAD(21, SPPCTL_PCTL_G_PMUX, MUXF_SPIM0_CLK, 0)
>;
};

After this install LORAWAN package from this link: GitHub - RAKWireless/rak_common_for_gateway (select RAK2247(SPI))

Now I am trying to configure my gateway on ttn-gateway server. How can i do this?

Also, how can i verify that my SPI communication with module establish successfully?

Thanks in advance for help me.

The documentation from both RAK and TTI pretty much covers this.

In the first instance I’d not try to do settings, I’d just use the RAK installer / image as this has everything setup for you. And then once you’ve registered it on the console you can use the global_conf.json download to give the gateway the specific TTN settings.

1 Like

Hi,

Thank you for your reply.

Yes, I am just started with initial configuration as described and after that changed global_conf,json file downloaded from ttn-gateway server. but still getting error as per below.

ERROR: Failed to load fw 1
ERROR: Version of calibration firmware not expected, actual:101 expected:2
ERROR: [main] failed to start the concentrator

Where should be problem?