From 210134038382dac9fac334305f01473d31f0761d Mon Sep 17 00:00:00 2001 From: gijsio <67470426+gijsio@users.noreply.github.com> Date: Mon, 30 Nov 2020 10:42:27 +0100 Subject: [PATCH 1/3] updated information about ap on boot --- content/gettingstarted/programming/ftp.md | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/content/gettingstarted/programming/ftp.md b/content/gettingstarted/programming/ftp.md index 8d38ecd..124ebbb 100644 --- a/content/gettingstarted/programming/ftp.md +++ b/content/gettingstarted/programming/ftp.md @@ -12,34 +12,28 @@ On each Pycom device, there is a small internal filesystem called `/flash`, to w ## Connecting 1. **Connect through the Access Point** - By default, the Pycom device will create a WiFi access point with the following default credentials: - * SSID: `xxpy-wlan-####` - * Password: `www.pycom.io` - - The last 4 characters of the broadcast SSID are equal to the last 4 characters of the `unique_id()`: - ```python - import machine - import ubinascii - ubinascii.hexlify(machine.unique_id()) - ``` - - Note that if you made changes to the WiFi settings, the AP might not show up by default. You can use the following to get it back up and running: + You can activate the internal Access Point (AP) on boot by using the following: ```python import pycom from network import WLAN + pycom.pybytes_on_boot(False) #we do not want Pybytes using the WLAN + pycom.smart_config_on_boot(False) #we also do not want smart config pycom.wifi_on_boot(True) pycom.wifi_mode_on_boot(WLAN.AP) + pycom.wifi_ssid_ap('ssid') ``` > You can find the methods to change the default settings [here](/firmwareapi/pycom/pycom/#boot-methods) 2. **Connect through A WiFi Network** - It is also possible to connect your pycom device to a WiFi network first, and then connect to its IP address. Note that you will have to figure out its IP address before you can access the FTP server. For that, you can use the following command. This will return a tuple with four items, where the first item will contain the assigned IP address. + It is also possible to connect your pycom device to a WiFi network first, and then connect to its IP address or use [mdns](/firmwareapi/pycom/network/mdns/). Note that you will have to figure out its IP address before you can access the FTP server. For that, you can use the following command. This will return a tuple with four items, where the first item will contain the assigned IP address. ```python wlan.ifconfig() ``` -> Note that if you make changes to the WLAN Configuration in the uploaded Python code, the connection might drop. Moreover, if your program contains continuous reboot loops, sleep cycles or coredumps, you might not be able to recover the wireless connection without [safe booting](../safeboot/) + +Note that if you make changes to the WLAN Configuration in the uploaded Python code, for example by using Pybytes or changing the WiFi credentials, the connection might drop. Moreover, if your program contains continuous reboot loops, sleep cycles or coredumps, you might not be able to recover the wireless connection without [safe booting](../safeboot/) + ## FTP Server The file system is accessible via the native FTP server running on each Pycom device. Open a FTP client and connect to: From 67b0d34cb09cc7c2588ebf6be362c29d35e296c5 Mon Sep 17 00:00:00 2001 From: gijsio <67470426+gijsio@users.noreply.github.com> Date: Mon, 30 Nov 2020 10:43:21 +0100 Subject: [PATCH 2/3] added info about mdns --- content/gettingstarted/programming/ftp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/gettingstarted/programming/ftp.md b/content/gettingstarted/programming/ftp.md index 124ebbb..e4da8a1 100644 --- a/content/gettingstarted/programming/ftp.md +++ b/content/gettingstarted/programming/ftp.md @@ -27,7 +27,7 @@ On each Pycom device, there is a small internal filesystem called `/flash`, to w 2. **Connect through A WiFi Network** - It is also possible to connect your pycom device to a WiFi network first, and then connect to its IP address or use [mdns](/firmwareapi/pycom/network/mdns/). Note that you will have to figure out its IP address before you can access the FTP server. For that, you can use the following command. This will return a tuple with four items, where the first item will contain the assigned IP address. + It is also possible to connect your pycom device to a WiFi network first, and then connect to its IP address. Note that you will have to figure out its IP address before you can access the FTP server or use [MDNS](/firmwareapi/pycom/network/mdns/). For that, you can use the following command. This will return a tuple with four items, where the first item will contain the assigned IP address. ```python wlan.ifconfig() ``` From c08ec2c576e350e28ed5da882033bce829ff3d77 Mon Sep 17 00:00:00 2001 From: gijsio <67470426+gijsio@users.noreply.github.com> Date: Mon, 30 Nov 2020 11:00:08 +0100 Subject: [PATCH 3/3] changed link --- content/gettingstarted/programming/ftp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/gettingstarted/programming/ftp.md b/content/gettingstarted/programming/ftp.md index e4da8a1..1748b92 100644 --- a/content/gettingstarted/programming/ftp.md +++ b/content/gettingstarted/programming/ftp.md @@ -27,7 +27,7 @@ On each Pycom device, there is a small internal filesystem called `/flash`, to w 2. **Connect through A WiFi Network** - It is also possible to connect your pycom device to a WiFi network first, and then connect to its IP address. Note that you will have to figure out its IP address before you can access the FTP server or use [MDNS](/firmwareapi/pycom/network/mdns/). For that, you can use the following command. This will return a tuple with four items, where the first item will contain the assigned IP address. + It is also possible to connect your pycom device to a WiFi network first, and then connect to its IP address. Note that you will have to figure out its IP address before you can access the FTP server or use [MDNS](/tutorials/networkprotocols/mdns/). For that, you can use the following command. This will return a tuple with four items, where the first item will contain the assigned IP address. ```python wlan.ifconfig() ```