tinygo-org / drivers

TinyGo drivers for sensors, displays, wireless adaptors, and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
588 stars 183 forks source link

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

Closed scottfeldman closed 5 months ago

scottfeldman commented 1 year ago

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 commented 1 year ago

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

scottfeldman commented 1 year ago

Fixed by #537.

deadprogram commented 5 months ago

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