Search found 55 matches

by ebolisa
Sat Apr 25, 2020 9:15 am
Forum: General Discussion and Questions
Topic: Diff between time and utime libs
Replies: 2
Views: 9911

Diff between time and utime libs

Hi, Based on the below test code, I noticed a difference in timing between the use of utime and time libraries. How could that be? TIA import utime import time '''calculating diff in ms with utime ''' ucnt = 0 ustartTime = utime.ticks_ms() for i in range(100000): ucnt += 1 uendTime= utime.ticks_ms()...
by ebolisa
Fri Apr 24, 2020 3:05 pm
Forum: General Discussion and Questions
Topic: Unable to parse json
Replies: 7
Views: 4270

Re: Unable to parse json

Hi,
The url status test fails because of the encoding. So how do I decode an url?

EDIT: Got it! it works now. Thank you!
by ebolisa
Fri Apr 24, 2020 8:33 am
Forum: General Discussion and Questions
Topic: Unable to parse json
Replies: 7
Views: 4270

Re: Unable to parse json

and as I said in my first post, the code works fine on my windows' pc... so, maybe my problem is related to the uresponses lib? import requests import time from datetime import datetime # Add country name _CountryName = ['意大利', '伊朗', '韩国', '法国', '西班牙', '德国', '日本', '美国', '挪威', '瑞士', '丹麦', '荷兰', '瑞典',...
by ebolisa
Fri Apr 24, 2020 7:55 am
Forum: General Discussion and Questions
Topic: Unable to parse json
Replies: 7
Views: 4270

Re: Unable to parse json

How would I do that? Here's my test code... import urequests import ujson CountryName = ['意大利', '法国', '西班牙', '美国', '英国'] #connect to network wlan = wm.get_connection() if wlan is None: print("Could not initialize the network connection.") while True: pass # you shall not pass :D def display_country(...
by ebolisa
Fri Apr 24, 2020 7:27 am
Forum: General Discussion and Questions
Topic: Unable to parse json
Replies: 7
Views: 4270

Re: Unable to parse json

Hi,
I think the problem may be related to the Chinese charanteres. At times said chars are converted into %xx. Here's what I get in my browser.
by ebolisa
Thu Apr 23, 2020 9:00 pm
Forum: General Discussion and Questions
Topic: Unable to parse json
Replies: 7
Views: 4270

Unable to parse json

Hi, The following code should get json data from an url but it fails with a json syntax error when run on an ESP32. However, it works when run on a PC. Any help is appreciated. TIA CountryName = ['意大利', '法国', '西班牙', '美国', '英国'] def Display_Country(): for i in range(5): get_url = 'https://lab.isaacli...
by ebolisa
Sun Apr 19, 2020 7:33 am
Forum: ESP32 boards
Topic: Issue with wifimgr.py
Replies: 10
Views: 6715

Re: Issue with wifimgr.py

It's not an error, it's just a valuable information. If you take a look at my response text shown on my first post, you will notice that it ends with ssid=PHONE_HOME&password=Jarandilla%4028232 That's my router's credentials. In that, I noticed what was happening. The system was converting the chara...
by ebolisa
Sat Apr 18, 2020 3:34 pm
Forum: ESP32 boards
Topic: Issue with wifimgr.py
Replies: 10
Views: 6715

Re: Issue with wifimgr.py

@sspaman: request comes in on line 181
def handle_configure(client, request):
so just print it. You can see mine in my first post in this topic. I suggest you to take at look at your request first before changing any codes.
by ebolisa
Tue Apr 14, 2020 5:24 pm
Forum: ESP32 boards
Topic: Issue with wifimgr.py
Replies: 10
Views: 6715

Re: Issue with wifimgr.py

However I have found a bug using iOS on iPhone. Whenever connecting to wifi AP using iPhone after selecting the SSID and entering the PW I get an error displayed in the browser, "Parameters not found". The browser doesn't seem to make a difference. I tried safari, chrome and duckduckgo all with the...
by ebolisa
Tue Apr 07, 2020 2:34 pm
Forum: ESP32 boards
Topic: Issue with wifimgr.py
Replies: 10
Views: 6715

Re: Issue with wifimgr.py

Hi, wifimgr.py can be found here https://github.com/tayfunulu/WiFiManager/blob/master/wifimgr.py I fixed the problem by adding 'replace("%40", "@")' on lines 189, 190, 192 and 193. I also had to adjust line 288 from ' request += client.recv(512) ' to ' request += client.recv(560) ' to accept more ch...