the other day, you made a remark here that you are using Bluetooth and a standard BLE scanner app to update the WiFi credentials. We also believe this would be a perfect solution unless the Smart Config option might get unlocked through ESP-TOUCH at some point in the future.
As you told us that it even works really well and you might be able to share the code, we are humbly asking if you could give us some pointers regarding that.
The background of our question is that we are in the process of conceiving a convenient datalogger application  for the Hiveeyes project  which is well suitable to be used for other environmental purposes beyond monitoring bee hives. We will be happy when this might spark your interest.
With kind regards,
Thanks for the advise. It would be useful if it would bring me a bit further.
Updating the Fw to version 1.18.2.r6 did not help me much. I removed the deepsleep board and dowloaded and installed the pycoproc.py file. Now I get the (infamous) Exception: Board not detected: I2C bus error.... Searched the forum for a solution to no avail..
Working on it for 3 hours but still do not have a solution..
I mage a PR for inverted UART signals, based on the release candidate version. The ony changes file is mods/moduart.c, so it's easy to use it for the master branch too:
@PeterB said in how to check if a non-existing key in nvs ?:
@johand said in how to check if a non-existing key in nvs ?:
You have to check if it is None or not, change to:
if pycom.nvs_get("count") != None:
Are you sure that will work? An exception is an exception and "pycom.nvs_get("count")" would not return anything to compare with. The exception would be generated before the compare can be executed.
Depends on the version. This must have changed over time.
You can simply use a variable and wrap the call, so that it shall run on all versions:
_wake = pycom.nvs_get('wake');
except Exception as e:
_wake = None
_wake = 103
@johanbrichau thanks for your example project! I am having trouble getting this to work based on your project. are you able to share an example of you config.py file? How do you load the rsa file and generate it?
@Dezert754 you probably want to use different timers (the first argument to machine.PWM) and/or different channels (the first argument to pwm.channel). Probably the latter rather the former.
You can also probably avoid instantiating / configuring each time you need to do something.
s = "".join(["%02X" % b[i] for i in range(len(service) - 1,-1,-1)])
sm = s[:8] + "-" + s[8:12] + "-" + s[12:16]+"-"+ s[16:20] + "-" + s[20:]
Which is however on letter longer than the string above. So check whether in the second group it is really three 0's.
Edit: for the second step, you can also write:
sm = "-".join([s[:8], s[8:12], s[12:16], s[16:20], s[20:]])
@kgunnar said in Where can I find the source code for the network/LTE?:
Python layer available somewhere
The C file for the Python API file is this one: https://github.com/pycom/pycom-micropython-sigfox/blob/master/esp32/mods/modlte.c
It calls other functions of the LTE module. You'll find it if you follow the code.
See my other post: https://forum.pycom.io/topic/4571/writing-to-text-file-to-log-debug-prints
"... py.go_to_sleep() does not close the 'operating system' running on the main processor in a decent way before cutting its power. That is really really bad! ..."
causing garbage in files wriiten before using py.go_to_sleep()
When using machine.deepsleep() that issue is not there, as it clearly puts the system to sleep correctly. Except then for the pysense is not put to sleep. And I need to put that to sleep as well, but how ... (in a decent way please)?
I am just trying to find a suitable regulator that will meet the requirements of the G01 as it uses cellular, wifi/ bluetooth. The current draw is not listed so I'm not sure what to go with. I think the 3.3V input on the G01 only powers the ESP32 portion, so I could power it the same as a W01 with a regulator capable of sourcing 650mA.
However, it seems that it also requires a 5V in on the cellular portion. So it seems a separate regulator is required but there is no specification of power requirements for the that rail..
Doesn't feeding the watchdog simply delay the reset? That doesn't help my situation.
I already have a watchdog timer in the code and when it hung, the watchdog didn't activate so I'm not sure if the watchdog hung because it was in the same thread as the code or if WDT class runs in a separate thread by design which implies a bigger problem with the WDT in general.