Hi everybody,
after a long period I decided to play again with B4R and I faced a problem.
I have bought (and received) this module
Geekcreit® Mini NodeMCU ESP8266 WIFI Development Board Based On ESP-12F
I have updated the library of ESP8266 to 2.5.2 and B4R in version 3.0.0.
In B4R I have this settings:
I run the sketch. Everything looks to compile fine but when it tries to install the sketch nothing happens (the red led on the board stays constantly on - no blinking as the arduinos) and I get the following log error.
(Full Error Log)
The code I run was copied from the forum and it is the following:
When I also try to update the com ports I see only COM1 again.
Any suggestion will be highly appreciated.
after a long period I decided to play again with B4R and I faced a problem.
I have bought (and received) this module
Geekcreit® Mini NodeMCU ESP8266 WIFI Development Board Based On ESP-12F
I have updated the library of ESP8266 to 2.5.2 and B4R in version 3.0.0.
In B4R I have this settings:
I run the sketch. Everything looks to compile fine but when it tries to install the sketch nothing happens (the red led on the board stays constantly on - no blinking as the arduinos) and I get the following log error.
B4R Version: 3.00
Parsing code. (0.00s)
Building folders structure. (0.01s)
Compiling code. (0.00s)
Building project (0.02s)
Compiling & deploying Ino project (NodeMCU 1.0 (ESP-12E Module) - COM1) Error
Loading configuration...
Initializing packages...
.
.
.
.
.
Preparing boards...
Verifying...
Uploading...
esptool.py v2.6
2.6
esptool.py v2.6
Serial port COM1
Connecting........_____....._____....._____....._____....._____....._____.....____Traceback (most recent call last):
File "C:\Users\Nikos\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2/tools/upload.py", line 25, in <module>
esptool.main(fakeargs)
File "C:/Users/Nikos/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\esptool.py", line 2653, in main
esp.connect(args.before)
File "C:/Users/Nikos/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\esptool.py", line 468, in connect
raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
_
An error occurred while uploading the sketch
DEBUG StatusLogger Stopping LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@10ab13f]
DEBUG StatusLogger Stopping LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@10ab13f]...
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868,component=StatusLogger]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868,component=ContextSelector]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868,component=Loggers,name=]
TRACE StatusLogger Unregistering 2 MBeans: [org.apache.logging.log4j2:type=af3868,component=Appenders,name=RollingFile, org.apache.logging.log4j2:type=af3868,component=Appenders,name=Console]
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=AsyncAppenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=AsyncLoggerRingBuffer'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=Loggers,name=*,subtype=RingBuffer'
TRACE StatusLogger Stopping XmlConfiguration[location=jar:file:/C:/B4X/Tools/B4R/arduino-1.8.10/lib/pde.jar!/log4j2.xml]...
TRACE StatusLogger XmlConfiguration notified 2 ReliabilityStrategies that config will be stopped.
TRACE StatusLogger XmlConfiguration stopping 1 LoggerConfigs.
TRACE StatusLogger XmlConfiguration stopping root LoggerConfig.
TRACE StatusLogger XmlConfiguration notifying ReliabilityStrategies that appenders will be stopped.
TRACE StatusLogger XmlConfiguration stopping remaining Appenders.
DEBUG StatusLogger Shutting down RollingFileManager C:\Users\Nikos\AppData\Local\Arduino15/logs/application.log
DEBUG StatusLogger Shutting down RollingFileManager C:\Users\Nikos\AppData\Local\Arduino15/logs/application.log
DEBUG StatusLogger All asynchronous threads have terminated
DEBUG StatusLogger RollingFileManager shutdown completed with status true
DEBUG StatusLogger Shut down RollingFileManager C:\Users\Nikos\AppData\Local\Arduino15/logs/application.log, all resources released: true
DEBUG StatusLogger Appender RollingFile stopped with status true
DEBUG StatusLogger Shutting down OutputStreamManager SYSTEM_ERR.false.false
DEBUG StatusLogger Shut down OutputStreamManager SYSTEM_ERR.false.false, all resources released: true
DEBUG StatusLogger Appender Console stopped with status true
TRACE StatusLogger XmlConfiguration stopped 2 remaining Appenders.
TRACE StatusLogger XmlConfiguration cleaning Appenders from 2 LoggerConfigs.
DEBUG StatusLogger Stopped XmlConfiguration[location=jar:file:/C:/B4X/Tools/B4R/arduino-1.8.10/lib/pde.jar!/log4j2.xml] OK
DEBUG StatusLogger Stopped LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@10ab13f] with status true
Parsing code. (0.00s)
Building folders structure. (0.01s)
Compiling code. (0.00s)
Building project (0.02s)
Compiling & deploying Ino project (NodeMCU 1.0 (ESP-12E Module) - COM1) Error
Loading configuration...
Initializing packages...
.
.
.
.
.
Preparing boards...
Verifying...
Uploading...
esptool.py v2.6
2.6
esptool.py v2.6
Serial port COM1
Connecting........_____....._____....._____....._____....._____....._____.....____Traceback (most recent call last):
File "C:\Users\Nikos\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2/tools/upload.py", line 25, in <module>
esptool.main(fakeargs)
File "C:/Users/Nikos/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\esptool.py", line 2653, in main
esp.connect(args.before)
File "C:/Users/Nikos/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\esptool.py", line 468, in connect
raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
_
An error occurred while uploading the sketch
DEBUG StatusLogger Stopping LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@10ab13f]
DEBUG StatusLogger Stopping LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@10ab13f]...
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868,component=StatusLogger]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868,component=ContextSelector]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868,component=Loggers,name=]
TRACE StatusLogger Unregistering 2 MBeans: [org.apache.logging.log4j2:type=af3868,component=Appenders,name=RollingFile, org.apache.logging.log4j2:type=af3868,component=Appenders,name=Console]
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=AsyncAppenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=AsyncLoggerRingBuffer'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=Loggers,name=*,subtype=RingBuffer'
TRACE StatusLogger Stopping XmlConfiguration[location=jar:file:/C:/B4X/Tools/B4R/arduino-1.8.10/lib/pde.jar!/log4j2.xml]...
TRACE StatusLogger XmlConfiguration notified 2 ReliabilityStrategies that config will be stopped.
TRACE StatusLogger XmlConfiguration stopping 1 LoggerConfigs.
TRACE StatusLogger XmlConfiguration stopping root LoggerConfig.
TRACE StatusLogger XmlConfiguration notifying ReliabilityStrategies that appenders will be stopped.
TRACE StatusLogger XmlConfiguration stopping remaining Appenders.
DEBUG StatusLogger Shutting down RollingFileManager C:\Users\Nikos\AppData\Local\Arduino15/logs/application.log
DEBUG StatusLogger Shutting down RollingFileManager C:\Users\Nikos\AppData\Local\Arduino15/logs/application.log
DEBUG StatusLogger All asynchronous threads have terminated
DEBUG StatusLogger RollingFileManager shutdown completed with status true
DEBUG StatusLogger Shut down RollingFileManager C:\Users\Nikos\AppData\Local\Arduino15/logs/application.log, all resources released: true
DEBUG StatusLogger Appender RollingFile stopped with status true
DEBUG StatusLogger Shutting down OutputStreamManager SYSTEM_ERR.false.false
DEBUG StatusLogger Shut down OutputStreamManager SYSTEM_ERR.false.false, all resources released: true
DEBUG StatusLogger Appender Console stopped with status true
TRACE StatusLogger XmlConfiguration stopped 2 remaining Appenders.
TRACE StatusLogger XmlConfiguration cleaning Appenders from 2 LoggerConfigs.
DEBUG StatusLogger Stopped XmlConfiguration[location=jar:file:/C:/B4X/Tools/B4R/arduino-1.8.10/lib/pde.jar!/log4j2.xml] OK
DEBUG StatusLogger Stopped LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@10ab13f] with status true
(Full Error Log)
The code I run was copied from the forum and it is the following:
B4X:
Sub Process_Globals
Public Serial1 As Serial
Private wifi As ESP8266WiFi
Private server As WiFiServerSocket
Private astream As AsyncStreams
' Private ser As B4RSerializator
End Sub
Private Sub AppStart
Serial1.Initialize(57600)
Log("AppStart")
RunNative( "SetIP" , Null )' STATIC IP 192.168.1.6 ---> code #if C
'ACCESS POINT
If wifi.StartAccessPoint2("NFAccessPointESP","12345678") Then ' Router SSID e Passw.
Log("Connected Access Point")
Log("Module ESP-12 IP: ", wifi.LocalIp)
Else
Log("Failed to connect")
Return
End If
server.Initialize(51042, "server_NewConnection")
server.Listen
End Sub
Sub Server_NewConnection (NewSocket As WiFiSocket)
Log("Client connected")
astream.Initialize(NewSocket.Stream, "astream_NewData", "astream_Error")
End Sub
Sub AStream_NewData (Buffer() As Byte)
End Sub
Sub AStream_Error
Log("Error")
server.Listen
End Sub
'STATIC IP (Replace with desired IP)
#if C
void SetIP(B4R::Object* o) {
IPAddress ip(192, 168, 1, 50); // (Replace with desired IP)
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 255, 0);
WiFi.config(ip, gateway, subnet);
}
#end if
When I also try to update the com ports I see only COM1 again.
Any suggestion will be highly appreciated.
Last edited: