drivers icon indicating copy to clipboard operation
drivers copied to clipboard

wifinina: http-get example fails due to too small of buffer

Open scottfeldman opened this issue 3 years ago • 2 comments
trafficstars

Running examples/wifinina/http-get example on Arduino Nano33 IoT. Example fails with this error:

slice out of range : use http.SetBuf() to change the allocation to 1036 bytes or more 

Fix is to increase buffer size:

--- a/examples/wifinina/http-get/main.go
+++ b/examples/wifinina/http-get/main.go
@@ -44,7 +44,7 @@ var (
        adaptor *wifinina.Device
 )
 
-var buf [0x400]byte
+var buf [0x500]byte

I'll prepare a PR if the change is acceptable...

$ tinygo version tinygo version 0.25.0 linux/arm (using go version go1.19.1 and LLVM version 14.0.0)

scottfeldman avatar Oct 05 '22 23:10 scottfeldman

Just a note for now: this issue is fixed with the netdev branch.

scottfeldman avatar Jan 31 '23 07:01 scottfeldman

Fixed by #537.

scottfeldman avatar May 17 '23 06:05 scottfeldman

Closing as completed in the most recent release. Thank you!

deadprogram avatar Feb 28 '24 08:02 deadprogram