8000 Added hostname configuration to WLAN module by illysky · Pull Request #100 · pycom/pycom-micropython-sigfox · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Added hostname configuration to WLAN module #100

Closed
wants to merge 12 commits into from
Closed

Added hostname configuration to WLAN module #100

wants to merge 12 commits into from

Conversation

illysky
Copy link
@illysky illysky commented Nov 20, 2017

Added hostname when creating WLAN STA or AP object. Useful for getting the device IP address from router attached devices. Overrides “espressif” hostname.

eg,
from network import WLAN
w = WLAN(mode=WLAN.STA, hostname=“Pycom”)

I’ve limited the hostname to 16 characters, not sure what the limit should be off top of my head.

Cheers

@@ -410,8 +410,7 @@ STATIC void mptask_update_lpwan_mac_address (void) {
#endif

STATIC void mptask_enable_wifi_ap (void) {
wlan_setup (WIFI_MODE_AP, DEFAULT_AP_SSID, WIFI_AUTH_WPA2_PSK, DEFAULT_AP_PASSWORD,
DEFAULT_AP_CHANNEL, ANTENNA_TYPE_INTERNAL, true);
wlan_setup (WIFI_MODE_AP, DEFAULT_AP_SSID, WIFI_AUTH_WPA2_PSK, DEFAULT_AP_PASSWORD, DEFAULT_AP_CHANNEL, ANTENNA_TYPE_INTERNAL, true, "illysky");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the illysky default should be changed to something more appropriate to all users

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes! Sorry forgot about that. Perhaps “Pycom” or “MicroPython”.

@livius2
Copy link
livius2 commented Nov 20, 2017

why hostname have limit to 16 chars?
And if providing function, then better will be wlan_validate_hostname not only wlan_validate_hostname_len...
but i do not know if this is not validated already inside tcpip_adapter_set_hostname


i see that it is declared in tcpip_adapter.h as
#define TCPIP_HOSTNAME_MAX_SIZE 32

@illysky illysky closed this Nov 20, 2017
peter-pycom added a commit that referenced this pull request Feb 28, 2020
X-Ryl669 pushed a commit to X-Ryl669/pycom-micropython-sigfox that referenced this pull request May 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4AB0
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0