KIWI and Ethernet

#1

Hi All,

First post in the community, so please forgive me if I am asking something obvious:
To speed up development we would like to use the KIWI BLE gateway on an Olimex ESP32-POE, but I am not sure if KIWI can be configured to use Ethernet instead of WiFi.

Thanks

/Claudio

#2

It can - there is no difference actually what the Internet connection is.

1 Like
#3

Uhm… I’m afraid it’s not simple as that. Flashing mongoose-os on Olimex hardware (tested with ESP32-GATEWAY and ESP32-POE-ISO) works out of the box, but KIWI does not. Bought two copies for two boards, but we cannot get past the detection of LAN IC (see image). No IP address assigned (WiFi works, tho’).

#4

Please try this:

mos config-set eth.phy_pwr_gpio=12 eth.enable=true eth.clk_mode=3 board.led1.pin=-1 board.btn1.pin=-1 wifi.sta.enable=false wifi.ap.enable=false
#5

Thanks @cpq , tried. After the configuration we see two reboots:

the first one logs:

esp32_eth.c:110 ETH: MAC 24:0a etc.etc.
emac: emac reset done
mgos_wifi.c:473 WiFi mode: off

…but looking at the dhcp server, no leases assigned for the board.

The second reboot makes Ethernet disappear (no more ETH: MAC line) and WiFi AP is re-enabled.

#6

Maybe SPI plays some role here ? I see that disabling it (we don’t need it at all) KIWI goes mad and restarts because it WANTS to have spi enabled for the display. Moreover, looking at esp32-arduino header i see for esp32-poe-iso:

#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT
#define ETH_PHY_POWER 12

static const uint8_t KEY_BUILTIN = 34;

static const uint8_t TX = 1;
static const uint8_t RX = 3;

#define TX1 4
#define RX1 36

#define TX2 33 // ext2 pin 5
#define RX2 35 // ext2 pin 3

static const uint8_t SDA = 13;
static const uint8_t SCL = 16;

static const uint8_t SS = 5;
static const uint8_t MOSI = 2;
static const uint8_t MISO = 15;
static const uint8_t SCK = 14;

whereas esp32-gateway has (I have a Rev. C board):

#if ARDUINO_ESP32_GATEWAY >= ‘D’
#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT
#define ETH_PHY_POWER 5
#endif

static const uint8_t LED_BUILTIN = 33;
#define BUILTIN_LED LED_BUILTIN // backward compatibility

static const uint8_t KEY_BUILTIN = 34;

static const uint8_t SCL = 16; // This is extention pin 11
static const uint8_t SDA = 32; // This is extention pin 13

static const uint8_t SS = 5;
static const uint8_t MOSI = 23;
static const uint8_t MISO = 19;
static const uint8_t SCK = 18;

static const uint8_t TX = 1;
static const uint8_t RX = 3;

static const uint8_t A0 = 36;
static const uint8_t A3 = 39;
static const uint8_t A4 = 32;
static const uint8_t A7 = 35;
static const uint8_t T9 = 32;

#if ARDUINO_ESP32_GATEWAY >= ‘F’
#define BOARD_HAS_1BIT_SDMMC
#endif

#7

The display logic is loaded only if spi.enable is true.
You could try to clear the init.js file before setting spi.enable to false:

touch /tmp/empty_file
mos put /tmp/empty_file init.js
mos config-set spi.enable=false
#8

Unfortunately this is not helping, either. Seems this product was never tried with Ethernet. And I wanted to speed up development :flushed:
If this is not going to work, could I have my 12$ back, please (I got one more license in the meantime) ?

#9

Sure. Remind your Stripe transaction ID, we’ll refund.