Updated Pybytes app information (#353)

* added android app information
* cleared up usage
This commit is contained in:
gijsio
2021-03-05 15:08:39 +01:00
committed by GitHub
parent 06d88eaea2
commit bd58b272f9
8 changed files with 49 additions and 49 deletions

View File

@@ -10,17 +10,23 @@ This page discusses the possibility to upload files through the internal FTP ser
On each Pycom device, there is a small internal filesystem called `/flash`, to which the Python code is uploaded. We can access this filesystem through an internally running FTP server, that allows us to make changes to the files. Next to that, a Telnet connection can be made to communicate with the device through the REPL.
## Connecting
1. **Connect through the Access Point**
In the past, Pycom devices came with the Access Point enabled from the factory. Nowadays, they come with [smart-configuration](/pybytes/smart/) and Pybytes enabled by default, allowing quick and easy provisioning to Pybytes using the app. Follow the steps below to disable that and use enable the Access Point or connect to another WiFi network on boot.
1. **Connect through the Access Point**
You can activate the internal Access Point (AP) on boot by using the following:
```python
import pycom
from network import WLAN
import machine
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')
pycom.wifi_pwd_ap('')
machine.reset()
```
> You can find the methods to change the default settings [here](/firmwareapi/pycom/pycom/#boot-methods)
@@ -29,9 +35,20 @@ On each Pycom device, there is a small internal filesystem called `/flash`, to w
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()
```
import pycom
from network import WLAN
import machine
#You can set this to True if Pybytes connects to your router already, and skip the rest
pycom.pybytes_on_boot(False)
pycom.smart_config_on_boot(False)
pycom.wifi_on_boot(True)
pycom.wifi_mode_on_boot(WLAN.STA)
pycom.wifi_ssid_sta('router ssid')
pycom.wifi_pwd_sta('router password')
wlan.ifconfig()
machine.reset()
```
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