Open bloveless opened 3 days ago
If you are to use the net
API you need to set the Netdever by calling UseNetdev:
That said, that is much easier said than done without a NetDever. I strongly suggest you use a seqs.TCPConn as the transport for peasocket. You can find examples on how to instantiate a Server TCPConn in cyw43439:
socket
variable.Awesome! I’ll see if I can figure it out from here and report back. Thank you!
Looking at the code a bit more and it seems that net
is baked into the Client
, or at least for dialing. So it seems like you are suggesting passing a seqs.TCPConn to the tx and rx of the peasocket.Client in order to skip calling dial on the client but it seems like those can only be set by calling Dial. Maybe you are suggesting skipping the Client entirely and writing the glue code for interfacing seqs.TCPConn and peasocket.
If I do get this working I’d be more than happy to contribute back some documentation on this if you are interested. Maybe someone else can benefit from this discussion!
Hello there! Thanks for creating all these libraries for the pico-w. I'm very new to tinygo so feel free to point me somewhere else if I'm just overlooking something.
I'm trying to use soypat/cyw43439 to connect to a wifi network which works great! But I'm not sure how to initialize a websocket client using that wifi network.
It really boils down to first setting up the wifi connection and next trying to create a websocket connection.
When I run this code on the pico-w I get
My assumption here is that netdev isn't being set to the device that is created by connecting to the wifi network but that is really just an assumption coming from the error message and that the error message comes from a nopNetdev.
Anyway any advice would be awesome! Thank you!