Commit Graph

173 Commits

Author SHA1 Message Date
Luc
5cfff190e9 removing log (#2140)
* Use right function for BSSID

* removing log
2018-12-03 16:17:16 +01:00
Luc
f644d9d157 Use right function for BSSID (#2132) 2018-12-01 10:20:13 +01:00
Luc
ce340faf94 Clean warnings when all warning enabled (#2112)
* Clean warnings when all warning enabled

Not used variables / functions due to debug log

Dual define with different values :
cores\esp32/binary.h
#define B110 6
#define B1000000 64

tools/sdk/include/newlib/sys/termios.h
#define B110        3
#define B1000000   23

Local variable returned in WiFiclient Secure

* change due to deprecated function

* Update with proper variable and label

* Update esp32-hal-i2c.c

* Apply changes requested

* Fix warnings due to #define conflict thanks @atanisoft
2018-11-29 11:34:55 +01:00
Martin
c7fa251d78 updated WifiClientEnterprise example (#1988)
* updated WifiClientEnterprise example

* Update WiFiClientEnterprise.ino
2018-11-19 16:59:56 +01:00
Martin
a53c9de09d Updated table of tested locations - Enterprise wifi networks - WifiClientEnterprise (#1980)
* Updated table of tested locations

* updated
2018-11-19 16:58:07 +01:00
Jeroen88
01d22c8807 Feature/http client (#1973)
* Pass client parameter into two new begin() functions. Set other begin() functions deprecated. Updated library version to 1.2

* Added working HTTPS example on a public url with a certificate

* Remove two unnecessary tests in ::disconnect()

* Add a scoping block to BasicHttpsClient.ino to assure HTTPClient is destroyed before WiFiClientSecure

* Added check to handle mixup of old and present api properly

* Correct HTTPClient::setTimeout() to convert milliseconds to seconds. Correct WiFiClient::setTimeout() to call Stream::setTimeout() with seconds converted back to milliseconds. Remove inproper checks for _insecure.

* Added small comment because it looked like the Travis build did not finish
2018-11-19 16:57:23 +01:00
Mark D
14ff311479 make WiFi.softAP() more robust (#1925)
* make WiFi.softAP() more robust

* WiFi.softAP() revert fallback to WIFI_AUTH_OPEN
2018-11-19 16:43:59 +01:00
Junxiao Shi
a3ed511884 WiFi: improve WiFiEvent list in WiFiClientEvents example (#1917)
fixes #1875
2018-11-19 16:42:33 +01:00
Rob de Jonge
9e2888392e Added a message for all event types. (#1916) 2018-11-19 16:41:56 +01:00
Me No Dev
96822d783f
Update IDF to 3.2-3276a13 and esptool.py to 2.5.0 (#1878)
* TX Flow Control and Code cleanup

* Use semaphore instead of delay

TX functionality is done.

* Use single buffer and empty queue on exit

* Fix compile issues because of LwIP code relocation

* Add temporary header to fix Azure not compiling

* Fix AsyncUDP early init

* AsyncUDP Multicast fixes

* Add source mac address and rework multicast

* Allow redefinition of default pins for Serials 1 and 2

* Update IDF to 3276a13

* Update esptool.py to 2.5.0

* Fix sketches

* Fix log level in BluetoothSetial
2018-09-21 08:39:36 +02:00
Martin
cb8d72fdc7 Fix WifiClientEnterprise - STA mode set (#1782)
Few testers let me know, they were unable with connection to Eduroam network under PEAP+MsCHAPv2 methods.
They were trying many modifications. Solution is very absurd. 
Change board to STA mode manually. 
One tester from Italy was able to connect to Eduroam network under TTLS + MsCHAPv2 with that sketch too!

Sketch was tested and worked almost for all testers with that problem.
2018-09-17 21:43:16 +02:00
Junxiao Shi
1e4bf14a3e cores: replace max, min, round macros with imports from std (#1783)
fixes #1734
2018-09-17 21:33:01 +02:00
Ifediora Elochukwu C
c8fe873965 add WiFiAccessPoint example (#1833) 2018-09-17 21:24:23 +02:00
Martin
cb53ec4891 Informations about WifiClientEnterprise.ino sketch (#1737)
* informations about sketch

* Update README.md
2018-08-14 12:00:31 +02:00
copercini
e346f20aa9
Fix WiFiMulti Logs 2018-07-30 09:42:44 -03:00
copercini
abb8ea99d5 Fix WiFiMulti Logs (#1690) 2018-07-30 10:18:48 +03:00
Jan P. Schümann
328523f5e3 Memory leak (#1672)
When a package of size 0 arrives, "buf" is created, but never released. (Sorry, that was my mistake in the last patch)
2018-07-25 12:56:41 +02:00
Martin
d854dc1bf6 Create WiFiClientEnterprise.ino (#1640)
Sketch for ESP32 boards that allow them to connect to WPA/WPA2 Enterprise Networks.
2018-07-24 19:57:57 +02:00
Schuemi
f1f8d7e306 Packet with zero data length (#1659)
If you receive a package with a data length of zero, parsePacket returns 0, but rx_buffer will exist. So if another parsePacket with no read access returns to zeros, there is still data that can be read. This example would not work: https://www.arduino.cc/en/Reference/EthernetUDPParsePacket

Also I added a check if rx_buffer exit when you try to flush it.
2018-07-24 19:52:42 +02:00
me-no-dev
05d72f963d fix WiFi STA going into loop in some cases of disconnect 2018-07-16 22:50:52 +02:00
me-no-dev
44f5a4dbc8 Fix Client returning disconnected because of VFS errors 2018-07-16 20:08:27 +02:00
me-no-dev
4e9d1ee237 Fix connected to be wrongly reported in WiFiClient 2018-07-10 21:05:44 +02:00
me-no-dev
c1a94b5326 Fix wrong event description 2018-07-10 16:13:34 +02:00
me-no-dev
3e160587f3 Fix WiFi Client not properly reporting connected state 2018-07-10 15:01:40 +02:00
me-no-dev
9efecc1be0 Implement RX buffer for WiFi client to speed up small reads 2018-07-05 22:31:58 +02:00
me-no-dev
8afdd71b3a Add missing event string to WiFi events 2018-07-05 22:30:54 +02:00
me-no-dev
871dd183d8 Print to debug the IP address obtained by DHCP 2018-07-05 16:04:07 +02:00
me-no-dev
bad53905e8 Prevent exceptions in WiFi if not yet started 2018-07-05 12:28:15 +02:00
me-no-dev
659c8ad528 Fix TelnetToSerial sketch 2018-07-03 21:51:24 +02:00
Me No Dev
a59eafbc9d
Update IDF to aaf1239 (#1539)
* fix sdmmc config

* Fix warnings in EEPROM

from @Curclamas

* remove leftover TAG in EEPROM

* Initial add of @stickbreaker i2c

* Add log_n

* fix warnings when log is off

* i2c code clean up and reorganization

* add flags to interrupt allocator

* fix sdmmc config

* Fix warnings in EEPROM

from @Curclamas

* remove leftover TAG in EEPROM

* fix errors with latest IDF

* fix debug optimization (#1365)

incorrect optimization for debugging tick markers.

* Fix some missing BT header

* Change BTSerial log calls

* Update BLE lib

* Arduino-ESP32 release management scripted (#1515)

* Calculate an absolute path for a custom partitions table (#1452)

* * Arduino-ESP32 release management scripted
(ready-to-merge)

* * secure env for espressif/arduino-esp32

* * build tests enabled
* gitter webhook enabled

* * gitter room link fixed
* better comment

* * filepaths fixed

* BT Serial adjustments

* * don't run sketch builds & tests for tagged builds

* Return false from WiFi.hostByName() if hostname is not resolved

* Free BT Memory when BT is not used

* WIFI_MODE_NULL is not supported anymore

* Select some key examples to build with PlatformIO to save some time

* Update BLE lib

* Fixed BLE lib

* Major WiFi overhaul

- auto reconnect on connection loss now works
- moved to event groups
- some code clean up and procedure optimizations
- new methods to get a more elaborate system ststus

* Add cmake tests to travis

* Add initial AsyncUDP

* Add NetBIOS lib and fix CMake includes

* Add Initial WebServer

* Fix WebServer and examples

* travis not quiting on build fail

* Try different travis build

* Update IDF to aaf1239

* Fix WPS Example

* fix script permission and add some fail tests to sketch builder

* Add missing space in WiFiClient::write(Stream &stream)
2018-06-27 09:01:06 +02:00
Alan
d06fa8ee70 Make scanNetworks return int16 (#1496) (#1514) 2018-06-19 11:32:12 +03:00
sticilface
c24a3404c6 Add SYSTEM_EVENT_WIFI_READY call back + WiFiMode fixes (#1322)
* Add `SYSTEM_EVENT_WIFI_READY` call back once wifi service is init.  allows you to hook in, as the sdk does not generate this event for you.
As it stands the SDK does not appear to set `WIFI_MODE_NULL` correctly.  if the wifi is initialised and set to `WIFI_MODE_NULL` it actually defaults to AP mode.  This fix keeps `WIFI_MODE_NULL` within the ESP class if the wifi has not been init yet, and works in my testing.  albeit a one sided conversation.
https://github.com/espressif/arduino-esp32/issues/1306

* make changes compatible with new _persistent behaviour.
2018-05-23 10:53:01 +02:00
Ramesh
f14de5cf14 WiFi disconnect reason message updated (#1323)
wifi_err_reason_t doesn't have reason code 12. After reason code 11, we are getting wrong wifi disconnected reason message. Added "UNSPECIFIED"  in place of reason code 12.
And above 201 reason code, it should be r-176 instead of r-177. Because messages are started from zeroth offset.
2018-05-14 13:12:04 +02:00
Tim P
6bf7619ccc std::functioanl for WFIF event + Minor fix (#1366)
* add missing bits from esp8266 to help porting other libs

* Clean Up of Wifi event

* Exampl of Wifi Events
2018-05-14 13:05:49 +02:00
chemicstry
611db61d84 Fix WiFiClient error handling (#1388) 2018-05-14 13:01:22 +02:00
Clemens Kirchgatterer
0ea9ea4447 Fix WiFi.persistent(false); having no effect. (#1406)
This PR calls `esp_wifi_set_storage(WIFI_STORAGE_RAM);` when
  persistent WiFi configuration is not desired.
2018-05-14 12:59:59 +02:00
Craig Leres
c92b617397 Convert the few remaining cr/lf files to use lf for eol. (#1316)
If you develop on windows and need cr/lf files, see this:

    https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_formatting_and_whitespace

    Git can handle this by auto-converting CRLF line endings into LF
    when you add a file to the index, and vice versa when it checks out
    code onto your filesystem. You can turn on this functionality with
    the core.autocrlf setting. If you're on a Windows machine, set it
    to true - this converts LF endings into CRLF when you check out code:

    $ git config --global core.autocrlf true
2018-04-16 16:34:39 +02:00
FloX
2ded419486 Update WiFiMulti.cpp (#1220)
* Update WiFiMulti.cpp

added 5 sec timeout from ESP8266

* Update WiFiMulti.cpp

* Update WiFiMulti.h
2018-04-06 19:10:06 +03:00
Shawn A
f6a4b024c7 fixes #1249 (#1269) 2018-04-06 19:02:21 +03:00
Shawn A
848f98e5f0 fix event reason logging > 176 (#1132)
off by one
2018-03-04 21:05:54 +01:00
Marco Tombesi
bb8b255429 fix issue 1081 and 1086 Wifi connection error when using STATIC IP settings (#1129) 2018-03-04 21:05:24 +01:00
me-no-dev
8332a235d6 fix issue with STA emiting the wrong event 2018-01-18 13:54:26 +02:00
Me No Dev
600f4c4130
Update IDF to 1c3dd23
* Update mDNS and LEDC

* update toolchain

* Update IDF to 1c3dd23

* Advertise the board variant for Arduino OTA

* Add generic variant definition for mDNS
2018-01-18 00:56:58 +02:00
copercini
70d0d46487 Enable static IP via ethernet (#924) 2017-12-19 14:07:22 +01:00
Frank Sautter
75bc1e648b Allow configuration of Ethernet PHY clock source (#916)
* Allow configuration of Ethernet PHY clock source
Refer to https://github.com/espressif/esp-idf/pull/1127
The internal APLL can be used to generate the 50MHz clock for the internal EMAC and the external Ethernet PHY.
The clock can either be input on GPIO0 (as before) or output on GPIO0, GPIO16 or GPIO17 (only GPIO17 extensively tested).
New example available.

* Allow configuration of Ethernet PHY clock source
Refer to https://github.com/espressif/esp-idf/pull/1127
The internal APLL can be used to generate the 50MHz clock for the internal EMAC and the external Ethernet PHY.
The clock can either be input on GPIO0 (as before) or output on GPIO0, GPIO16 or GPIO17 (only GPIO17 extensively tested).
New example available.
2017-12-19 14:06:01 +01:00
Masaki Koyanagi
79e5d4c40d Allow PSK instead of passphrase in WiFiSTA::begin (#897) 2017-12-04 17:46:49 +01:00
me-no-dev
f0336b38ad fix change in IDF causing havoc when used as component 2017-11-30 16:17:26 +01:00
allex1978
47cdfff475 Now SmartConfig works! (#807)
* little fix to WiFiSTA.cpp

Now SmartConfig works! Tested on ESP32

* little fix to WiFiSTA.cpp

Now SmartConfig works! Tested on ESP32
2017-11-06 20:10:48 +02:00
Me No Dev
0c038b4063 Update WiFiGeneric.cpp
Missed definition
2017-10-21 09:50:43 +03:00
Me No Dev
43544d89c5 Run WiFi thread on the Arduino core
Fixes: https://github.com/espressif/arduino-esp32/issues/749

Works even when single core mode is selected
2017-10-21 09:47:24 +03:00
me-no-dev
81f225a4c5 Fix ioctl undefined in latest IDF 2017-10-18 10:51:18 +02:00
me-no-dev
e72895b722 Quiet SSL and HTTPClient debug 2017-09-29 20:31:45 +08:00
me-no-dev
28b7b4e287 Move network events to their own task 2017-09-28 11:41:35 +08:00
me-no-dev
eb282131ba Allow DHCP to be started again by giving a zero IP address to STA config
Fixes: https://github.com/espressif/arduino-esp32/issues/654
2017-09-22 12:20:53 +08:00
Pranav Cherukupalli
17add63139 Add Example Code for WPS Functionality (#648) 2017-09-21 16:47:45 +08:00
me-no-dev
4cf0e98f32 Fix desync with IDF in dhcpserver 2017-09-20 15:36:39 +08:00
me-no-dev
f648ad7cea Allow WiFi Event Callback to read the event info
Helps in cases where Event Info is needed (WPS and others)
2017-09-18 17:54:57 +08:00
copercini
9edf65d56e Static IP example 2017-09-09 00:15:54 -03:00
Tomasz Scislowicz
3a8e28dc87 change esp_wifi_scan_start to async mode (#574) 2017-08-17 16:12:35 +03:00
me-no-dev
9618eec19e Set DNS IP to type V4
Fixes: https://github.com/espressif/arduino-esp32/issues/553
2017-08-02 09:32:05 +03:00
me-no-dev
3af1710a92 Add initial support for Ethernet and examples 2017-08-02 00:02:45 +03:00
sticilface
91d02cc6d5 Change disconnect function (#466)
* Change disconnect function

Current implementation does not disconnect the WiFi. Use of `esp_wifi_disconnect()` does.

* Update WiFiSTA.cpp

put back the clear ssid + password
remove the duplicate `esp_wifi_set_config(WIFI_IF_STA, &conf);`
2017-08-01 12:59:52 +03:00
bbx10
37ef5a43e3 Handle partial socket send (#503)
send() can return a value > 0 but less than size indicating it was able to accept some of the data in buffer. The caller must try again after updating the buffer pointer and size remaining.
2017-07-31 22:51:41 +03:00
me-no-dev
7811668fb1 Make sure that WiFi is started before trying to erase configuration.
Connected to: https://github.com/espressif/arduino-esp32/issues/400
2017-06-21 12:42:58 +03:00
me-no-dev
409926ef77 Fix commits duplicating methods 2017-06-14 13:48:48 +03:00
bbx10
b05c7dfa59 Additions to WiFiClient and WiFiServer (#404)
Required for WebServer and/or DNSServer libraries
2017-06-14 10:22:16 +02:00
bbx10
26677a4b05 Add WiFiClient localIP and localPort (#428)
Implement methods from ESP8266WiFiClient but use sockets API.
2017-06-14 10:17:14 +02:00
SO_yeah
73cd8d7f7e set max clients from code (#432)
* Update WiFiAP.cpp

set from code the maximum number of clients to smaller than 4 (in my case i must allow only one client at a time)

* Update WiFiAP.h

* Update WiFiAP.cpp

* Update WiFiAP.cpp

* Create WiFiAP.cpp
2017-06-14 10:14:14 +02:00
Joey Babcock
4d47deab24 Some grammar/spelling fixes (#438) 2017-06-14 10:12:59 +02:00
me-no-dev
0e513f3a4b Make sure WiFi is initialized in disconnect.
Fixes: https://github.com/espressif/arduino-esp32/issues/400
2017-05-29 13:12:42 +03:00
me-no-dev
5d92784710 Call esp_wifi_start in WiFi::begin
Fixes: https://github.com/espressif/arduino-esp32/issues/391
2017-05-23 11:32:03 +03:00
bbx10
432bcf5a0a Add WiFiServer hasClient and WiFiTelnetToSerial example (#394)
WiFiTelnetToSerial is also a test for hasClient().
2017-05-23 08:12:39 +02:00
me-no-dev
db09ca8c16 Make SimpleBLE work again
Fixes: https://github.com/espressif/arduino-esp32/issues/373
2017-05-22 17:50:57 +03:00
me-no-dev
b6e83fac62 Initial WiFi auto reconnect implementation
This needs proper testing!
Fixes: https://github.com/espressif/arduino-esp32/issues/353
2017-05-22 16:29:41 +03:00
me-no-dev
21ff3d0e32 Slight rework of WiFi Class
- call esp_wifi_start()
- separate tcp initialization to prepare for Ethernet
- setup dhcp addresses when using custom IP config for SoftAP
2017-05-22 15:31:23 +03:00
me-no-dev
88293a4284 Implement WiFiClient.peek()
Thanks @miomir1981
2017-05-22 15:27:34 +03:00
bbx10
06a76eebe8 Remote tcp disconnect not detected (#389)
* Add setNoDelay and getNoDelay to WiFiServer class

* Remote TCP disconnect not detected
2017-05-22 14:16:07 +02:00
me-no-dev
b1b77a658f WiFiClient::peek should return -1 instead of 0
Fixes: https://github.com/espressif/arduino-esp32/issues/329
2017-05-06 18:30:38 +03:00
tzxespressio
6006308575 fix some compile issue in cpp project(like WiFiMulti.h) (#350) 2017-05-05 09:59:01 +03:00
Me No Dev
6519a35799 Fix WifiUDP::beginMulticastPacket()
Fixes: https://github.com/espressif/arduino-esp32/issues/304

Thanks @jliegner :)
2017-04-11 00:08:18 +03:00
me-no-dev
7e5b278107 Add new control to WiFi Scan 2017-04-04 02:03:54 +03:00
Me No Dev
7e45310771 Fix UDP TX Buffer not set to NULL after free
thans @martinayotte
2017-04-03 20:54:57 +03:00
me-no-dev
fcbb3e7987 Reconnect WiFi on Auth Expire
Should Fix: https://github.com/espressif/arduino-esp32/issues/234
2017-03-26 00:28:45 +02:00
me-no-dev
a07f9842af Fix SmartConfig not saving the correct config
Fixes: https://github.com/espressif/arduino-esp32/issues/275
2017-03-24 13:20:31 +02:00
me-no-dev
87b7182ef1 Give WiFiClient more time to select for writing
Fixes: https://github.com/espressif/arduino-esp32/issues/263
2017-03-20 11:31:55 +02:00
copercini
9dae9cea37 Fix for WiFiMulti (#264)
Actually WiFiMulti is not working due some functions haven't equal comportment of ESP8266
Replace status == WL_DISCONNECTED => status != WL_CONNECTED
Replace scanComplete() => scanNetworks()

Maybe is more interesting, for keep the maximum compatibility, investigate why WL_DISCONNECTED and scanComplete() doesn't works in this case instead of just replace by this pull request.
2017-03-20 10:23:05 +01:00
me-no-dev
8fb8478431 Flush client with single call to available 2017-03-03 14:56:18 +02:00
me-no-dev
946e52da98 Break on any error when flushing a client 2017-03-02 12:32:32 +02:00
me-no-dev
6fc96b977f Add WiFiClient flush to clear all non-read data in RX
fixes: https://github.com/espressif/arduino-esp32/issues/119
2017-03-02 02:49:53 +02:00
David Schroeder
f0fc28f0e3 Rework WiFiClient (#238)
* Rework WiFiClient

Rework WiFiClient to correct error where making a copy of a WiFiClient object resulted in the socket being closed prematurely.

Added loop and select to write to handle/prevent EAGAIN errors.

* Rework WiFiClient to use shared_ptr

Rework changes to utilize shared_ptr rather than manually maintaining reference count. 

Revert changes to write

* Incorporate comments from review

Move WiFiClientSocketHandle and fd() into WiFiClient.cpp
2017-03-02 00:47:16 +02:00
David Schroeder
770830aa01 Revise WiFiClient::Write to handle EAGAIN (#240)
The send call may return EAGAIN. This indicates a recoverable error and a retry should be attempted. The current implementation treats this as a fatal error. Further, the current implementation strips the error code, setting it to 0, which prevents the caller from handling it directly. 
This change utilizes select to verify the socket is available prior to calling send and will retry on an EAGAIN condition.
2017-03-01 00:37:00 +02:00
me-no-dev
1d759380a6 Major IDF and Arduino Update
WiFi and BlueTooth can now be started and stopped at will.
basic functions added to esp32-hal to start and stop the BT radio
SimpleBLE class added to show the most basic functionality
Example to show how to switch between BT, WiFi or Both
2017-02-23 01:11:57 +02:00
Me No Dev
fb8fe671d6 New partitions (#192)
* Add new partition scheme

* Init NVS early, so it can be used without BT or WiFi
2017-02-10 14:11:24 +02:00
me-no-dev
1f0df1ef97 Fix wrong return values for WiFi::softAPConfig
fixes: https://github.com/espressif/arduino-esp32/issues/191
2017-02-10 13:49:43 +02:00
me-no-dev
0101564219 fix compilation error if debug level is above debug and less or equal to warn 2017-02-10 04:27:48 +02:00
me-no-dev
8df22cac80 Store WiFi settings in flash
Fixes: https://github.com/espressif/arduino-esp32/issues/173
2017-02-10 02:01:16 +02:00
Martin Sloup
3e87dcf748 beginPacket can be used without listening on socket (#185)
Currently there is bug in WiFiUDP library when you want to use beginPacket(...) without listening on socket (without calling begin(...) first). You can't send any data because socket is not open and also tx_buffer is not allocated which cause crash while writing data to tx_buffer.
2017-02-08 23:10:16 +02:00
me-no-dev
fdc4f53eb6 fix WiFi disconnect reason index 2017-02-08 20:20:00 +02:00
Me No Dev
d02c1c786e Update IDF, fix SS definition, add custom partitions and debug level selection (#174)
* Add build time partitions compilation

* Fix wrong definition of SS pin

* Add support for core debug level selection

* update idf libs
2017-02-06 15:17:11 +02:00
me-no-dev
ee8149e207 add better debug messages for WiFi status 2017-02-05 23:59:44 +02:00