Update on this. I am embarrassed to have to admit that it turns out the unit I have is a WiPy 1 (not 2 - stupid me!). With that information, it is clear the the module largely works, except for pin 28 which appears to be hopelessly held high inside, regardless of what I attach to it. As suggested, this means I will have to disable the safe boot process (or assign a different pin) to update it. Can someone point me to something that might help me through that process? Thanks.
It is better this build... we should book it in the calendar and get drunk.
There is a problem with the SD card functionality. Plug the board and then run the sample script (SD example).
from machine import SD
sd = SD()
f = open('/sd/a.cfg')
data = f.read()
Everything works fine on first run.
Run again the script: [Errno 2] ENOENT is raising on SD card init and the board is hanging. It is funny that you press power reset button and the issue is still persistent after reset. Only if you unplug the usb cable and plug again will make it work.
I was also getting b'' (empty string) because they did not communicate and recv() as it is run non-blocking and is returning empty buffer.
After I added full init sequence params it started to work.
And I am on the latest firmware (nodename='LoPy', release='1.6.4.b1', version='v1.8.6-475-g2320cb2d on 2017-02-24').
You need to convert the binary values to human readable with the following snippet of code:
from network import Sigfox
# initalise Sigfox for RCZ1 (You may need a different RCZ Region)
sigfox = Sigfox(mode=Sigfox.SIGFOX, rcz=Sigfox.RCZ1)
# print Sigfox Device ID
# print Sigfox PAC number
@paul12345 : I do not know why the implementation is recursive. Maybe it always was, or it's the most elegant solution.
About the double quote: No, it does not work on WiPy if you drop the double quote at the end of the search string. But you will have a match on machines with more memory, simply because the sample string (line) you are searching at does not contain the pattern mp3".
B.T.W.: Shortening the string in line works on WiPy.