Skip to content
Snippets Groups Projects
Commit c1ce8dac authored by francois's avatar francois
Browse files

update

parent 9776d2f7
Branches
No related tags found
No related merge requests found
# neOCampus / ESP32 additional boards
#
# NEOSENSOR
# NEOSENSOR (based on nodemcu-32s)
neOSensor.name=neOSensor
neOSensor.bootloader.tool=esptool_py
......
No preview for this file type
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Example OpenOCD configuration file for ESP32-WROVER-KIT board.
#
# For example, OpenOCD can be started for ESP32 debugging on
#
# openocd -f board/esp32-wrover-kit-3.3v.cfg
#
# Source the JTAG interface configuration file
source [find interface/ftdi/esp32_devkitj_v1.cfg]
set ESP32_FLASH_VOLTAGE 3.3
# Source the ESP32 configuration file
source [find target/esp32.cfg]
{
"name":"Arduino on ESP32",
"toolchainPrefix":"xtensa-esp32-elf",
"svdFile":"esp32.svd",
"request":"attach",
"postAttachCommands":[
"set remote hardware-watchpoint-limit 2",
"monitor reset halt",
"monitor gdb_sync",
"thb setup",
"c"
],
"overrideRestartCommands":[
"monitor reset halt",
"monitor gdb_sync",
"thb setup",
"c"
]
}
\ No newline at end of file
This diff is collapsed.
......@@ -42,7 +42,7 @@
*/
#define BOARD_NAME "neOSensor"
#define BOARD_REVISION 1.2
#define BOARD_FWREV 220815 // Firmware revision <year><month><day> in 2 digits each
#define BOARD_FWREV 230109 // Firmware revision <year><month><day> in 2 digits each
/* #############################################################################
......
......@@ -5,9 +5,8 @@
*
* ---
* TODO:
* - remove MAX_TCP_CONNECTIONS once we switched to MQTTs with a single connect
*
* ---
* F.Thiebolt jan.23 MAX listening TCP connexion is defined at lwip compile time
* F.Thiebolt aug.21 added support for COOLDOWN approach
* F.Thiebolt Aug.20 automatic board selection according to the compilation flag
* named XXX_BOARD (e.g NEOSENSOR_BOARD)
......@@ -40,15 +39,13 @@ typedef uint32_t firmwareRev_t;
/*
* Simultaneous TCP connexions
* Get max simultaneous listening TCP connections
*/
#ifndef MAX_TCP_CONNECTIONS
#if defined(ESP8266)
#define MAX_TCP_CONNECTIONS 8 // maximum number of simultaneous TCP connexions (5 as default)
#elif defined(ESP32)
#define MAX_TCP_CONNECTIONS 8 // maximum number of simultaneous TCP connexions (8 as default)
#endif
#endif /* MAX_TCP_CONNECTIONS */
#if defined(ESP8266)
#define MAX_TCP_CONNECTIONS MEMP_NUM_TCP_PCB_LISTEN
#elif defined(ESP32)
#define MAX_TCP_CONNECTIONS CONFIG_LWIP_MAX_LISTENING_TCP
#endif
/*
......
......@@ -30,11 +30,7 @@
/*
* Definitions
*/
#ifndef MAX_TCP_CONNECTIONS
#define MAX_ACTIVE_MODULES 5 // as a default, ESP8266 features max 5 TCP concurrent sockets
#else
#define MAX_ACTIVE_MODULES MAX_TCP_CONNECTIONS
#endif
/*
......
......@@ -10,10 +10,11 @@
*
* ---
* NOTES:
* - [ESP8266]MEMP_NUM_TCP_PCB= 8 (MAX simulteaneous listening TCP connections)
* - you need to 'deploy' our boards definitions (run the deploy.sh script)
* - select your board from the Arduino IDE boards menu (located end of list)
* - a compilation flag tells which bord it is (i.e NEOSENSOR_AIRQUALITY)
* - as of aug.20, CONFIG_LWIP_MAX_ACTIVE_TCP=16
* - as of aug.20, [ESP32] CONFIG_LWIP_MAX_ACTIVE_TCP=16
*
* ---
* KNOWN ISSUES:
......@@ -87,9 +88,6 @@
extern "C" {
#include "user_interface.h" // wifi_station_dhcpc_start, ...
}
extern "C" {
#include "espconn.h" // espconn_tcp_set_max_con() set maximum number of simultaneous TCP connexions
}
#endif /* ESP8266 */
/*
......@@ -640,11 +638,12 @@ void earlySetup( void ) {
// note: no log_xxx msg since they will get defined later
// log_info(F("\n[Early] disable autoConnect and clear saved IP ...")); log_flush();
#if defined(MAX_TCP_CONNECTIONS) && defined(ESP8266)
// set maximum number of simultaneous TCP connexions
// log_info(F("\n[Early] set max TCP concurrent sockets to ")); log_info(MAX_TCP_CONNECTIONS, DEC); log_flush();
espconn_tcp_set_max_con( MAX_TCP_CONNECTIONS );
#endif /* MAX_TCP_CONNECTIONS */
/* [jan.23] due to numerous DHCP issues, and following issue https://github.com/esp8266/Arduino/issues/8299
* we decided to set WiFi physical mode explicitly
*/
#ifdef ESP8266
WiFi.setPhyMode(WIFI_PHY_MODE_11G);
#endif /* ESP8266 */
// WiFi.disconnect(true); // to erase default credentials
WiFi.setAutoReconnect(false);
......@@ -718,15 +717,7 @@ void lateSetup( void ) {
}
#endif /* ESP32 adcanced ADC */
#if defined(MAX_TCP_CONNECTIONS) && defined(ESP8266)
log_info(F("\n# max TCP concurrent sockets = ")); log_info(MAX_TCP_CONNECTIONS, DEC); log_flush();
#elif defined(ESP32)
log_info(F("\n# max TCP concurrent sockets = ")); log_info(CONFIG_LWIP_MAX_ACTIVE_TCP, DEC); log_flush();
if( CONFIG_LWIP_MAX_ACTIVE_TCP < MAX_TCP_CONNECTIONS ) {
log_warning(F("\nNOT ENOUGHT TCP CONNEXIONS ...")); log_flush();
delay(1000);
}
#endif /* MAX_TCP_CONNECTIONS */
log_info(F("\n# max TCP listening sockets = ")); log_info(MAX_TCP_CONNECTIONS, DEC); log_flush();
// display loop() delay
log_info(F("\n# lopp() delay(ms): ")); log_info(MAIN_LOOP_DELAY,DEC); log_flush();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment