PROBLEM SOLVED!!! WeMos D1 mini code error

Hi Arduino brothers!

I have a problem with my code! I tried this one, make WeMos d1 mini as a LoRa Gateaway:LoRa Gateaway esp8266

I instaled all libraries but I have this error when I tried to verify my code: exit status 1
'Open_Sans_13' was not declared in this scope

Code is realy long and I can fix it here.

Please post the full error message so it is obvious where the error occurs

UKHeliBob:
Please post the full error message so it is obvious where the error occurs

This is it:

exit status 1
'Open_Sans_13' was not declared in this scope

Looks like you're missing a font.

AWOL:
Looks like you're missing a font.

Yes. I think so but I have used the same library as in example. I can't find info about fonts for this library. ssd1306.h

heninsh:
This is it:

exit status 1
'Open_Sans_13' was not declared in this scope

That still does not look like the full error message.
Did you copy it using the "Copy error messages" button in the IDE ?

UKHeliBob:
That still does not look like the full error message.
Did you copy it using the "Copy error messages" button in the IDE ?

If I do that then I can't post it here because it is to long.

There is end of error message:

"C:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0/tools/sdk/include" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0/tools/sdk/lwip/include" "-IC:\\Users\\henin\\AppData\\Local\\Temp\\arduino_build_793485/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10807 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DESP8266 "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\cores\\esp8266" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\variants\\d1_mini" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\libraries\\SPI" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\libraries\\ESP8266WiFi\\src" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\libraries\\ArduinoOTA" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\libraries\\ESP8266WebServer\\src" "-IC:\\Users\\henin\\Documents\\Arduino\\libraries\\Time-master" "-IC:\\Users\\henin\\Documents\\Arduino\\libraries\\esp8266-oled-ssd1306-master\\src" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\libraries\\Wire" "-IC:\\Users\\henin\\Documents\\Arduino\\libraries\\NeoPixelBus-master\\src" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\libraries\\ESP8266mDNS" "C:\\Users\\henin\\AppData\\Local\\Temp\\arduino_build_793485\\sketch\\RGBLed.cpp" -o "C:\\Users\\henin\\AppData\\Local\\Temp\\arduino_build_793485\\sketch\\RGBLed.cpp.o"
C:\Users\henin\Desktop\ESP-1ch-Gateway-master\ESP-sc-gway_JH\ESP-sc-gway_JH.ino: In function 'int receivepacket(char*)':

ESP-sc-gway_JH:903:23: error: 'Open_Sans_13' was not declared in this scope

       display.setFont(Open_Sans_13);

                       ^

Using library SPI at version 1.0 in folder: C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\SPI 
Using library ESP8266WiFi at version 1.0 in folder: C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi 
Using library ArduinoOTA at version 1.0 in folder: C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ArduinoOTA 
Using library ESP8266WebServer at version 1.0 in folder: C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer 
Using library Time-master at version 1.5 in folder: C:\Users\henin\Documents\Arduino\libraries\Time-master 
Using library esp8266-oled-ssd1306-master at version 4.0.0 in folder: C:\Users\henin\Documents\Arduino\libraries\esp8266-oled-ssd1306-master 
Using library Wire at version 1.0 in folder: C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\Wire 
Using library NeoPixelBus-master at version 2.3.4 in folder: C:\Users\henin\Documents\Arduino\libraries\NeoPixelBus-master 
Using library ESP8266mDNS in folder: C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266mDNS (legacy)
exit status 1
'Open_Sans_13' was not declared in this scope

There are other reports of this error in the video comments:

The suggested solutions:

Ed Smith
1 year ago
I commented that line out and it compiled OK but it looks like I have a bad oled display, never easy...

Dirk-Jan Faber
11 months ago
I had the same problem. I switched the font from Open_Sans_13 to ArialMT_Plain_10. At that moment, the oled was still not showing anything. I also needed to change the i2c address of the oled display from 0x3D to 0x3C (line 71 in the ino file).

It's frustrating that the author of ESP-1ch-Gateway didn't bother to document which SSD1306 library they wrote their code for. There are several libraries for this display. It does appear that the GitHub - ThingPulse/esp8266-oled-ssd1306: Driver for the SSD1306 and SH1106 based 128x64, 128x32, 64x48 pixel OLED display running on ESP8266/ESP32 library is the one, but we shouldn't need to guess at it. This is an all-too-common problem I encounter with Arduino projects.

You also could try using the suggested updated version:

I compiled that one without errors.

So I fixed my problem with code: "I switched the font from Open_Sans_13 to ArialMT_Plain_10" Then I had a next problem with oled display:"I also needed to change the i2c address of the oled display from 0x3D to 0x3C (line 71 in the ino file)."

All info I found in Youtube comment below the video.

Dirk-Jan Faber
pirms 11 mēnešiem
I had the same problem. I switched the font from Open_Sans_13 to ArialMT_Plain_10. At that moment, the oled was still not showing anything. I also needed to change the i2c address of the oled display from 0x3D to 0x3C (line 71 in the ino file).

ment

Hi arduino folks again!

I can't launch my WeMos d1 mini RFM95W gateaway. There are some problems. I added my GW to thethingsnetwork console, but I get GUI when my GW was not connected to WiFi. If my GW is connected to WiFi then I have this in my serial monitor:

Packet RSSI: -157 RSSI: -105 SNR: 0 Length: 0 21:24:16.400 -> rxpk update: {"rxpk":[{"tmst":2309970632,"chan":0,"rfch":0,"freq":868.099975,"stat":1,"modu":"LORA","datr":"SF7BW125","codr":"4/5","lsnr":0,"rssi":-157,"size":0,"data":""}]} 21:24:16.435 -> Packet RSSI: -157 RSSI: -106 SNR: 0 Length: 0 21:24:16.435 -> rxpk update: {"rxpk":[{"tmst":2343263632,"chan":0,"rfch":0,"freq":868.099975,"stat":1,"modu":"LORA","datr":"SF7BW125","codr":"4/5","lsnr":0,"rssi":-157,"size":0,"data":""}]} 21:24:16.476 -> Packet RSSI: -157 RSSI: -105 SNR: 0 Length: 0 21:24:16.476 -> rxpk update: {"rxpk":[{"tmst":2358912632,"chan":0,"rfch":0,"freq":868.099975,"stat":1,"modu":"LORA","datr":"SF7BW125","codr":"4/5","lsnr":0,"rssi":-157,"size":0,"data":""}]} 21:24:16.476 -> Packet RSSI: -157 RSSI: -104 SNR: 0 Length: 0 21:24:16.476 -> rxpk update: {"rxpk":[{"tmst":2379120632,"chan":0,"rfch":0,"freq":868.099975,"stat":1,"modu":"LORA","datr":"SF7BW125","codr":"4/5","lsnr":0,"rssi":-157,"size":0,"data":""}]} 21:24:16.503 -> Received packet of size 4 From 52.169.76.203, port 1700, Contents: 0x01:46:29:01: 21:24:16.503 -> Packet RSSI: -157 RSSI: -104 SNR: 0 Length: 0

and over and over.

OLED Display info:
Time: time is runing
RSSI: -157 and not changed.
SNR:0 and not changed.
LEN:0 and not changed.

First I want to try lastest version:GitHub - things4u/ESP-1ch-Gateway-v5.0--OLD: Version 5 of Single Channel LoRa Gateway But when I tried to compile I have an error massege:

"C:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0/tools/sdk/include" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0/tools/sdk/lwip/include" "-IC:\\Users\\henin\\AppData\\Local\\Temp\\arduino_build_498635/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10807 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DESP8266 "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\cores\\esp8266" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\variants\\d1_mini" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\libraries\\SPI" "-IC:\\Users\\henin\\Documents\\Arduino\\libraries\\Time" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\libraries\\DNSServer\\src" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\libraries\\ESP8266WiFi\\src" "-IC:\\Users\\henin\\Documents\\Arduino\\libraries\\ArduinoJson\\src" "-IC:\\Users\\henin\\Documents\\Arduino\\libraries\\gBase64" "-IC:\\Users\\henin\\Documents\\Arduino\\libraries\\ESP8266_Oled_Driver_for_SSD1306_display" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\libraries\\Wire" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\libraries\\ESP8266mDNS" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\libraries\\ESP8266WebServer\\src" "-IC:\\Users\\henin\\Documents\\Arduino\\libraries\\Streaming" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\libraries\\ESP8266httpUpdate\\src" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\libraries\\ESP8266HTTPClient\\src" "-IC:\\Users\\henin\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.3.0\\libraries\\ArduinoOTA" "C:\\Users\\henin\\AppData\\Local\\Temp\\arduino_build_498635\\sketch\\ESP-sc-gway_JH.ino.cpp" -o "C:\\Users\\henin\\AppData\\Local\\Temp\\arduino_build_498635\\sketch\\ESP-sc-gway_JH.ino.cpp.o"
In file included from C:\Users\henin\Desktop\ESP-1ch-Gateway-v5.0-master\ESP-sc-gway_JH\ESP-sc-gway_JH.ino:63:0:

C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0/tools/sdk/lwip/include/lwip/dns.h:104:54: error: 'ip_addr_t' has not been declared

 typedef void (*dns_found_callback)(const char *name, ip_addr_t *ipaddr, void *callback_arg);

                                                      ^

C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0/tools/sdk/lwip/include/lwip/dns.h:108:43: error: 'ip_addr_t' has not been declared

 void           dns_setserver(u8_t numdns, ip_addr_t *dnsserver);

                                           ^

C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0/tools/sdk/lwip/include/lwip/dns.h:109:1: error: 'ip_addr_t' does not name a type

 ip_addr_t      dns_getserver(u8_t numdns);

 ^

C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0/tools/sdk/lwip/include/lwip/dns.h:110:56: error: 'ip_addr_t' has not been declared

 err_t          dns_gethostbyname(const char *hostname, ip_addr_t *addr,

                                                        ^

Using library SPI at version 1.0 in folder: C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\SPI 
Using library Time at version 1.5 in folder: C:\Users\henin\Documents\Arduino\libraries\Time 
Using library DNSServer at version 1.1.0 in folder: C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\DNSServer 
Using library ESP8266WiFi at version 1.0 in folder: C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi 
Using library ArduinoJson at version 5.13.1 in folder: C:\Users\henin\Documents\Arduino\libraries\ArduinoJson 
Using library gBase64 at version 1.0.0 in folder: C:\Users\henin\Documents\Arduino\libraries\gBase64 
Using library ESP8266_Oled_Driver_for_SSD1306_display at version 3.2.7 in folder: C:\Users\henin\Documents\Arduino\libraries\ESP8266_Oled_Driver_for_SSD1306_display 
Using library Wire at version 1.0 in folder: C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\Wire 
Using library ESP8266mDNS in folder: C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266mDNS (legacy)
Using library ESP8266WebServer at version 1.0 in folder: C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer 
Using library Streaming in folder: C:\Users\henin\Documents\Arduino\libraries\Streaming (legacy)
Using library ESP8266httpUpdate at version 1.1 in folder: C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266httpUpdate 
Using library ESP8266HTTPClient at version 1.1 in folder: C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266HTTPClient 
Using library ArduinoOTA at version 1.0 in folder: C:\Users\henin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ArduinoOTA 
exit status 1
Error compiling for board WeMos D1 R2 & mini.

PROBLEM SOLVED!!! I got that code from other user and all works perfecty!

Something wrong with GitHub - things4u/ESP-1ch-Gateway-v5.0--OLD: Version 5 of Single Channel LoRa Gateway