mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-07-26 10:38:41 +00:00
06dd60fba2
* Add wifi driver comboat for Elecrow W5 rp2040 and rp2350 devices Combo-AT driver uses AT command set to talk to onboard rtl8720d wifi device. The driver supports UDP/TCP/TLS clients in Wifi STA mode. Support for UDP/TCP servers is not supported, currently. https://aithinker-combo-guide.readthedocs.io/en/latest/docs/instruction/index.html https://aithinker-combo-guide.readthedocs.io/en/latest/docs/command-set/index.html https://aithinker-combo-guide.readthedocs.io/en/latest/docs/command-examples/index.html * Add wifi driver comboat for Elecrow W5 rp2040 and rp2350 devices Combo-AT driver uses AT command set to talk to onboard rtl8720d wifi device. The driver supports UDP/TCP/TLS clients in Wifi STA mode. Support for UDP/TCP servers is not supported, currently. https://aithinker-combo-guide.readthedocs.io/en/latest/docs/instruction/index.html https://aithinker-combo-guide.readthedocs.io/en/latest/docs/command-set/index.html https://aithinker-combo-guide.readthedocs.io/en/latest/docs/command-examples/index.html * switch to comboat_fw build tag for examples/net's that work with comboat driver
31 lines
397 B
Go
31 lines
397 B
Go
//go:build ninafw || wioterminal || comboat_fw
|
|
|
|
package main
|
|
|
|
import (
|
|
"log"
|
|
"time"
|
|
|
|
"tinygo.org/x/drivers/netlink"
|
|
"tinygo.org/x/drivers/netlink/probe"
|
|
)
|
|
|
|
var (
|
|
ssid string
|
|
pass string
|
|
)
|
|
|
|
func init() {
|
|
time.Sleep(2 * time.Second)
|
|
|
|
link, _ := probe.Probe()
|
|
|
|
err := link.NetConnect(&netlink.ConnectParams{
|
|
Ssid: ssid,
|
|
Passphrase: pass,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|