Anyone using Google Cloud (not on Pybytes)?
-
Is anyone using Google Cloud NOT with a Pybytes integration, but in software on the chip? I've found it's completely unusable for me due to what seems to be some firmware bugs. What are you doing to make it work?
- I tried using the Pycom GoogleIOT library.
- The ucrypto.generate_rsa_signature() function fails on firmware 1.20.1 and greater.
- The Pycom GoogleIOT library requires 1.20.0.r11 or greater.
- Which requires I use anything from 1.20.0.r11 through 1.20.0.r13.
- Which I have tried, but those have a bug in network.WLAN(). My devices only use WLAN so this means I am unable to use these firmwares.
- In desperation, I tried 1.18.2.r7, which is explicitly stated not to work, and as expected, it does not work.
- I tried porting Google's official MicroPython library. This code works perfectly on an ESP-WROOM-32, but I get a Guru Meditation stack overflow when I try to import their RSA library.
- I'd gladly use Pybytes, but that is a one-way trip. Cannot send commands from Google Cloud back to the device, only from the device through Pybytes signals out to Google Cloud. I need to be able to send commands.
I am very stuck. This is a deal-breaker for me. What are you doing to make it work? Please help. I am using a WiPy2. I ordered some WiPy3 which should arrive Tuesday.
-
It will be really good if this two worlds will merge together finally and there will be only "micropython".
-
@Gijs said in Anyone using Google Cloud (not on Pybytes)?:
you mention using the official Google micropython library not working because of the stack overflow, indicating a memory limitation.
I'm no longer sure about that. Tried the same Google IoT library on MicroPython, same amount of RAM--same WiPy, in fact--worked perfectly. Likely something in Pycom that's incompatible with the RSA library they bundle within. They wrote it for MicroPython, not Pycom, so that makes sense.
-
@Gijs said in Anyone using Google Cloud (not on Pybytes)?:
The Google Cloud library in pycom-libraries is not actively maintained and the solution is nowadays offered through pybytes. Though in your case, you need the downlink as well, making the Pybytes route not applicable, and you mention using the official Google micropython library not working because of the stack overflow, indicating a memory limitation.
Okay that makes sense, now I can see why it would be considered a niche application.
I'd LOVE to use Pybytes--but it's unidirectional. Info only flows from the device to the cloud. Surely there are others out there who need bidirectional control?
-
The Google Cloud library in pycom-libraries is not actively maintained and the solution is nowadays offered through pybytes. Though in your case, you need the downlink as well, making the Pybytes route not applicable, and you mention using the official Google micropython library not working because of the stack overflow, indicating a memory limitation.
Anyways, I'll take a deeper look at the rsa signature, but Im not too familiar with the whole setup (cryptography in general) so it might take some time..
-
@Gijs said in Anyone using Google Cloud (not on Pybytes)?:
All these issues combined make your problem very niche, as the WLAN issue has been fixed in later versions, the memory limitations in newer hardware, and it seems the ucrypto was broken later.
Niche... no one else is using Google Cloud on WiFi? As far as I can tell that's the only thing special about my setup. Doesn't seem to be a lack of memory issue so I don't believe having a WiPy3 would improve things.
Edit: Or even JWT authentication in general. Surely this is affecting anything which uses generate_rsa_signature()...
-
Hi,
I'd love to help you out, but Im stuck here as well. From what I can find, the difference in
ucrypto.generate_rsa_signature()
between 1.20.0.r13 and 1.20.2.r4 is only the new imports, which are related to the ESP-IDF. I'm not completely sure of the workings, but it seems to be broken outside of our control. Perhaps it works in 1.20.3.b3?All these issues combined make your problem very niche, as the WLAN issue has been fixed in later versions, the memory limitations in newer hardware, and it seems the ucrypto was broken later.
I completely understand your situation, running into different limitations each time with a solution seemingly so close, but yet so far..