How potential buyers could insert WIFI-parameters
-
@jmarcelino Thank you!
-
Hi @jmarcelino I' m developping an NFC interface with the NTAG I2C from NXP, so you can transfer the necessary informations with your phone.
-
@jiemde
i don’t think that strategy works with iPhones -
Hi @jmarcelino I thing that the new Iphone have NFC ( from NXP )
-
Hi @jmarcelino after some investigations they can read but no write NFC tag, so you're right. But it's work with Androïd without problem
-
@jmarcelino Great! I'm trying the same but I'm really novice here.. keep us posted ;)
-
I have a method that works really well, i enable bluetooth and use a standard BLE scanner app to update the wifi credentials..works really well and can share code if you like.
-
Hi @misterlisty, That can be an other way, can you also send more informations than the wifi credential ? like the Lora or Sigfox informations ?
If you could share your code I would like to test it.
Best regards Jiemde -
picotui might me another option:
https://pypi.python.org/pypi/picotui/1.0I don't have personal experience yet, however I will probably use it in my products.
-
Hi @jmarcelino,
I was thinkinkg about doing something similar as your flow, but I am having trouble to implement a micro webserver (I'm using a standard LoPy, not LoPy4). Are you capable of process GET or POST requests on your device? Any suggestion on how can I manage that?
Thanks in advance.
-
You can run a http server on the device (a good example can be found here: http://docs.micropython.org/en/v1.9.2/esp8266/esp8266/tutorial/network_tcp.html), the sockets available in micropython work just like regular sockets on Windows/Linux and you can read/write the raw GET and POST requests like strings.
-
Hi @lsoria
There's a fantastic web server already for MicroPython by Jean-Christophe Bos. Check out https://github.com/jczic/MicroWebSrv
Works perfectly on our boards.
-
Hi @jmarcelino, thank you for your reply. The troubles I have experienced were because of that repository. It seems really great because of the functionalities ot offers, but unfortunately I wasn't able to run even the example it provides. It always fails to import MicroWebSrv (even if I copy all the files to the LoPy flash). Mi theory is that my device runs out of memory, but I cannot prove it since I don't have a LoPy4 (and there is not stock nowadays, at least in Mouser). If you want I'll post the Terminal output after I run the script, to see what it throws. Perhaps there is something more I could have missed.
Actually my attempts to embed a webserver are based on the link that @seb sent. I made a rudimentary function to process GET request, but I am not having luck at detecting POST requests. But I would like to use something more "correct" and standard.
-
@lsoria
If you could post the whole error message you get, we can help you get it working. Did you copy the library intolib/microWebSrv.py.py? -
Hi @seb, here there are the captures from the filezilla client:

On the left side there is the folder clonned from the repo. on the righht side the root folder of the device. I've copied microWebSocket.py, microWebSrv.py and microWebTemplate.py inside lib/ folder as it follows:

Then I go to Visual Studio Code, and run main.py. The first time throws this message:

And the second time this:

If I check the available memory I get values similar to this:

Am I following the right steps? Or my LoPy is really out of memory?
Thank you in advance, and sorry if I'm distorting the meaning of this thread.
-
The first error is caused by your module running out of RAM, try minimising how much HTML you are presenting to lower the memory requirements.
Secondly can share your
main.pycode so I can check what you are trying to run. -
@jmarcelino said in How potential buyers could insert WIFI-parameters:
Sure I'll get this up ASAP.
Any update (ETA) on this?
-
@seb my main.py is the same as the official repo:
https://github.com/jczic/MicroWebSrv/blob/master/main.py
I've ordered some LoPy4. I'll try the same code when they arrive. for the moment I've managed to process POST request by hand, based on the next example, mixed with the given in the page you shared:
https://github.com/RinusW/WiPy/blob/master/AiCWebserver/AiCWebserv.py -
@lsoria I know old thread... but I just found out about AiCWebserv and was trying to get it to work. Did you have any luck with it? I've gotten other webserver examples to work, but not this one (yet).
https://github.com/RinusW/WiPy/blob/master/AiCWebserver/AiCWebserv.py
Looking for someone who has got it working. I am using a WiPy 3 on a pysense board.
-
@johnpiantanida ESP-IDF has 3 ways of provisioning the network, but not sure if any are supported by Pycom FW.
● Soft AP
○ Manual Wi-Fi change on iOS
● Bluetooth
○ Larger flash footprint
● Smart-Configif (conn_mgr_prov_is_provisioned(&provisioned) != ESP_OK) { return; } if (! provisioned) { /* Starting provisioning */ conn_mgr_prov_start_provisioning(prov_type, security, pop, service_name, service_key); } else { /* Start the station */ wifi_init_sta(); } esp_err_t event_handler(void *ctx, system_event_t *event) { conn_mgr_prov_event_handler(ctx, event); switch(event->event_id) { case SYSTEM_EVENT_STA_START: … … …
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login