teensy 4 and wifi

Status
Not open for further replies.

RichardFerraro

Well-known member
I want to provide wifi to my teensy 4/4.1 system. I have seen older forum entries and was
wondering if anyone has a current working system?

I worked with some 8266 parts and teensy 3.2 a few years ago.

I don't need coprocessing. I just want to dump the files on the sd card to a web site.

I see blackketter's esp32 sidecar post which is a few years old.
I also see (and ordered a few) of the adafruit airlift eps32 boards yet read there were some modifications
necessry for the Teensy 4

thanks for any guidance,

Richie
 
Last edited:
An ESP module is probably the easiest and fastest way to get up and running. Theoretically it can support a SDIO or USB WiFi chip, but I haven’t found one with good documentation publicly available to try and add one.
 
Unfortunately I haven’t been able to find one with proper documentation so the only option would be to reverse engineer an open source Linux driver. Which is currently beyond my level of understanding and the time I have available to dedicate to it is a little short. Before the Teensy 4.1 with built in Ethernet I did have a USB Ethernet adapter working on a 3.6 because luckily I was able to find the documentation for its chipset(plus a little bit of USB sniffing).
 
I would (and I hate to say it) but and ESP32 will be the easiest to implement. I have a few applications, one is a home monitoring system that reads sensor data and serves a web page so I can view on a PC or phone.

1. do you want to update data on the web page or just dump data from an SD card to the web page
2. do you want to have any controls (buttons, sliders) on the web page so you can send instructions back to the web server?
3. how many clients do you expect (the ESP can handle up to 4 clients)?
 
Thanks for responding.
All the Teensy 4's are clients.
My plan is to have a server (e.g., AWS) which receives files from the clients (Teensy 4s).
Ideally, the server could also send files to the clients.

I ordered a couple of the airlifts hoping someone knows how to interface its ESP32 to the Teensy 4.
Seems like something people would be interested in.

Are you using ESP32 and Teensy 4/4.1 ?
Are you using SPI? Serial?
Would you share some of your work to help me get going, at least to get the
Teensy 4s to connect to the internet.

thanks,

RIchie
 
We maybe talking about different applications, for mine

1. Teensy 3.2 measures data, sends wireless data to ESP32 (using EBYTE transceivers)
2. ESP32 has and EBYTE and reads incoming data, processes, and builds a web page an acts as an access point
3. a Smart TV connects to the ESP32 server to display the web page
4. Teensy 3.2 measures data and sends to the server every second
5. ESP again reads incoming data, and creates and XML and sends to the web page JAVA using AJAX updates data on the page

I'm not exactly sure what you are trying to do, at any rate, hang on to your hat, AJAX, HTML coding is very challenging.
 
Nicely done. I am using a Teensy 4.1 to control a palette generator instrument I designed.
People playing the instrument create color palettes that are stored on sd-card.
I want to connect 8266 or esp32 to Teensy 4.1 to allow Teensy 4.1 to send the palettes to a server.

So, it is a bit different from your application.

thanks and good luck.
 
Hi Richie, nice to see our paths are crossing again! I've spent the last two months working on a way to serve files from a Teensy over WiFi using a ESP* chip. My project is close to working but I've been stuck on ESP32 mutitasking/multicore issues for the last couple weeks. As of now I can:

- Connect my Teensy 4.1 with microSD card to an ESP32 using a serial port (two wires only)
- Run a slightly modified ESP_AsyncFSBrowser sketch on the ESP32, which can interact with a remote filesystem connected over serial (the Teensy 4.1's SD filesystem), and serve files from the remote filesystem
- Download files over WiFi using the browser or curl with >50% success rate, but occasional missing bytes (because of the multitasking/multicore issue I've been stuck on)

An underwhelming image, but this shows two filesystems being served to a webpage, "SD" is the local SD on the ESP32, "myfs" is the Teensy's SD. When a file is loaded there's a preview/editor usable on the right side.
unknown.jpg

I've given up on fixing the occasional missing bytes, and I'm now focusing on making the serial link reliable with error checking and retransmits if needed, which should hopefully compensate for the missing bytes issue. I need to add support for uploading/editing files too which should be relatively easy.

I'm working with an ESP32 dev board right now, but believe this should work just as well only slower on an ESP8266, e.g. a $2 ESP-01 module. I haven't tried using an Airlift yet, but I have an Airlift dev board and since it only needs two pins to connect it should work just fine with Airlift, and I'll verify at some point.

This isn't exactly what you asked for, but I think will solve the problem of retrieving files from your Teensy over WiFi. If you want to upload files to a remote server, I suggest getting that functionality working with an ESP32, uploading files from a local file system (e.g. LittleFS stored in flash), and then you can switch to the remote teensy filesystem once my library is more stable. What I'm working on won't directly help you run code on the Teensy that pushes files to a remote server though I found an (out of date) project that does that: https://github.com/jeelabs/esp-link
 
I have successfully connected the AirLift (ESP32) to a Teensy 4.1 and run several of the examples allowing scanning, WPA , SSL , JSON.
It was effortless.
The examples for non circuit python are at https://learn.adafruit.com/adafruit-airlift-breakout/arduino

Pins connected:
BUSY to 4.1 pin 9 (any pin)
CS to 4.1 pin 10 (any pin)
MOSI to 4.1 pin 11
MISO to 4.1 pin 12
SPI_CLK to 4.1 pin 13
RESET to 4.1 pin 41 (any pin)
GP0 to 4.1 pin 40 (any pin)
 
It's normally forgotten about, but you can use a Raspberry Pi Zero W or Raspberry Pi 3A for less than the cost of some implementations of WiFi. There can be a bit of a learning curve writing a server daemon to handle the data, but the hardware is pretty rock solid at this point. There are currently a few 5gHz WiFi modules, but almost everything embedded is 2.4gHz due to price and power budget.
 
Status
Not open for further replies.
Back
Top