hi All, firstly im very much a beginer and learning in this coding space, i’m having real troubles trying to get a Sparkfun SPX-18572 1w Lora module to work or be recognised with a ESP32-P4. ive using a Guition JC1060P470C 7" screen with the onboard ESP32-P4 but all sorts of tests and trials and even Ai’ help have failed to get connection to this unit via Radiolib, SPI connection. is there anyone that has successfully connected these to a ESP32-P4 and would be happy to share just a sample working code, from there i can play around and move forward, but stuck trying to make this all work from stage 1.
Hey @Phil210256,
Welcome back to the forum!
That’s a great project you’re working on, and it’s totally understandable to hit some roadblocks early on, especially with SPI devices like the SPX-18572 and newer boards like the ESP32-P4.
While I haven’t personally seen a confirmed working example of that exact combo yet, the SX1262 chip used on the SparkFun SPX-18572 is supported by the RadioLib library, so in theory, it should work just fine with the ESP32-P4, as long as the wiring and SPI configuration are spot on.
The challenge with your setup is that you’re also using a JC1060P470C screen, which may already be using the main SPI bus. If the screen and LoRa module are sharing SPI without unique chip-select pins, or if they’re interfering with each other, that could easily cause the issue you’re seeing, especially if nothing is being recognised or initialised correctly.
Would you be able to confirm:
- Which GPIOs you’ve wired to the LoRa module (CS, DIO1, RESET, BUSY)?
- How you’re powering the LoRa module? (It can draw up to 500mA when transmitting.)
- Whether you’re using any other SPI devices at the same time (like the screen), and if they share the same bus?
With that info, we might be able to spot where the issue lies and get you unstuck, or at least set you up with a minimal test case using just the ESP32 and LoRa module first before adding the display back in.
Thanks for the quick reply Ryan, there are a couple of FFC connectors on the Guition JC1060P470C which ‘i believe’ are useable as onboard display , touch and RTC dont seem to be using them, if their PDF schematics are correct ??? So i have the unit 5v supply to the Lora from the JC1060 USB power in, and 3v3 from the JC labelled 3v3 output pins, those voltages seem stable on the Lora module, when i run my code i cant seem to get the device to initilise, for now im using software RST and using that spare pin for the D1, i’ve listed the last attempt of my sketch (with Ai help !, sorry) as im very new and running around in circles a bit on my own. Ive connected and configured Lora CS-30, Lora DO 28, LOra RST29, TX End 34, Tied RX end to GND (as im currently just testing TX), SCK is 31, SDI is 32, SD0 is 33. i also tried software RST and using D1 of the Lora to pin 29. The only thing i havent done is conencted the 2nd FFC and breakout board and then wired back in RST and also used D0 and D1, but i thought it may initlised if i used software RST . Seems the board cant be found on the SPI and a few little diagnostic "ai’ generated test codes have failed to find the device either. I maybe doing somethine completely wrong or just the P4 thing and this JC1060P470C causing issues, Guition did say that there were 10 GPIO useable on this new device also.
Hey @Phil210256,
Thanks for the update!
Here’s what I’d suggest as the next step:
Try a minimal test setup where only the ESP32-P4 and the LoRa module are connected, no screen or other devices. This will help isolate the SPI bus and confirm whether you can at least initialise the LoRa chip successfully.
If that works, you can then add the screen back in and carefully manage the chip select (CS) lines and SPI bus to avoid conflicts.
Using a simple RadioLib example for the SX1262 with your exact pinout will help, make sure to double-check the module initialisation status. Adding debug prints or checking status/error codes from RadioLib can give useful clues if the begin() function fails.
Regarding AI-generated code: it’s totally fine to use AI to help write or debug your code! Just keep in mind that sometimes AI can produce code that looks correct but might have subtle errors or assumptions that don’t fit your exact hardware setup. That’s why it’s best to start with known working example sketches, like those from RadioLib, to get your hardware working correctly first. Once that’s solid, you can lean on AI more confidently to add new features or customise your code.
yeah cant disconnect the LCD, etc as its all internally wired, but since googling and chatbotting it ‘seems’ GPIO34 is input only, which i’ve used to put the Lora Tx En so thats a start, i quess ill keep slugging away, Lovely display and touch works well on these but lack of documentations and GPIOS has tripped me up, and its a new model with the P4 so seems not so common yet. Unless someone reads this forum and says ‘yeah i know how to fix it’ happy to pay $$ to save me migraines LoL
Hey @Phil210256,
Thanks for clarifying your setup, you’re right that fully isolating the LoRa module for testing isn’t really possible.
So, the best approach now is to focus on carefully managing the SPI bus sharing and GPIO usage. Double-check which pins are free and can be used for LoRa control signals, and ensure there are no conflicts with the display’s SPI lines. Managing the chip select (CS) lines properly is especially important when sharing SPI.
That said, if you have access to a separate ESP32 development board, it’s really helpful to do isolated testing there first. This way, you can confirm that the LoRa module and your code work correctly without interference from the screen or other onboard devices. Once that’s working, you can return to the integrated setup with more confidence.
And hey, if the migraines come along for the ride, don’t worry, that’s just part of the embedded engineering initiation ritual! ![]()
Thanks Ryan, seems not a lot of info for this available and that makes things tricky for a newbie like me, and i get different google or Ai results each time i ask making it so much more fun (not), but i’ll certainly try a standalone ESP32 (not P4) and make sure things are talking from the sparkfun Lora. cheers
OK update, seems im not totally mad, seems there is a known ESP32-P4 bug in the Arduino IDE
ESP32 Core .. according to some googling so i guess i wait for a fix on that, as i struggle with the basics and not really going to tackle ESP-IDF
Seems my main issue is the GPIO on the ESP32-P4 with the JC1060P470c, tried a couple of simple feedback loop tests, one to comfirm wire continiutry and the other trying to confirm SPI with loopback which fail on all the FFC connector pins i’ve used. So i think i’ll have to see where i can reach out for some pro-programmer help to get me over the hurdle or making the JC1060P470C with its ESP32-P4 talk to external things, or find a demo project that uses external connections and see how they did it. Not sure if there are programmers for hire via this forum , perhaps you can point me in the right direction for some pro-help and help my sanity
Hey @Phil210256,
Don’t lose heart, debugging embedded hardware is notoriously tricky, but with persistence and the right help, you’ll get this working!
Best bet would be to study the JC1060P470C schematic/manual to find GPIOs on the board that are not used by the display or onboard functions and support output. Reaching out to the maker of the JC1060P470c might also give some good leads, especially if they have demo projects or internal pin maps.
Best of luck in your continued tinkering!