1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

34 Commits

Author SHA1 Message Date
Max Prokhorov
502d9469fa
Initialize SoftAP DhcpServer object on demand (#8546)
* Initialize SoftAP DhcpServer object on demand

Remove dependency on global ctor, and just construct the object when
someone asks us to do it. Only dependency right now is netif_git, which
is expected to be initialized by the lwip code some time before
dhcps_start happens.

Removing ip_info from begin(), since we never reference later on.
Also removing the specific check for netif id and simplify the ctors.

Update tests and recover old nonos-sdk dhcps functions that were not implemented.

* nonos helpers have a separate header

* wifi ap needs this anyway, simplify sketch includes

* missing example

* existing name :/

* trying to fix header dependency

* restyle

* not a c header

* no need to init

* move dhcp server getter to WiFi

more... arduino'ish? we ahve object as namespace, plus everything else
related to softAP is there
redundant includes, redundant mock impl (out-of-scope here to fix)

* ...move things back, still expose as WiFi method

* review fix

* include -nonos header in wifi lib though

* no more lwip include

* style

* need mock dhcpserver instance
2022-06-01 22:46:04 +02:00
david gauchard
51c2a1437b
more lwIP physical interfaces (#6680)
This commit adds W5500 W5100 and ENC28j60 drivers from @njh with credits
They are available in libraries/
An example is added in W5500 examples directory

plus:
* Extract dhcp server from lwip2 and add it to the core as a class.
  It must always be present, it is linked and can be called by fw on boot.
  So it cannot be stored in a library.
* ethernet: static or dhcp works
* PPPServer: example
* bring WiFi.config() to the lwIP generic interface (argument reorder common function)
* move hostname() from WiFI-STA to generic interface
* remove non readable characters from dhcp-server comments
* dhcp-server: magic_cookie is part of bootp rfc
* fixes from https://github.com/d-a-v/W5500lwIP/issues/17
* enable lwip_hook_dhcp_parse_option()
* +ethernet tcp client example in w5500 library examples
2020-12-22 22:36:21 +01:00
david gauchard
a3ea816e65
add optional espressif fw nonos-sdk 2.2.x (19.03.13) (#5873) 2019-03-14 13:35:26 +01:00
david gauchard
7745e99046
Revert to nonos-sdk 2.2.1, new sdk-switching option in IDE menu for generic board only (#5763)
This commit allows switching SDK firmware:

nonos-sdk-pre-v3 shipped with release 2.5.0 has issues:

    * Some boards show erratic behavior (radio connection is quickly lost), with an unknown cause.
      These boards work well with previous nonos-sdk-2.2.1 firmware (#5736)

    * Overall performances seem to have decreased (#5513)

This PR restores sdk2.2.1 (as in core-2.4.2).

SDK-pre-3.0 - which has brought long awaited fixes (WiFi sleep modes) - is still available through a menu option available only with generic board.

BREAKING

    * new define `-DNONOSDK221=1` or `-DNONOSDK3V0=1`

    * for external build systems: new library directory: `tools/sdk/lib/<version>/lib`

    * PIO: variable `PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK3` is needed for sdk-pre-v3.


Fix #5736
2019-02-19 13:10:49 +01:00
SmartBlug
5e4c2e9750 Add capability to have light static DHCP lease (#5594)
* Add capability to have light static DHCP lease

* added ESP8266WiFi StaticLease sample

* Update StaticLease to IPv4
2019-01-25 02:25:04 +00:00
david gauchard
7c5be91430 dynamic WiFi.hostname("newname") (#5652)
* dynamic WiFi.hostname("newname")

* WiFi.hostname() back to String return type

* no silent hostname fix but proceed with debug message and returning false
2019-01-24 17:13:20 -03:00
david gauchard
0db6ec4ba8 lwip2: 3 sntp servers, autoip (169.254), esp-ping, espconn (#5444)
* lwip2: better handling of ipv4_addr/t type + 3 sntp servers

* bump lwip2 version

* Only with FEATURES=1: 3 sntp servers and AutoIP enabled (169.254 when dhcp server fails)

* Only with FEATURES=1: 3 sntp servers and AutoIP enabled (169.254 when dhcp server fails)

* local CI runner: select build type

* new ipv4_addr/t definition makes things easier for IPAddress

* update local CI runner

* lwip2 changes

* lwip2: port esp-ping and espconn
2018-12-07 21:24:38 -03:00
david gauchard
5c4db3acf4
IPv6 on esp8266-nonos-sdk and arduino (#5136) 2018-11-27 23:07:47 +01:00
david gauchard
8ef21ca3ae Update to the last version of nonos-sdk V2, WiFi addons (#5210)
* fwupdate

* fw update to latest version:
WPA working, WEP+Open disabled by default. Need API change.

* helpers to follow sdk updates

* remove compare scripts - made a separate PR for them

* add wep api, restore original espressif comment (wep enabled does not prevent wpa)

* libmain was not up to date

* experimental: DTIM setting in WiFi.setSleepMode(WIFI_LIGHT/MODEM_SLEEP, DTIM-value)
with new getter: .getListenInterval() / .isSleepLevelMax()

* fixes

* fix debug message

* when not using listenInterval, set wifi sleep level to min

* update documentation

* update doc
2018-10-09 10:21:23 -03:00
david gauchard
85e68093e9
Automatic stack location selection (SYS or HEAP), enable per library AR-chive in arduino build system (#5018)
Automatic stack location selection (SYS or HEAP), enable per library AR-chive in arduino build system 

* enable dot_a_linkage on internal libraries
* add device tests
* boards generator: deprecate --noextra4k/--allowWPS and fix documentation
2018-08-20 14:35:52 +02:00
david gauchard
e486887f18
optionally allow WPS (#4889) 2018-07-06 16:45:25 +02:00
Shawn A
836c7da8cc adds getautoreconnect() (#4359) 2018-03-16 01:15:30 -03:00
Ivan Grokhotkov
c885542f05 sdk: update to v2.2.0-3-gf8f27ce
- Fixes WiFi not being able to reconnect after SDK update (#4398)
- Fixes increased current in light sleep mode
- Fixes return value documentation for wifi_{get,set}_country
2018-02-22 14:11:43 +03:00
Ivan Grokhotkov
429f40d321 sdk: update to 2.2.0
- update libraries and header files
- remove libmesh
- update PHY init data
2018-02-19 12:43:01 +03:00
Develo
a2d16f38d4
Extern C blocks (#1352) (#4044)
* Add extern C guard blocks to SDK header files #1352

* fixed some extern C blocks in core and libraries
2017-12-30 02:03:26 -03:00
Ivan Grokhotkov
e04903225e sdk: update to v2.1.0-10-g509eae8 2017-10-15 01:40:10 -05:00
Ivan Grokhotkov
93413efcf4 Remove queue.h contents originating from BSD (#2982)
fixes #2981
2017-02-19 05:36:30 +03:00
Ivan Grokhotkov
ae13809c81 Update SDK to 2.0.0
- Update SDK header files and libraries to SDK 2.0.0 plus 2.0.0_16_08_09
  patch
- Remove mem_manager.o from libmain.a (replaced with umm_malloc)
- Disable switch from DIO to QIO mode for certain flash chips (saves
  IRAM space)
- Add user_rf_cal_sector_set; it points to rf_init_data sector.
- Change the way rf_init_data is spoofed.
  This is now done by wrapping spi_flash_read and returning the data we
  need during startup sequence.
- Place lwip library into flash using linker script instead of section
  attributes (saves IRAM space)
2017-02-03 04:21:20 +03:00
Jean-Baptiste
db5e20f237 proposal for issue #1845 wifi_wps_status_cb get an undefined status 4 and missed wifi_wps_disable (#2312) 2016-08-01 11:46:29 +08:00
Ivan Grokhotkov
93d627a61d Update SDK to 1.5.4 (#2138) 2016-06-23 18:39:40 +08:00
Ivan Grokhotkov
f266f8a2ff Update SDK to 1.5.3 2016-05-06 19:33:48 +08:00
Joost van Dijk
2331377a9d add missing prototypes for libwpa2 2016-02-15 14:23:51 +01:00
Charles
e455315bbf Added comment on Reset reason 2016-01-25 00:43:03 +01:00
Markus Sattler
640d0bb65e improve error handling and return values 2015-12-29 15:00:47 +01:00
Markus Sattler
cee4ef3078 less static stuff 2015-12-28 20:13:56 +01:00
Markus Sattler
195e595453 add setSleepMode + getSleepMode and setPhyMode + getPhyMode to WiFi 2015-12-26 13:02:31 +01:00
Ivan Grokhotkov
b66ddbf93a Update to SDK 1.5 (#1102) 2015-12-17 23:14:59 +03:00
Ivan Grokhotkov
7bfd425754 Update to SDK 1.3.0 2015-08-10 10:51:09 +03:00
Markus Sattler
2937b21c9c add basic WPS function 2015-07-07 18:24:55 +03:00
Markus Sattler
d4ddb66fc4 update SDK to v1.2.0_15_07_03 2015-07-07 18:09:23 +03:00
Markus Sattler
7c45873ffb update to SDK 1.1.1_15_06_05 2015-06-06 13:48:53 +02:00
Markus Sattler
dc52cf82c5 read the rst reason from the SDK if stored.
add String getResetInfo(void); and struct rst_info * getResetInfoPtr(void);
2015-05-25 11:15:29 +02:00
Ivan Grokhotkov
01d0f61429 Update SDK to 1.1.0 (#306) 2015-05-23 12:48:56 +03:00
Ivan Grokhotkov
870b8b9478 Move tools to platform directory 2015-05-18 16:04:30 +03:00