Can i get HTTPS response back? #4588
Replies: 1 comment
-
Posted at 2017-04-07 by sureshkm
Posted at 2017-04-07 by @gfwilliams I'm afraid that's just an issue with HTTPS on the Pico - HTTPS uses a huge amount of RAM, and if your code is using too much then it can't allocate enough for a connection. If you're manually specifying keys and certificates, that can really hurt - so if you can just not specify them and leave them automatic it'd save you a bunch of RAM. Otherwise you could look at turning on minification and 'save on send' in the IDE options. Save on send writes data to Espruino in such a way that functions can be executed directly from Flash without having to use RAM. Posted at 2017-04-07 by sureshkm @gfwilliams Thanks for the quick response. I don't have any SSL keys/certs in the code. I think, we don't need them for the retrieval of HTTPS doc. Right? Yes, i've approx. 80KB code that gets compressed into approx. 20KB while writing into the Pico. How much should the code size be to make it work? 'Save on send' options says '.... not as memory efficient', Do you really want me to enable this? Posted at 2017-04-07 by @gfwilliams
No, you shouldn't.
Wow, yeah - that'd cause some out of memory issues then :)
It totally depends. If you have just 100 bytes of code that allocates a huge array it'll be too much, but if your code it careful with memory then it should be ok.
Yes, give it a go. Basically normal However: to upload it, you still need enough free RAM to store all your code twice over (it's just how it works I'm afraid), so it could get quite tight if you're uploading much more than 20kB Posted at 2017-04-07 by sureshkm
I did enable and corrupted my firmware, it took 2 hours to figure out why wasn't the IDE detecting the Espruino Pico :). Finally i flashed the firmware and it started detecting it. I brought down the file size to approx. 40KB, but the when i tried to write the code to Pico, it always says,
Any idea, why doesn't it read as "40000 bytes to ...." ? Posted at 2017-04-07 by sureshkm
Even saving the above code throws the below lines,
How/Why did it get "81600 bytes" when there is only a few bytes of code? Am i missing something that happens internally? Posted at 2017-04-07 by sureshkm Ok, i brought down to 4KB file size. Still facing the same issue. Posted at 2017-04-08 by @gfwilliams It sounds like you're typing When you check 'Save on Send', it saves automatically when you click the upload button and there's no need to do a A hardware reset or typing Posted at 2017-04-12 by sureshkm Thanks, @gfwilliams Can you please tell me, how/why did it get "81600 bytes" when there is only a few bytes of code? Posted at 2017-04-12 by @gfwilliams It always says Espruino basically saves an image of RAM to Flash when you What it does do is set all the unused RAM to 0, so it compresses down to virtually nothing - hence the Posted at 2018-01-25 by sureshkm I've reduced the code to 18KB and things are normal now |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-04-07 by sureshkm
Hi @gfwilliams and others,
In my Espruino Pico, i'm requesting over https for a response and i get the following error message. Please help me on this. Thanks
Beta Was this translation helpful? Give feedback.
All reactions