RFGateway M4 Setup Assistance

Started by user2000, December 27, 2022, 01:22:10 AM

user2000

Hello, I've tried to setup the RFGateway M4 (w/rfm95) by following the instructions here: https://lowpowerlab.com/shop/product/196
1) Download Arduino SAMD boards
2) Insert moteino json definition file into arduino
3) Download Low power Labs boards
4) Download patched radiohead library (1.121) from here: https://lowpowerlab.com/guide/moteino/lora-support/ (also tried 1.116)

Installed them on arduino 1.8.19 and also 2.0. The 2.0 didn't work for some reason, but legacy arduino ide 1.8.19 seems to work. I'm able to get an analog read from the M4 to output successfully, and I can get board info. Though I'm unable to get one of the RFM95 server examples to work. I'm not seeing anything on the serial out. I've tried the three that are available.

I see the following thread, and assume that the default constructors are correct. https://lowpowerlab.com/forum/coding-questions/rfgateway-m4-issue-with-radiohead-library/msg28986/#msg28986

I've put a new serial.println in right after the serial init, and it doesn't get printed. Oddly enough, the client examples, appear to work, as I see the uart output attempting TX (I didn't actually text reception to another moteino).

I'm sure I'm doing something completely stupid. Any idea what I did wrong?

Felix

Yes it should work if you have the patched version of RadioHead which includes the pin definitions for Moteino boards:

#if defined(MOTEINO_M0)
    RH_RF95(uint8_t slaveSelectPin = SS, uint8_t interruptPin = 9, RHGenericSPI& spi = hardware_spi);
#elif defined(RFGATEWAY_M4)
    RH_RF95(uint8_t slaveSelectPin = SS, uint8_t interruptPin = 18, RHGenericSPI& spi = hardware_spi);
#else
    RH_RF95(uint8_t slaveSelectPin = SS, uint8_t interruptPin = 2, RHGenericSPI& spi = hardware_spi);
#endif


Other than that the Serial.print should produce output. If that's what you're struggling with I'd suggest tackling that problem first without the radio code.