[LoPy] - Sending File to LoPy from Mobile Over Bluetooth
-
Hi All,
Does anyone know how you can upload a file to the LoPy flash using a mobile phone and BLE?
Thanks and regards!
-
@robert-hh Thats great. Have skipped my attention so far... Thanks!
-
@fuzzy Yes, the mode is STA_AP, (https://docs.pycom.io/chapter/firmwareapi/pycom/network/wlan.html). In the wlan.init call then you must specify the SSID and password for the AP, and in addition connect as usual as STA,
-
@robert-hh hi. Thanks for your response. Is it possible to setup the device both as STA and AP at the same time?
Thanks!
-
@fuzzy You can setup your device as both station and access point. The station mode can connect to the internet, while the AP interface can be used to upload files, e.g. by ftp.
-
@jcaron thanks for your reply. The reason for not using WiFi is that the WiFi interface operates as a station for connecting the LoPy with the internet. The file that needs to be transfered is a JSON file with only a few lines.
Any hints?
-
@fuzzy if you mean sending a file over Bluetooth using standard OS features, I believe that's a Bluetooth Classic feature, not Bluetooth LE.
BLE is not really designed for file transfers, and even though it's achievable, you'll get pretty poor performance, it quickly takes minutes for a few hundred KiB. But you'll need dedicated software on both ends.
Why not use Wi-Fi for this?