Call to arms | Teensy + WiFi = true

Dogbone06

Well-known member
Hello all,

Me and a bunch of guys have been working on making "true WiFi" a reality. In other words, WiFi over SDIO the proper way to get the proper fast speeds.
I made the hardware and supplied the rest of the group and they worked on the coding part. At this point we have the Murata 1DX WiFi chip talking to the Teensy over SDIO. The next step is to make a network driver. The idea is to implement this into the QNEthernet library. To make this all nice and tidy.

The WiFi chip I designed first has a header, I then made a small revision and made it so that you can push it into a SD Card slot on the Teensy 4.1.
This will in the end make it so that anyone can buy a WiFi chip and plug right into their Teensy 4.1.

Rev 1:
1750936045120.png


Rev 2:
1750936089409.png


After emailing with Paul it was decided to make a thread where this project can continue.

With that said I now hand over to the rest of the group to start discussions and share information.
Everyone in the group has at least one WiFi chip on hand.
Defragster, KurtE, Shawn, Beermat, Rezo, Mjs513
 
I'm interested. :)

If you're going to make more hardware, any chance to use LBEE5KL1YN? Murata's website says it's the replacement for 1DX. Mouser seems to have them in stock at $8.26. Digikey also has them in stock, similar pricing.

Big question though... where is the programming information? I looked through Murata's documents. Lots of electrical specs. But to work on the software side, we're going to need the SDIO commands info. Can you point me to that document? (EDIT: now I see the software section on Murata's page... will dig into this over the next day or two)
 
Ideally this could be a Teensy 4.1 form factor shield that brings the Bluetooth audio I2S signal to pins 2-5 and the UART signals to Serial7 or Serial8 (with an inverter for CTS to an XBAR pin), and the Wifi to the 2nd SDIO port (pins 40,41,17,16,22,23 = D0,D1,D2,D3,CMD,CLK). Then people could use it together with a SD card in the normal SDIO port.
 
Would there be space on a Teensy-sized WiFi / BT shield for the user to (optionally) add the eth MagJack/header/cap and make it a full 'connectivity' shield? I'm guessing 'not quite' from a width perspective, but I'd say it's worth considering?

For the WiFi programming on the @Dogbone06 hardware, we didn't get much past a 'proof of life' code-base, which was heavily cobbled together from SdFat to get the SDIO comms, plus a couple of Pi Zero / Pico W projects in the wild that recorded the SDIO comms from the Broadcom FMAC Linux driver for the chip and hard-coded them back....enough to prove the hardware design worked and WiFi could be communicated with, but not really a good code-base for a true driver.
 
Last edited:
Big question though... where is the programming information?
That was the question of the day for many weeks :(

1YN was the second set of chips @Dogbone06 got - but first batch was the harder to obtain 1DX that was in 'COMMON USE' since that would be easier to get running with all the examples in the world :(

2019 is Ancient - NXP SDK had code - but unlike the SDRAM - 1DX example code was dropped as they moved on ...
 
I'm interested. :)

If you're going to make more hardware, any chance to use LBEE5KL1YN? Murata's website says it's the replacement for 1DX. Mouser seems to have them in stock at $8.26. Digikey also has them in stock, similar pricing.

Big question though... where is the programming information? I looked through Murata's documents. Lots of electrical specs. But to work on the software side, we're going to need the SDIO commands info. Can you point me to that document? (EDIT: now I see the software section on Murata's page... will dig into this over the next day or two)
It's been some time so I went and checked. First I made the 1DX which is what the Giga R1 uses. The 1YN is indeed the one that drops right in from what I understand. I have 13pcs 1DX and 20pcs 1YN on hand right now. My plan is to make a small batch of each and send you from both batches. We have not tested 1YN yet. It should just run, but it's good that you have 1DX as well.

@Paul So I'll just have those sent to you at PJRC then okay? I'm thinking 2pcs from each batch?

Ideally this could be a Teensy 4.1 form factor shield that brings the Bluetooth audio I2S signal to pins 2-5 and the UART signals to Serial7 or Serial8 (with an inverter for CTS to an XBAR pin), and the Wifi to the 2nd SDIO port (pins 40,41,17,16,22,23 = D0,D1,D2,D3,CMD,CLK). Then people could use it together with a SD card in the normal SDIO port.
The Rev 2 as per the image above uses the SD Card slot. There is one pin that needs to be routed from the header of the WiFi chip to the Teensy. That is the WL_ON. So it's not 100% purely SD Card. Not sure how that can be solved.

That was the question of the day for many weeks :(

1YN was the second set of chips @Dogbone06 got - but first batch was the harder to obtain 1DX that was in 'COMMON USE' since that would be easier to get running with all the examples in the world :(

2019 is Ancient - NXP SDK had code - but unlike the SDRAM - 1DX example code was dropped as they moved on ...
Did we make a batch with 1YN? I don't remember. I think we only made 1DX's.
 
Did we make a batch with 1YN? I don't remember. I think we only made 1DX's.
I only saw 1DX and distributed that batch. 1YN set of 20 chips you have is what you started with AFAIK.

Indeed with @KurtE's work to use SDIO2 plugging right on the T_4.1 pins there is much cleaner than the original where the focus was on pulling from SDIO1 SD card pins with hand wiring. Then as noted one out of line control pin for WL_ON.

I could remail a drop ship as before unless Paul wants to do that to minimize the international shipping to US. The side group was 9-10 folks - not sure if this post might inspire others to join the effort to further the proof of concept and function.

NOTE: rather than a proper antenna mount and connector a simple solder through hole and a few mm (~25mm here) wire gives great radio performance and much less bulky and simpler to make. @FRDM4236 [ https://www.trainer4edu.com/edubase_teensy/frdm_4236.html ]made many ESP32 board with this and their WiFi was as good or better than other factory antenna solutions. His ESP32 design pages are offline now and not finding his Tindie page online to confirm expected wire length.

This would allow WiFi - Bluetooth is a separate effort using UART and antenna for that.
 
@Paul So I'll just have those sent to you at PJRC then okay? I'm thinking 2pcs from each batch?

Let's start with just 1 or 2 of the 1DX chip, since that's what everyone else has. This board only brings out the SDIO signals, so probably best to save those 1YN chips until another design that can bring out the 4 serial and 4 audio signals (and SDIO to pins 40,41,17,16,22,23 because people using Wifi will almost certainly also want to use a SD card).

Also, FWIW, I ordered an Arduino Giga R1 Wifi board for the sake of comparison and possible testing.
 
@Paul - @beermat and I did get to a point with the low level SDIO driver where we could do a network scan and join a network with an ssid and password. This was on a 1DX board provided by @Dogbone06.

T41_WIFI_2_800x600.jpg

pinouts:
image-800x600.png

The latest software that we were working on can be found on my sight here or at @beermat sight here. This code was based on SdioTeensy4.cpp from SdFat and can use "USDHC1" or "USDHC2". The two examples in the examples folder are "WiFiscan_example.ino" and "WiFi_join_example.ino". There is a "secrets.h" file that needs to be updated with the ssid and password of the network to join.
Code:
// The secrets file

// SSID
#define MY_SSID            "testnet"

//PASSPHRASE
#define MY_PASSPHRASE      "testpass"

// Security settings: 0 for none, 1 for WPA_TKIP, 2 for WPA2
// The hard-coded password is for test purposes only!!!
#define SECURITY        2

And that is about how far it went :)

EDIT: @KurtE was the one got USDHC2 setup in cores that we used for testing the 1DX...
 
Last edited:
Let's start with just 1 or 2 of the 1DX chip, since that's what everyone else has. This board only brings out the SDIO signals, so probably best to save those 1YN chips until another design that can bring out the 4 serial and 4 audio signals (and SDIO to pins 40,41,17,16,22,23 because people using Wifi will almost certainly also want to use a SD card).

Also, FWIW, I ordered an Arduino Giga R1 Wifi board for the sake of comparison and possible testing.
I'll make the smallest batch possible of each. 2x 1DX and 2x 1YN. Both batches will be shipped to PJRC. This is my contribution, I can't really do anything in terms of coding development.
 
Thanks. I'll take a look. How much time I can spend on the software really depends on how things are going with SparkFun. We have a meeting with them next week. I think things are starting to run pretty smoothly now, but will find out more when we have the meeting.
 
Thanks. I'll take a look. How much time I can spend on the software really depends on how things are going with SparkFun. We have a meeting with them next week. I think things are starting to run pretty smoothly now, but will find out more when we have the meeting.
While you have them face 2 face. Mention the WiFi, I'm happy to share the design so they can manufacture if this endeavor is successful.
I've had plenty of contact with Nathan Seidle before, he's a nice guy!
 
Last edited:
On the software side, wondering, we can can also learn a lot some of the stuff from the Arduino Libraries. In addition, you might
learn some additional stuff looking at what the zephyr group is doing to support SDIO with the STM32 boards. And along with
this the Arduino development on zephyr enabling Wifi and BT on some of their boards that use these chips as well as some other
ESP32 type setups.

For example there is a PR on the Zephyr: https://github.com/zephyrproject-rtos/zephyr/pull/89776
on the ArduinoCore-zephyr side, I know there is stuff pulled in recently, and more needs to be done.
 
@Paul - If you are getting a GIGA R1 WIFI for exploring the CYW4343 then here is some info on my adventures with this. I initially started out testing and exploring the 1DX with my GIGA R1. I think Arduino's code, (buried in and spread all throughout Mbed OS), is based on the Infineon WIFI Host Driver found here. There is a HTML version of the docs in the docs folder. I was using a Jlink EDU mini debug adapter with the GIGA R1 which seems to work well with the latest versions of the Arduino IDE. The ArduinoCore-mbed source library for Arduino is needed to access the code. The usable source code is found in "/tmp/mbed_os_program" after it is compiled. Setting that up is also quite interesting. The procedure for setting up the source code can be found here if needed. @KurtE and I worked to get this working in Ubuntu 24.04 and with the RPI5 and Ubuntu. I remember you saying that you were switching to a Fedora OS. Hopefully the procedure works for that as well if used. The last command "./mbed-os-to-arduino -a -g GIGA:GIGA" will bring in the rest of the latest updated Mbed code and creates a folder "/tmp/mbed_os_program" that has the complete source code in the "mbed-os" directory and a "BUILD" directory which will hold "mbed-core-GIGA.a" that now has debugging info compiled into it. The library file you are after that the Arduino IDE uses can be found in "~/sketchbook/hardware/arduino-git/mbed/variants/GIGA/libs/libmbed.a". I copy this file to `/.arduino15/packages/arduino/hardware/mbed_giga/4.3.1/variants/GIGA/libs/libmbed.a".
The original "libmbed.a" file size is 7.5MB, the file with the debug info compiled in is 43.6MB.

It was decided that trying to use the GIGA for initial hardware testing was taking to long so we went with the picowi library for reference. Also zerowi was used. @defragster setup a repo that has a lot of reference material for this project found here in the "docs" folder. I also have attached a 1DX HW design app note that might be useful. A lot of the the lower mbed wifi code can be found in "tmp/mbed-os-program/mbed-os/connectivity"/. At one point debugged my way into the CWY4343 initialization code but can't remember now where that was.

Hope this helps if you are using the GIGA R1...
 

Attachments

  • type1dx_hw_application_note.pdf
    1.5 MB · Views: 13
DUPE POST made on new accessory board thread:

new Raspberry Pi Radio module is interesting from a couple of angles
This module already in use as:

SparkFun Thing Plus - RP2350 : https://www.sparkfun.com/sparkfun-thing-plus-rp2350.html

... this board includes their radio module for single-band 2.4 GHz WiFi 4 (802.11n) and Bluetooth® 5.2 ... The Raspberry Pi Radio Module (RM2) operates over an SPI interface,
---
https://datasheets.raspberrypi.com/rm2/rm2-product-brief.pdf : uses Infineon’s CYW43439 [ 1YN ]
... Supports 20 MHz channels with data rates up to 96 Mbps (PHY rate)
... Raspberry Pi Radio Module 2 will remain in production until at least January 2036

1DX uses the CYW4343W :: Same as in Arduino GIGA
while 1YN uses CYW43439 > This is the other chip on hand for the post GIGA recommended chip
 
DUPE POST made on new accessory board thread:


This module already in use as:

SparkFun Thing Plus - RP2350 : https://www.sparkfun.com/sparkfun-thing-plus-rp2350.html

... this board includes their radio module for single-band 2.4 GHz WiFi 4 (802.11n) and Bluetooth® 5.2 ... The Raspberry Pi Radio Module (RM2) operates over an SPI interface,
---
https://datasheets.raspberrypi.com/rm2/rm2-product-brief.pdf : uses Infineon’s CYW43439 [ 1YN ]
... Supports 20 MHz channels with data rates up to 96 Mbps (PHY rate)
... Raspberry Pi Radio Module 2 will remain in production until at least January 2036

1DX uses the CYW4343W :: Same as in Arduino GIGA
while 1YN uses CYW43439 > This is the other chip on hand for the post GIGA recommended chip
So the CYW43439 that we use in 1YN is good choice.
 
Hi,

That is a great project!

The current lack of Wifi/BT is the only reason I may use an ESP32 over a Teensy for specific projects. Personally, with proper connectivity, I think I would only use Teensys as it is so much nicer to work with. :)

Is there a way to get a hand on one of the devboard by any chance? If so, I would be happy to try and help with the code...
 
Hi,

That is a great project!

The current lack of Wifi/BT is the only reason I may use an ESP32 over a Teensy for specific projects. Personally, with proper connectivity, I think I would only use Teensys as it is so much nicer to work with. :)

Is there a way to get a hand on one of the devboard by any chance? If so, I would be happy to try and help with the code...
I have to ask the straight forward question: How helpful do you think you could be? At this stage a driver needs to be written. Ideally incorporate thie WiFi chip into the QNEthernet library. Which is a great Ethernet library for the Teensy Ethernet port. Having it handle WiFi as well is ideal in my beliefs.
 
I have to ask the straight forward question: How helpful do you think you could be? At this stage a driver needs to be written. Ideally incorporate thie WiFi chip into the QNEthernet library. Which is a great Ethernet library for the Teensy Ethernet port. Having it handle WiFi as well is ideal in my beliefs.
Honestly, I cannot say how helpful I will be... But I expect at least a little bit :)
I can code pretty well and I have used the QNEthernet library previously (but without delving into the code yet). I am also familiar with creating libraries and device drivers and optimizing code...

Anyway, I was suggesting that because I am looking for something to occupy myself over the summer as I will have some spare time (not so much starting September...). Thus, if supply is limited, you should indeed prioritize persons which will be more efficient than me. But otherwise, I would be happy to buy a devboard from you (I'll also pay the shipping cost as I live in France).

In any case, I wish you good luck with this project!
 
Honestly, I cannot say how helpful I will be... But I expect at least a little bit :)
I can code pretty well and I have used the QNEthernet library previously (but without delving into the code yet). I am also familiar with creating libraries and device drivers and optimizing code...

Anyway, I was suggesting that because I am looking for something to occupy myself over the summer as I will have some spare time (not so much starting September...). Thus, if supply is limited, you should indeed prioritize persons which will be more efficient than me. But otherwise, I would be happy to buy a devboard from you (I'll also pay the shipping cost as I live in France).

In any case, I wish you good luck with this project!
I had a chat with the boys. The state we are in now we need to wait for Paul and Shawn to say theirs. As they are the main figures right now to be able to move forward. Paul will recieve a few chips in 1 - 2 weeks. After that I think we'll see some movement. I won't forget your request tho!
 
Back
Top