Code Monkey home page Code Monkey logo

Comments (7)

peterl3233 avatar peterl3233 commented on July 18, 2024 1

Hi .. Thanks for reply ... I'll look at all this carefully but got sidetracked with a family matter. I appreciate your response very much.

from lmic-node.

peterl3233 avatar peterl3233 commented on July 18, 2024 1

@peterl3233 Did you succeed to get it working?

Hi ... FYI, following your suggestions, I did get this working. Your code was without error and after I checked all the points you made I dug deeper and eventually found a "flakey" RFM95 module; so it was actually a hardware problem. After replacing teh RFM95, I use it with ESP32 with RMM95 with an SHT30 sensor on I2c. Works great on Chirpstack .. I didn't try on TTN.

For interest, here is the pinmap for the Espressive ESP32 Devkit_v4 as connected to RFM95 module:

const lmic_pinmap lmic_pins = {
    .nss = 5,
    .rxtx = LMIC_UNUSED_PIN,
    .rst = 14,
    .dio = { /*dio0*/ 26, /*dio1*/ 33, /*dio2*/ LMIC_UNUSED_PIN }
#ifdef MCCI_LMIC
    ,
    .rxtx_rx_active = 0,
    .rssi_cal = 10,
    .spi_freq = 8000000     /* 8 MHz */
#endif    
};

I created a "bsf_ESP32_RFM95.h" file and if you would like, I'll send it to you or post it on github. Below is the changed (hardly) code block for ESP32_RFM95:

[env:ESP32_RFM95]
; Espressif ESP32 DevKit_v4.
; No display.
; No LED.
platform = espressif32
board = ESP32_RFM95
framework = arduino
upload_speed = 921600
monitor_speed = ${common.monitor_speed}
lib_deps =
   ${common.lib_deps}    
   ${mcci_lmic.lib_deps}
build_flags =
   ${common.build_flags}
   ${mcci_lmic.build_flags} 
   -D BSFILE=\"boards/bsf_ESP32_RFM95.h\"
   -D MONITOR_SPEED=${common.monitor_speed}
   -D LMIC_PRINTF_TO=Serial    
   -D USE_SERIAL
   ; -D USE_LED       ; Not used
   ; -D USE_DISPLAY    ; Not used

from lmic-node.

lnlp avatar lnlp commented on July 18, 2024

Thanks.

My approach has been to adjust a Lolin-d32 file and get the pin mappings right

I assume you mean 'adjust the BSF file' (bsf_lolin_d32.h) here?
What did you adjust and why? What is not working, do you get any errors?

I don't have an Espressif DevKitC board to test but as far as I can see you should be able to use either lolin32 or lolin_32 as basis.

I2C and SPI pins for these boards are the same. The Lolin boards do have onboard user LED connected to GPIO5 though which in the Arduino BSP is defined as SS (SPI chip select, SS/NSS/CS), which is why I used different GPIO's for SPI chip select for these boards (using the same GPIO for both user LED and SPI SS on a board is a hardware design flaw).

The DevKitC does not have onboard user LED so you could use the default defined (SS) GPIO5 for SPI chip select for the DevKitC as well. But with the pins (GPIOs) defined in the BSF's for lolin32 and lolin_d32 the DevKitC should be able to work just fine with these as well.

What I would like to suggest (and possibly could make a difference) is change the value of the board parameter (in the board specific section) in platformio.ini from lolin_d32 (or lolin32, whichever you want to use and modify) to esp32dev.

Another option may be to change the SPI frequency in the BSF from 8 MHz to 1 MHz, depending on the quality of your wiring/breadboard.

Also disable USE_LED in the board specific section in platformio.ini because the DevKitC board does not have an onboard user LED.

If this does not help you may have to double-check your physical wiring, pin mappings defined in the BSF and whether you have actually selected the proper board-id in platformio.ini (so it uses the BSF that you are assuming).


can you offer an approach to add ESP32 dev module to the list of configured devices?

I could add support for DevKitC but would follow similar steps as described above to add it, so you should at least be able to get your board working with the current version of LMIC-node.

To add it I would need some more information and specifications (e.g. correct full name).
I assume that you DevKitC-V1 is an "Espressif DevKitC-V1" board and not a DoIt DevKit V1?
Unfortunately, on the Espressif site I only see reference design documentation for ESP32-DevKitC-V2 and ESP32-DevKitC-V4.

from lmic-node.

lnlp avatar lnlp commented on July 18, 2024

@peterl3233 Did you succeed to get it working?

from lmic-node.

lnlp avatar lnlp commented on July 18, 2024

@peterl3233 Issue closed because no response.

from lmic-node.

lnlp avatar lnlp commented on July 18, 2024

Thanks. If you find some time and want to continue here, just let me know and I can reopen the issue.

from lmic-node.

nordblick2 avatar nordblick2 commented on July 18, 2024

Ay chance to see that bsf_ESP32_RFM95.h content anywhere?😀

from lmic-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.