ESP32 gateway pinout



  • Hi
    I'm trying to get a gateway with ESP32 devkit V1.0 to work. I have an ESP8266 GW working but want some extra pins for traffic light to work and perhaps better speed etc.
    I found a pinout in 'MyHWESP32.h' as below but I always get confused refeering to pin number. I assume the numbers refeers to GPIO number ?. I use an adapter for the radio to get extra juice and power the adapter from the Vin pin (5V from USB) but I can't get radio to work.
    Checked and rechecked wiring.

    Output from serial port :
    10040 TSM:FAIL:RE-INIT
    10041 TSM:INIT
    10048 !TSM:INIT:TSP FAIL
    10050 TSM:FAIL:CNT=2
    10052 TSM:FAIL:DIS
    10053 TSF:TDI:TSL
    20056 TSM:FAIL:RE-INIT
    20057 TSM:INIT
    20064 !TSM:INIT:TSP FAIL
    20066 TSM:FAIL:CNT=3
    20068 TSM:FAIL:DIS
    20069 TSF:TDI:TSL
    Adapter used :
    0_1531907714389_nrf_adapter.jpg

    Code :

    /**
     * The MySensors Arduino library handles the wireless radio link and protocol
     * between your home built sensors/actuators and HA controller of choice.
     * The sensors forms a self healing radio network with optional repeaters. Each
     * repeater and gateway builds a routing tables in EEPROM which keeps track of the
     * network topology allowing messages to be routed to nodes.
     *
     * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
     * Copyright (C) 2013-2018 Sensnology AB
     * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
     *
     * Documentation: http://www.mysensors.org
     * Support Forum: http://forum.mysensors.org
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * version 2 as published by the Free Software Foundation.
     *
     *******************************
     *
     * REVISION HISTORY
     * Version 1.0 - tekka
     *
     * DESCRIPTION
     * The ESP32 gateway sends data received from sensors to the WiFi link.
     * The gateway also accepts input on ethernet interface, which is then sent out to the radio network.
     * ----------- PINOUT --------------
     * | IO   | RF24 | RFM69 | RFM95 |
      |------|------|-------|-------|
      | MOSI | 23   | 23    | 23    |
      | MISO | 19   | 19    | 19    |
      | SCK  | 18   | 18    | 18    |
      | CSN  | 5    | 5     | 5     |
      | CE   | 17   | -     | -     |
      | RST  | -    | 17    | 17    |
      | IRQ  | 16*  | 16    | 16    |
        
     * Make sure to fill in your ssid and WiFi password below.
     
       
     */
    
    // Enable debug prints to serial monitor
    #define MY_DEBUG
    
    // Enables and select radio type (if attached)
    #define MY_RADIO_RF24
    //#define MY_RADIO_RFM69
    //#define MY_RADIO_RFM95
    
    #define MY_GATEWAY_ESP32
    
    #define MY_WIFI_SSID "xxxxxxx"
    #define MY_WIFI_PASSWORD "xxxxxxxx"
    
    // Set the hostname for the WiFi Client. This is the hostname
    // it will pass to the DHCP server if not static.
    #define MY_HOSTNAME "ESP32_GW"
    
    // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
    #define MY_IP_ADDRESS 192,168,1,10
    
    // If using static ip you can define Gateway and Subnet address as well
    #define MY_IP_GATEWAY_ADDRESS 192,168,1,1
    #define MY_IP_SUBNET_ADDRESS 255,255,255,0
    
    // The port to keep open on node server mode
    #define MY_PORT 5003
    
    // How many clients should be able to connect to this gateway (default 1)
    #define MY_GATEWAY_MAX_CLIENTS 2
    
    #include <MySensors.h>
    
    void setup()
    {
    	// Setup locally attached sensors
    }
    
    void presentation()
    {
    	// Present locally attached sensors here
    }
    
    void loop()
    {
    	// Send locally attached sensors data here
    }
    

    Anyone succesfully get the ESP32 to work ? Any idea what could be the problem ? Can someone confirm that pin numbers are correct ?
    Any help appreciated



  • @hakha4 I can tell you at least, that ESP32 boards with RFM95 work. I have tried at least two boards successfully. A Heltec ESP32 LoRa board and another one with RFM95 on board.
    In your code, you use the RF24. So what kind of gateway are you building here? The ESP32 has WiFI and you use another RF24 WiFi radio? I have never used the nRF24 Chip.
    So I guess it's just a matter of the proper pin assignments. You can use the physical pins or the logical pin names as described in your ESP32 dev board. If you have selected your board in your project it should also know the logical names of the pins or use a ESP32 spec to map it to the phyicals pin numbers.
    https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=14&cad=rja&uact=8&ved=0ahUKEwi3ivfY86jcAhVMsKQKHSPnDr8QFghYMA0&url=https%3A%2F%2Fespressif.com%2Fsites%2Fdefault%2Ffiles%2Fdocumentation%2Fesp32_datasheet_en.pdf&usg=AOvVaw36NvMsK4MvrPdxjJU_rLR3



  • Hi
    Thank's for answer. RF24 isn't a wifi radio, work's like RFM I believe.
    I'm building a Mysensors gateway with lan for Domoticz and as I said with Esp8266 it works and I've used the example sketch for Esp32 GW so I must made some fault. I'll try and error but if someone have tips I appreciate comment's



  • @hakha4
    Checked, I confirm sketches in examples do not work in a sheaf of ESP-RF24

    Board downloaded from git hub Expessif

    Tested on NODE MCU32S



  • @hakha4
    I take it back, the sketches work. The problem was solved as follows: connected the radio to the output of nodemcu 3.3 V. before that, the radio was on a separate power line. I think the esp32 is very power sensitive, I think it was a level mismatch on the SPI pins.

    Try it, I think you have the same problem.


 

396
Online

7.7k
Users

8.6k
Topics

92.5k
Posts