Adding support for new board - what am I doing wrong?

I have a handful of Sparkfun WRL-15006 boards (ESP32-WROOM-32 + RFM95W) left over from another project and I’m trying to give them a second life by reprogramming them with Meshtastic firmware.

I got stuck at programming the board definition in Meshtastic. I have the radio type and all the pin definitions correct, yet the radio fails to initialize on startup and I’m running out of ideas. Can someone please help me figure this out?

First. I added a new target in platformio.ini:

extends = esp32_base
board = sparkfun_lora_gateway_1-channel
; unreliable above 115k
upload_speed = 115200
monitor_speed = 115200
build_flags = 
  ${esp32_base.build_flags} -DWRL_15006 -DCONSOLE_MAX_BAUD=115200

And second, I added the board particulars in src/configuration.h (right after GENIEBLOCKS):

#elif defined(WRL_15006)
// This string must exactly match the case used in release file names or the android updater won't work
#define HW_VENDOR HardwareModel_TBEAM  // just fake an existing id for now
// no GPS
#undef GPS_RX_PIN
#undef GPS_TX_PIN
#undef USE_SX1262
#define USE_RF95

// Radio SPI interface pins
#define RF95_MISO 12 // MISO
#define RF95_MOSI 13 // MOSI
#define RF95_SCK 14  // SCK
#define RF95_NSS 16  // SS

// Radio signaling pins
#define LORA_RESET 27
#define LORA_DIO0 26 //
#define LORA_DIO1 35 // Not really used
#define LORA_DIO2 34 // Not really used

#define LED_PIN 17
#define BUTTON_PIN 0

However, when I boot up the board, the radio fails to initialize:

??:??:?? 0 RF95 init result -2
??:??:?? 0 Warning: Failed to find RF95 radio

What am I doing wrong?

The board is here (pin definitions are about mid way down the page):
PDF schematic:

Thanks in advance!

Make the firmware based on TBEAM 0.7. If your pins on the board correspond to the board, then the firmware should work immediately and without problems. If your RFM95 pins are different according to the scheme, then simply redefine them in the configuration section for tbeam0.7

Thanks for the suggestion, @Der_Bear, I tried it but unfortunately it didn’t make any difference.

On further research, it appears to be an SPI port problem, which is described in this Github issue; unfortunately the author did not post a solution, and the problem is beyond my depth:

After one more day of testing, I’m at a point where I’m literally out of things to try, and out of time to try them. But this doesn’t mean the fun needs to end here :slight_smile:

If anyone else wants to give it a try, I’m offering a 3 mBTC bounty for a merged pull request that adds the Sparkfun WRL-15006 board as a fully supported target in Meshtastic-device. All you need to do is post an address in your Github profile or in the PR comments.

Thanks in advance for any help!

@ayrton the best person to talk to is likely @geeksville but the last update from him that I can remember is he was looking for a co-developer because his back issues are limiting the time and attention he can currently give this project.

@mc-hamster is also very knowledgeable, but I haven’t seen many posts from him lately. Maybe he will respond to this ping.

Have you checked out the Discord server? Maybe if you discuss your attempts there you may get more feedback. These forums are not as active as they were ~six months ago.

I see a ping! I’ve been mostly following the Discord and responding there.

@ayrton Please join the Discord and message me there. Happy to help.

Thanks @Spor7biker , @mc-hamster - sadly Discord doesn’t even work from my network, and has a lot of other pain points that I won’t discuss here.

Why not work on the issue right here, where everyone else can see and learn, Google can index, Github and other sites can link for reference, Wayback can archive, and so on. Moving the conversation behind a paywall is completely against how open source development is supposed to work.

I’m raising the bounty to 4 mBTC, and thanks again.

Hey there!

I’m mostly on this website to support questions about what I’ve contributed and check the Discord more frequently since it dings my computer.

We actually replaced Slack with Discord because Discord is more open source friendly and maintains an unlimited history of our decisions where Slack did not. For trouble shooting and real time collaboration, those chat apps can’t be beat.

Discord is used by many open source applications, rather successfully at that. Here’s a list:

That said, I’m still happy to help. There are a few developers active on there, we have a nice community and laugh a lot. It’d be cool to have you come along and join us.


@mc-hamster , before we continue, thank you for your vision and hands-on contributions to the Meshtastic project. As a user of the project, I very much prefer you to be productive on your Discord channel than unproductive outside it.
Like all surveillance-funded community platforms, Discord poses an “ambiguous cylinder illusion” problem: what looks round from your perspective may look square from mine, and we’d both be right. I am not going to argue this, like I said, as long as it’s round to you, I’m happy :slight_smile:

Back to the thread topic though, any ideas for my board?

One thing that’s not glaringly obvious from the PDF schematic is that the RST pin of the radio is pulled up but not connected to the ESP or anywhere else, meaning that if all the gobbledygook going on on the SPI bus in the early boot stages leaves the radio SPI port in a discombobulated state, there’s no out-of-band way to re-combobulate it.
This could be part of the problem, or maybe I should just admit I’m WAY beyond my depth. :slight_smile: