RAKWireless / rak_common_for_gateway

219 stars 124 forks source link

RAK2247 integration through SPI #82

Open Nileshbhavsar opened 2 years ago

Nileshbhavsar commented 2 years ago

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 but not able to do successfully. I am getting error as per attached file.

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

Thanks in advance for help me. photo_2022-05-18_13-44-24