summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/modnetwork.c
Commit message (Collapse)AuthorAge
* all: Raise exceptions via mp_raise_XXXJavier Candeira2017-08-13
| | | | | | | | - Changed: ValueError, TypeError, NotImplementedError - OSError invocations unchanged, because the corresponding utility function takes ints, not strings like the long form invocation. - OverflowError, IndexError and RuntimeError etc. not changed for now until we decide whether to add new utility functions.
* all: Use the name MicroPython consistently in commentsAlexander Steffen2017-07-31
| | | | | There were several different spellings of MicroPython present in comments, when there should be only one.
* esp8266: Convert to mp_rom_map_elem_t.Paul Sokolovsky2017-07-30
|
* esp8266/modnetwork: In connect, fix potential buffer overflows.puuu2017-05-16
|
* all: Use full path name when including mp-readline/timeutils/netutils.Damien George2017-03-31
| | | | | | | This follows the pattern of how all other headers are now included, and makes it explicit where the header file comes from. This patch also removes -I options from Makefile's that specify the mp-readline/timeutils/ netutils directories, which are no longer needed.
* esp8266: Update for changes to mp_obj_str_get_data.Damien George2017-03-29
|
* esp8266/modnetwork.c: Expose configuration for station DHCP hostname.Chris Popp2016-11-09
| | | | | | | The ESP SDK supports configuring the hostname that is reported when doing a DHCP request in station mode. This commit exposes that under network.WLAN(network.STA_IF).config('dhcp_hostname') as a read/write value similar to other parameters.
* esp8266/modnetwork.c: Allows AP reconnection without WiFi credentialspuuu2016-11-01
| | | | | | | | | There is no automatic reconnect after wlan.active(False); wlan.active(True). This commit provide the possibility to run wlan.connect() without parameter, to reconnect to the previously connected AP. resolve #2493
* esp8266/modnetwork: config(): Fix copy-paste error in setting "mac".Paul Sokolovsky2016-10-31
|
* all: Remove 'name' member from mp_obj_module_t struct.Damien George2016-09-22
| | | | One can instead lookup __name__ in the modules dict to get the value.
* esp8266/modnetwork: Fix wlan.scan() method so it returns all networks.Damien George2016-09-06
| | | | | | | | According to the Arduino ESP8266 implementation the first argument to the wifi scan callback is actually a bss_info pointer. This patch fixes the iteration over this data so the first 2 entries are no longer skipped. Fixes issue #2372.
* esp8266/modnetwork: Use struct bss_info::ssid_len for ESSID length.Mark2016-06-04
| | | | | | | Instead of calling strlen(), which won't work if there're 32 chars in returned ESSID. struct bss_info::ssid_len is not documented in SDK API Guide, but is present in SDK headers since 1.4.0. Just in case, previous code is left commented.
* esp8266/modnetwork: Allow to press ctrl-C while scan() is running.Damien George2016-05-29
| | | | | | | Ctrl-C will raise a KeyboardInterrupt and stop the scan (although it will continue to run in the background, it won't report anything). If interrupted, and another scan() is started before the old one completes in the background, then the second scan will fail with an OSError.
* esp8266/modnetwork: Protect scan() callback against memory errors.Damien George2016-05-29
| | | | scan() allocates memory so may cause an exception to be raised.
* esp8266/modnetwork: scan() is only supported by STA when it's enabled.Damien George2016-05-29
|
* esp8266: Convert to use new MP_Exxx errno symbols.Damien George2016-05-10
| | | | | | | These symbols are still defined in terms of the system Exxx symbols, and can be switched to internal numeric definitions at a later stage. Note that extmod/modlwip still uses many system Exxx symbols.
* esp8266/modnetwork: Remove .mac() method, move to .config("mac").Paul Sokolovsky2016-05-03
| | | | | Querying/setting MAC address is pretty adhoc operation to belong to .config() instead of taking a whole method on its own.
* esp8266/modnetwork: Remove deprecated wifi_mode().Paul Sokolovsky2016-05-03
| | | | Network interfaces are now controlled individually using .active() method.
* esp8266/modnetwork: Make WLAN.ifconfig() read/write.Aex Aey2016-04-28
| | | | | Allow setting ip, netmask, gw and dns server (also, allows getting dns). For docs see: https://github.com/micropython/micropython/commit/06deec9
* esp8266/modnetwork: .config(): Add "hidden ESSID" param.Paul Sokolovsky2016-04-21
|
* esp8266/modnetwork: .config(): Add "channel" param.Paul Sokolovsky2016-04-20
|
* esp8266/modnetwork: .config(): Add "password" param (W/O).Paul Sokolovsky2016-04-12
|
* esp8266/modnetwork: .config(): Add "authmode" param.Paul Sokolovsky2016-04-12
|
* esp8266/modnetwork: .config(): Check interface whose config is requested.Paul Sokolovsky2016-04-12
|
* esp8266/modnetwork: require_if(): Report the actual interface required.Paul Sokolovsky2016-04-05
|
* esp8266: Move PHY mode constants from modesp to modnetwork.Paul Sokolovsky2016-04-01
|
* esp8266: Support synchronous wifi scanning.Damien George2016-03-30
| | | | | | | That is: aps = if0.scan() TODO: make sure that returned list has tuple with values in "standard" order (whatever that standard is).
* esp8266/modnetwork: Add symbolic names for network interfaces: STA_IF & AP_IF.Paul Sokolovsky2016-03-10
| | | | | These are expected to be passed to network.WLAN() to instantiate network interface objects.
* esp8266/modnetwork: Introduce interface .config() method.Paul Sokolovsky2016-03-10
| | | | | | | | | | | | Allows to set (in case keyword args are given) or query (in case a single "symbolic keyword" (a string, value is the same as keyword)) arbitrary interface paramters (i.e. extensible and adaptable to various hardware). Example usage: ap_if = network.WLAN(1) ap_if.config(essid="MicroPython on Air") print(ap_if.config("essid"))
* esp8266/modnetwork: Move config defines to the top.Paul Sokolovsky2016-03-10
|
* esp8266/modnetwork: Add per-interface .active() method.Paul Sokolovsky2016-03-10
| | | | | | Allows to up/down interface when called with a boolean, or query current state if called without args. This per-interface method is intended to supersede adhoc network.wifi_mode() function.
* esp8266: Move wifi_mode() and phy_mode() to network module.Paul Sokolovsky2016-03-10
|
* esp8266/modnetwork: Allow to configure STA and AP interfaces separately.Paul Sokolovsky2016-03-10
| | | | | | | | | On ESP8266, there're 2 different interfaces. Pretending it's not the case desn't make sense. So, network.WLAN() now takes interface id, and returns interface object. Individual operations are then methods of interface object. Some operations require i/f of specific type (e.g. .connect() makes sense only for STA), other are defined for any (e.g. .ifconfig(), .mac()).
* esp8266: Add network.ifconfig().Damien George2016-03-02
|
* esp8266: mac() function belongs to network module per the latest API.Paul Sokolovsky2015-12-27
|
* esp8266: Remove superfluous includes.Paul Sokolovsky2015-12-21
|
* esp8266: Added wlan.isconnected() to maintain parity with other ports.Bill Owens2015-09-15
|
* esp8266: Move status() from esp module to networkBill Owens2015-06-20
|
* esp8266: Move scan from esp module to networkBill Owens2015-06-17
|
* esp8266: Move connect/disconnect from "esp" module to network.Paul Sokolovsky2015-06-12
|
* esp8266: Add skeleton "network" module.Paul Sokolovsky2015-06-12
MicroPython "network" module interface requires it to contains classes to instantiate. But as we have a static network interace, make WLAN() "constructor" just return module itself, and just make all methods module-global functions.