Lets talk wifi on the duo 64

So I have been messing with using an esp8266 conncted over uart to the duo and using esp-slip-router. It works but it’s pretty slow getting a ssh session going and I’ve had to alreay reflash the esp8266. I was also thinking of using the usb port for a usb-wifi adaptor.(this is probably the easyest) I’m trying to think of what other ways to add wifi to the duo and I like to hear some other methods.

1 Like

On the Duo 256 yould likely use SDIO, but on the Duo Classic (64) you’d be giving up the SD card slot. SPI would likely be the next best option, so something like W600 WiFi Module TW-01 | Makerfabs Electronics could work well.

I have some that should be in stock in 2-3 weeks if that is easiest for you!

1 Like

SPI? that sounds interesting. Is there code for the W600 that turns into a wifi device? How would you setup linux to add the device via SPI? Sockets perhaps?

1 Like

Yeah that’s the hard bit really. You’d likely need to modify the device tree to add it in, similar to how it works for wlcore as shown here: ti,wlcore,spi.txt - Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt - Linux source code (v4.8) - Bootlin.

As for that WiLink 7 and 8 support in that file, I cannot actually find any of their ICs available with SPI, only the UART or SDIO ones.

This may also be of interest: GitHub - notabucketofspam/ESP8089-SPI: Linux kernel module to use ESP8089 / ESP8266 over SPI. The only issue I know of there is that it needs SDIO, which takes your SD card away and would just leave you with SPI NOR flash if you have any.

The last option is to use SLIP via UART, but then you only get 2Mbps instead of 50Mbps from SPI (as best I recall).

USB would probably be the best way, eg a nano adapter that’s nice and tiny.

Best of luck, and let me know if you get SPI going!

1 Like

I think without somthing ready made for SPI I might be a little too lost. I just don’t have the networking background to write the driver and make it interface with linux. I will try out a usb as thats the most direct way and after a few days of testing I’m coming around to the uart/esp8266 using SLIP. Sure it’s a little slow right after a restart to start an ssh session, and I had some dns issues to sort out on the linux side but nothing to big. It works ok I guess.

1 Like

Ah okay good to know. Yeah SPI drivers and modifying device trees can be a pain!

UART to an ESP-01S and SLIP is probably the best way. You’d be limited to ~2Mbps there, but that’s still plenty for most use cases. This would probably do 720p video @ 20fps or 1080p @ 13fps too. Ref: Streaming Bitrate Calculator (depending on compression - H265 recommended if using hardware encoding)

1 Like

hey! i am new to serial communication between multiple interfaces. I know that esp slip router will use the esp8266 uart0 port, if i connect it to the duo will it magically be recognized as a device that i can use as a router just like we can do using serial over usb with the esp?

if that’s not the case, is there any resource you can share that can guide us noobies into doing the same as you?

1 Like

It’s been a while since I did this but maybe I can get you in the right direction. For the ESP you need to use it as a slip router. GitHub - martin-ger/esp_slip_router: A SLIP to WiFi router I found the docker image for programing the esp8266 the best place to build this project and flash it to the esp. There was also a different repo that has instructions for using docker to build and flash the ESP to use it as the router. Then on the Duo side you need to use the buildroot to add support for the slip interface( kernel???) and use slatattach to connect to it. I believe for slatattach i think you need a package called netttools if my memory serves me. I think I still have the image I made with buildroot if you want it let me know and I’ll post it to my Gdrive. After that it’s just a matter of following the directions from the github for the slip router. Once you get talking to the esp over telnet you can configure it for your wifi network( you can also build the esp8266 slip router with a network and password) You will also need to set up DNS on the Duo as well. I don’t know if it was this project or a different one put I may have changed the buildroot to use the UART0??? interface on the pins I wanted and set the pinmux for that as well. Also checkout GitHub - e1z0/esp_slip_router: A SLIP to WiFi router for some better instructions for building and flashing the ESP826. The device I made to use this I still have but it’s not running at the moment but once I get back into it I can look a little better at what I did. Like I said I can upload the Duo image if you want it.

2 Likes

Thank you so much for all the info, it will for sure guide me into the right path. As someone new to the duo this guidance is really valuable. I will follow your steps, only difference is that i’m probably going to connect the esp on UART1 or other as i’m using UART0 for talking with an raspberry pi pico at the moment.

I really appreciate your offer to upload the Duo image. For now, I’m going to try learning by doing things manually, but if I don’t succeed, the image would be really helpful, and I’d love to have it then. I’ll keep you posted!

1 Like

You can use any uart you want you may just need to adjust the device tree and pinmux in the buildroot. Let me know if you need a hand. good luck.

1 Like