💬 nRF52832 ESP-LINK Shield for ESP8266 Wemos D1 Mini




  • Hero Member

    Project completed. 🙂


  • Hero Member

    Uploaded sample sketch which demonstrates Serial for testing purposes and which contains instructions on how to set "Reset: Enable" on the nRF52832 module, which allows remote reset of the nRF52832 via ESP-LINK on the ESP8266 using ESP-LINK's console window. 🙂

    Serial works correctly, even with a baud rate of 460800.


  • Hero Member

    I just now sent a new version of this board to the fab. The new version has 4 LED's and a separate reset button for the nRF52832. I'll update the files here after I've received and verified the new board.



  • Did you directly connect to a Controller or do you only use MQTT?


  • Hero Member

    @omemanti Neither. In this instance, I used ESP-LINK. I gave domoticz its IP address and it was all perfectly and automatically connected via Wi-Fi.



  • hmz,, I entered the IP address in MYSCONTROLLER but the connection is refuged.(port: 5003, by default.)

    maybe its the controller.


  • Hero Member

    @omemanti Domoticz treats it as an ethernet device. Are you hooking it up that way?



  • @neverdie

    like this.,

    0_1517863577447_e59852df-d67c-4af1-85ae-897bd5483882-image.png


  • Hero Member

    @omemanti ESP-LINK uses port 2323 for serial communications. As a check, you could also putty to port 2323 at its IP address, just to verify that your seeing the expected output. The cool thing is that multiple devices can connect to port 2323 at the same time.


  • Hero Member

    This post is deleted!


  • @NeverDie
    Great, Thnx! , 2323 looks great, dont get the the errors 🙂

    I still need to test it, but so far, so great.



  • Can you pls. upload the design files?


  • Hero Member

    @toyman Done.

    They had been posted previously. Not sure what happened to them. @hek had a server crash or something?


  • Admin

    Eh, not that I'm aware of. What files were missing?


  • Hero Member

    @hek All the files except for one gerber file and the PDF schematic.


  • Admin

    Hmm.. That's exceptionally strange. I haven't heard of any other project losing uploaded files.

    Have you seen anything similar in any of your other projects? Sure you really published them a year back?



  • Hi,

    I'm new to mysensors, and for tests purpose, i need this gateway.
    Wemos works fine with esp-link.
    For nrf52832, i use Plateformio ide, and mysensors serial gateway sketch.

    // Enable debug prints to serial monitor
    #define MY_DEBUG
    
    
    // Enable and select radio type attached
    //#define MY_RADIO_RF24
    #define MY_RADIO_NRF5_ESB
    //#define MY_RADIO_RFM69
    //#define MY_RADIO_RFM95
    
    // Set LOW transmit power level as default, if you have an amplified NRF-module and
    // power your radio separately with a good regulator you can turn up PA level.
    //#define MY_RF24_PA_LEVEL RF24_PA_LOW
    
    // Enable serial gateway
    #define MY_GATEWAY_SERIAL
    
    // Define a lower baud rate for Arduinos running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
    #if F_CPU == 8000000L
    #define MY_BAUD_RATE 38400
    #endif
    
    // Enable inclusion mode
    #define MY_INCLUSION_MODE_FEATURE
    // Enable Inclusion mode button on gateway
    //#define MY_INCLUSION_BUTTON_FEATURE
    
    // Inverses behavior of inclusion button (if using external pullup)
    //#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
    
    // Set inclusion mode duration (in seconds)
    #define MY_INCLUSION_MODE_DURATION 60
    // Digital pin used for inclusion mode button
    //#define MY_INCLUSION_MODE_BUTTON_PIN  3
    
    // Set blinking period
    #define MY_DEFAULT_LED_BLINK_PERIOD 300
    
    // Inverses the behavior of leds
    //#define MY_WITH_LEDS_BLINKING_INVERSE
    
    // Flash leds on rx/tx/err
    // Uncomment to override default HW configurations
    //#define MY_DEFAULT_ERR_LED_PIN 4  // Error led pin
    //#define MY_DEFAULT_RX_LED_PIN  6  // Receive led pin
    //#define MY_DEFAULT_TX_LED_PIN  5  // the PCB, on board LED
    
    #include <MySensors.h>
    
    void setup()
    {
        // Setup locally attached sensors
    }
    
    void presentation()
    {
        // Present locally attached sensors
    }
    
    void loop()
    {
        // Send locally attached sensor data here
    }
    
    

    As this, gateway don't work, esp-link don't receive anything.
    I think i need to specify witch pins of NRF are used for rx tx, but how doing that ?

    Thanks

    Ikes


  • Hero Member

    @Ikes-72000 You can define pin mappings in the MyNRF5Board.h file.

    #define PIN_SERIAL_RX       (8)
    #define PIN_SERIAL_TX       (6)
    

    as illustrated in the posted demo code. The demo code "just works" for this hardware configuration, so I suggest you start with the demo code and confirm that it's working on your instance of the hardware before moving on with other code. That's how Adafruit and Sparkfun do it with their breakout boards as well.

    If you're looking to get an idea of how to integrate it with mySensors in some other manner, you might have a look at:
    https://www.openhardware.io/view/510/Multi-Sensor-TempHumidityPIR-LeakMagnetLightAccel



  • @NeverDie , thanks, but unfortunately this doesn't work.

    Sketch i upload to nrf:

    // Enable serial gateway
    #define MY_GATEWAY_SERIAL
    
    #include <nrf.h>
    #include <MySensors.h>
    
    void setup() {
      Serial.begin(460800);
      Serial.println();
      Serial.println("Countdown 3...");
      Serial.flush();
      delay(100);
      Serial.println("Countdown 2...");
      Serial.flush();
      delay(100);
      Serial.println("Countdown 1...");
      Serial.flush();
      delay(100);
      Serial.println("Starting...");
      Serial.flush();
      delay(100);
    }
    uint32_t loopCounter=0;
    void loop() {
      Serial.println(loopCounter++);
      Serial.flush();
    }
    

    Log:

    c:/users/ikes/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes
    c:/users/ikes/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .heap by 4 bytes
    c:/users/ikes/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .stack_dummy by 4 bytes
    c:/users/ikes/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes
    c:/users/ikes/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .heap by 4 bytes
    c:/users/ikes/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .stack_dummy by 4 bytes
    c:/users/ikes/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes
    c:/users/ikes/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .heap by 4 bytes
    c:/users/ikes/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .stack_dummy by 4 bytes
    Le croquis utilise 22984 octets (4%) de l'espace de stockage de programmes. Le maximum est de 524288 octets.
    Target voltage: 3.73V
    Remote debugging using \\.\COM6
    Available Targets:
    No. Att Driver
     1      Nordic nRF52 M3/M4
     2      Nordic nRF52 Access Port 
    Attaching to Remote target
    0x000009c4 in ?? ()
    Reading symbols from MyBoardNRF5.ino.elf...done.
    Loading section .text, size 0x59c8 lma 0x0
    Loading section .ARM.exidx, size 0x8 lma 0x59c8
    Loading section .data, size 0xbc lma 0x59d0
    Start address 0x1410, load size 23180
    Transfer rate: 39 KB/sec, 891 bytes/write.
    Temporary breakpoint 1 at 0x1370: file G:\Documents\Arduino\libraries\MySensors/hal/architecture/NRF5/MyMainNRF5.cpp, line 23.
    Starting program: C:\Users\Ikes\AppData\Local\Temp\arduino_build_693731\MyBoardNRF5.ino.elf 
    Note: automatically using hardware breakpoints for read-only addresses.
    
    Temporary breakpoint 1, main ()
        at G:\Documents\Arduino\libraries\MySensors/hal/architecture/NRF5/MyMainNRF5.cpp:23
    23	{
    
    Program complete!
    

    Don't see anything in esp-link console.


  • Hero Member

    @Ikes-72000 Did you remember to set the baud rate on your ESP-LINK serial console to 460800 baud?



  • @NeverDie, yes, but same, nothing in the console.
    I will check my wiring.

    And what the signification of this in log ?

    Temporary breakpoint 1 at 0x1370: file G:\Documents\Arduino\libraries\MySensors/hal/architecture/NRF5/MyMainNRF5.cpp, line 23.
    Starting program: C:\Users\Ikes\AppData\Local\Temp\arduino_build_693731\MyBoardNRF5.ino.elf 
    Note: automatically using hardware breakpoints for read-only addresses.
    
    Temporary breakpoint 1, main ()
        at G:\Documents\Arduino\libraries\MySensors/hal/architecture/NRF5/MyMainNRF5.cpp:23
    23	{
     
    

  • Hero Member

    @Ikes-72000 Maybe it's platform.io related? I don't recognize it.

    Good luck!



  • @NeverDie, no, log is from arduino ide.


  • Hero Member

    @Ikes-72000 If it were me having these problems, I'd simplify the situation by demounting the nRF board fromt he D1 Mini, then I'd power it, hook it up to a console and see whether I'm getting the count that it should be outputting. At that point what you have is simply a breakout board for the nRF, and it doesn't get any simpler than that.


Log in to reply
 

Suggested Topics

50
Online

11.4k
Users

11.1k
Topics

112.6k
Posts