Skip to content

IDF d23b7a0361 #9466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ set(ARDUINO_ALL_LIBRARIES
LittleFS
NetBIOS
Network
PPP
Preferences
RainMaker
SD_MMC
Expand Down Expand Up @@ -157,6 +158,8 @@ set(ARDUINO_LIBRARY_LittleFS_SRCS libraries/LittleFS/src/LittleFS.cpp)

set(ARDUINO_LIBRARY_NetBIOS_SRCS libraries/NetBIOS/src/NetBIOS.cpp)

set(ARDUINO_LIBRARY_PPP_SRCS libraries/PPP/src/PPP.cpp)

set(ARDUINO_LIBRARY_Preferences_SRCS libraries/Preferences/src/Preferences.cpp)

set(ARDUINO_LIBRARY_RainMaker_SRCS
Expand Down
10 changes: 10 additions & 0 deletions Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,16 @@ config ARDUINO_SELECTIVE_Networking
depends on ARDUINO_SELECTIVE_COMPILATION
default y

config ARDUINO_SELECTIVE_Ethernet
bool "Enable Ethernet"
depends on ARDUINO_SELECTIVE_COMPILATION
default y

config ARDUINO_SELECTIVE_PPP
bool "Enable PPP"
depends on ARDUINO_SELECTIVE_COMPILATION
default y

config ARDUINO_SELECTIVE_ArduinoOTA
bool "Enable ArduinoOTA"
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_Networking
Expand Down
9 changes: 9 additions & 0 deletions cores/esp32/esp32-hal-periman.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,17 @@ const char* perimanGetTypeName(peripheral_bus_type_t type) {
case ESP32_BUS_TYPE_I2S_STD_WS: return "I2S_STD_WS";
case ESP32_BUS_TYPE_I2S_STD_DOUT: return "I2S_STD_DOUT";
case ESP32_BUS_TYPE_I2S_STD_DIN: return "I2S_STD_DIN";

case ESP32_BUS_TYPE_I2S_TDM_MCLK: return "I2S_TDM_MCLK";
case ESP32_BUS_TYPE_I2S_TDM_BCLK: return "I2S_TDM_BCLK";
case ESP32_BUS_TYPE_I2S_TDM_WS: return "I2S_TDM_WS";
case ESP32_BUS_TYPE_I2S_TDM_DOUT: return "I2S_TDM_DOUT";
case ESP32_BUS_TYPE_I2S_TDM_DIN: return "I2S_TDM_DIN";

case ESP32_BUS_TYPE_I2S_PDM_TX_CLK: return "I2S_PDM_TX_CLK";
case ESP32_BUS_TYPE_I2S_PDM_TX_DOUT0: return "I2S_PDM_TX_DOUT0";
case ESP32_BUS_TYPE_I2S_PDM_TX_DOUT1: return "I2S_PDM_TX_DOUT1";

case ESP32_BUS_TYPE_I2S_PDM_RX_CLK: return "I2S_PDM_RX_CLK";
case ESP32_BUS_TYPE_I2S_PDM_RX_DIN0: return "I2S_PDM_RX_DIN0";
case ESP32_BUS_TYPE_I2S_PDM_RX_DIN1: return "I2S_PDM_RX_DIN1";
Expand Down Expand Up @@ -104,6 +107,12 @@ const char* perimanGetTypeName(peripheral_bus_type_t type) {
case ESP32_BUS_TYPE_ETHERNET_MCD: return "ETHERNET_MCD";
case ESP32_BUS_TYPE_ETHERNET_MDIO: return "ETHERNET_MDIO";
case ESP32_BUS_TYPE_ETHERNET_PWR: return "ETHERNET_PWR";
#endif
#if CONFIG_LWIP_PPP_SUPPORT
case ESP32_BUS_TYPE_PPP_TX: return "PPP_MODEM_TX";
case ESP32_BUS_TYPE_PPP_RX: return "PPP_MODEM_RX";
case ESP32_BUS_TYPE_PPP_RTS: return "PPP_MODEM_RTS";
case ESP32_BUS_TYPE_PPP_CTS: return "PPP_MODEM_CTS";
#endif
default: return "UNKNOWN";
}
Expand Down
6 changes: 6 additions & 0 deletions cores/esp32/esp32-hal-periman.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ typedef enum {
ESP32_BUS_TYPE_ETHERNET_MCD, // IO is used as ETHERNET MCD pin
ESP32_BUS_TYPE_ETHERNET_MDIO, // IO is used as ETHERNET MDIO pin
ESP32_BUS_TYPE_ETHERNET_PWR, // IO is used as ETHERNET PWR pin
#endif
#if CONFIG_LWIP_PPP_SUPPORT
ESP32_BUS_TYPE_PPP_TX, // IO is used as PPP Modem TX pin
ESP32_BUS_TYPE_PPP_RX, // IO is used as PPP Modem RX pin
ESP32_BUS_TYPE_PPP_RTS, // IO is used as PPP Modem RTS pin
ESP32_BUS_TYPE_PPP_CTS, // IO is used as PPP Modem CTS pin
#endif
ESP32_BUS_TYPE_MAX
} peripheral_bus_type_t;
Expand Down
1 change: 1 addition & 0 deletions idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ dependencies:
idf: ">=5.1"
# mdns 1.2.1 is necessary to build H2 with no WiFi
mdns: "^1.2.3"
espressif/esp_modem: "^1.1.0"
chmorgan/esp-libhelix-mp3:
version: "1.0.3"
require: public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ uint32_t scanTime = 100; //In 10ms (1000ms)
BLEScan* pBLEScan;

class MyBLEExtAdvertisingCallbacks: public BLEExtAdvertisingCallbacks {
void onResult(esp_ble_gap_ext_adv_reprot_t report) {
void onResult(esp_ble_gap_ext_adv_report_t report) {
if(report.event_type & ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY){
// here we can receive regular advertising data from BLE4.x devices
Serial.println("BLE4.2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static esp_ble_gap_periodic_adv_sync_params_t periodic_adv_sync_params = {

class MyBLEExtAdvertisingCallbacks : public BLEExtAdvertisingCallbacks
{
void onResult(esp_ble_gap_ext_adv_reprot_t params)
void onResult(esp_ble_gap_ext_adv_report_t params)
{
uint8_t *adv_name = NULL;
uint8_t adv_name_len = 0;
Expand Down
2 changes: 1 addition & 1 deletion libraries/BLE/src/BLEAdvertisedDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class BLEExtAdvertisingCallbacks {
* As we are scanning, we will find new devices. When found, this call back is invoked with a reference to the
* device that was found. During any individual scan, a device will only be detected one time.
*/
virtual void onResult(esp_ble_gap_ext_adv_reprot_t report) = 0;
virtual void onResult(esp_ble_gap_ext_adv_report_t report) = 0;
};
#endif // SOC_BLE_50_SUPPORTED

Expand Down
14 changes: 7 additions & 7 deletions libraries/Network/src/NetworkEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,13 @@ const char * NetworkEvents::eventName(arduino_event_id_t id) {
case ARDUINO_EVENT_ETH_LOST_IP: return "ETH_LOST_IP";
case ARDUINO_EVENT_ETH_GOT_IP6: return "ETH_GOT_IP6";

// case ARDUINO_EVENT_PPP_START: return "PPP_START";
// case ARDUINO_EVENT_PPP_STOP: return "PPP_STOP";
// case ARDUINO_EVENT_PPP_CONNECTED: return "PPP_CONNECTED";
// case ARDUINO_EVENT_PPP_DISCONNECTED: return "PPP_DISCONNECTED";
// case ARDUINO_EVENT_PPP_GOT_IP: return "PPP_GOT_IP";
// case ARDUINO_EVENT_PPP_LOST_IP: return "PPP_LOST_IP";
// case ARDUINO_EVENT_PPP_GOT_IP6: return "PPP_GOT_IP6";
case ARDUINO_EVENT_PPP_START: return "PPP_START";
case ARDUINO_EVENT_PPP_STOP: return "PPP_STOP";
case ARDUINO_EVENT_PPP_CONNECTED: return "PPP_CONNECTED";
case ARDUINO_EVENT_PPP_DISCONNECTED: return "PPP_DISCONNECTED";
case ARDUINO_EVENT_PPP_GOT_IP: return "PPP_GOT_IP";
case ARDUINO_EVENT_PPP_LOST_IP: return "PPP_LOST_IP";
case ARDUINO_EVENT_PPP_GOT_IP6: return "PPP_GOT_IP6";
#if SOC_WIFI_SUPPORTED
case ARDUINO_EVENT_WIFI_OFF: return "WIFI_OFF";
case ARDUINO_EVENT_WIFI_READY: return "WIFI_READY";
Expand Down
15 changes: 8 additions & 7 deletions libraries/Network/src/NetworkEvents.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ typedef enum {
ARDUINO_EVENT_PROV_CRED_FAIL,
ARDUINO_EVENT_PROV_CRED_SUCCESS,
#endif
// ARDUINO_EVENT_PPP_START,
// ARDUINO_EVENT_PPP_STOP,
// ARDUINO_EVENT_PPP_CONNECTED,
// ARDUINO_EVENT_PPP_DISCONNECTED,
// ARDUINO_EVENT_PPP_GOT_IP,
// ARDUINO_EVENT_PPP_LOST_IP,
// ARDUINO_EVENT_PPP_GOT_IP6,
ARDUINO_EVENT_PPP_START,
ARDUINO_EVENT_PPP_STOP,
ARDUINO_EVENT_PPP_CONNECTED,
ARDUINO_EVENT_PPP_DISCONNECTED,
ARDUINO_EVENT_PPP_GOT_IP,
ARDUINO_EVENT_PPP_LOST_IP,
ARDUINO_EVENT_PPP_GOT_IP6,
ARDUINO_EVENT_MAX
} arduino_event_id_t;

Expand Down Expand Up @@ -146,6 +146,7 @@ class NetworkEvents {

friend class ESP_NetworkInterface;
friend class ETHClass;
friend class PPPClass;
#if SOC_WIFI_SUPPORTED
friend class STAClass;
friend class APClass;
Expand Down
18 changes: 9 additions & 9 deletions libraries/Network/src/NetworkInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ void NetworkInterface::_onIpEvent(int32_t event_id, void* event_data){
arduino_event.event_id = ARDUINO_EVENT_WIFI_STA_GOT_IP;
} else
#endif
// if(_interface_id == ESP_NETIF_ID_PPP){
// arduino_event.event_id = ARDUINO_EVENT_PPP_GOT_IP;
// } else
if(_interface_id == ESP_NETIF_ID_PPP){
arduino_event.event_id = ARDUINO_EVENT_PPP_GOT_IP;
} else
if(_interface_id >= ESP_NETIF_ID_ETH && _interface_id < ESP_NETIF_ID_MAX){
arduino_event.event_id = ARDUINO_EVENT_ETH_GOT_IP;
}
Expand All @@ -87,9 +87,9 @@ void NetworkInterface::_onIpEvent(int32_t event_id, void* event_data){
arduino_event.event_id = ARDUINO_EVENT_WIFI_STA_LOST_IP;
} else
#endif
// if(_interface_id == ESP_NETIF_ID_PPP){
// arduino_event.event_id = ARDUINO_EVENT_PPP_LOST_IP;
// } else
if(_interface_id == ESP_NETIF_ID_PPP){
arduino_event.event_id = ARDUINO_EVENT_PPP_LOST_IP;
} else
if(_interface_id >= ESP_NETIF_ID_ETH && _interface_id < ESP_NETIF_ID_MAX){
arduino_event.event_id = ARDUINO_EVENT_ETH_LOST_IP;
}
Expand All @@ -115,9 +115,9 @@ void NetworkInterface::_onIpEvent(int32_t event_id, void* event_data){
arduino_event.event_id = ARDUINO_EVENT_WIFI_AP_GOT_IP6;
} else
#endif
// if(_interface_id == ESP_NETIF_ID_PPP){
// arduino_event.event_id = ARDUINO_EVENT_PPP_GOT_IP6;
// } else
if(_interface_id == ESP_NETIF_ID_PPP){
arduino_event.event_id = ARDUINO_EVENT_PPP_GOT_IP6;
} else
if(_interface_id >= ESP_NETIF_ID_ETH && _interface_id < ESP_NETIF_ID_MAX){
arduino_event.event_id = ARDUINO_EVENT_ETH_GOT_IP6;
}
Expand Down
9 changes: 9 additions & 0 deletions libraries/PPP/library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name=PPP
version=1.0.0
author=Hristo Gochkov
maintainer=Hristo Gochkov <[email protected]>
sentence=Enables network connection using GSM Modem.
paragraph=With this library you can instantiate Servers, Clients and send/receive UDP packets through GSM Modem.
category=Communication
url=
architectures=esp32
Loading