Call to arms | Teensy + WiFi = true

We probably can and should add some examples like this. @mjs513 and I were hacking away on one that actually retrieves the
Weather information. There are still problems with my most recent one where I tried to merge the earlier sketch that retrieved the
Lat/Long of city names and then used that to talk to the calls to retrieve the weather information.

Currently I have it default to something like Disneyland and returns data like:
Code:
Waiting for local IP...
Setting link up
Local IP: 192.168.2.52

[0/3] Map City to Location...
Name Query:/v1/search?name=Disneyland&count=1

====================== Map City ======================
Name:                Disneyland
latitude:            33.812073
longitude:           -117.918980
Time Zone:           America/Los_Angeles

[1/3] Requesting Current Weather...

====================== CURRENT WEATHER ======================
Time:                2026-08-30T19:30
Condition:           Clear sky (Code 0)
Temperature:         75.4 °F
Pressure (MSL):      1010.4 hPa
Wind Speed:          6.8 mph
Wind Direction:      232°
Rain:                0.00 in
Snowfall:            0.00 in

[2/3] Requesting Hourly Forecast...

========================================== HOURLY FORECAST ==========================================
   Time        PoP%    Rain     Snow     Wind
-----------------------------------------------------------------------------------------------------
   00:00       0%    0.00 in   0.00 in   3.5 mph
   01:00       0%    0.00 in   0.00 in   4.3 mph
   02:00       0%    0.00 in   0.00 in   4.3 mph
   03:00       0%    0.00 in   0.00 in   2.4 mph
   04:00       0%    0.00 in   0.00 in   2.6 mph
   05:00       0%    0.00 in   0.00 in   0.7 mph
   06:00       0%    0.00 in   0.00 in   2.4 mph
   07:00       0%    0.00 in   0.00 in   2.2 mph
   08:00       0%    0.00 in   0.00 in   3.4 mph
   09:00       0%    0.00 in   0.00 in   1.6 mph
   10:00       0%    0.00 in   0.00 in   1.2 mph
   11:00       0%    0.00 in   0.00 in   2.7 mph
   12:00       0%    0.00 in   0.00 in   8.1 mph
   13:00       0%    0.00 in   0.00 in   7.0 mph
   14:00       0%    0.00 in   0.00 in   9.4 mph
   15:00       0%    0.00 in   0.00 in   8.2 mph
   16:00       0%    0.00 in   0.00 in   7.6 mph
   17:00       0%    0.00 in   0.00 in   7.3 mph
   18:00       0%    0.00 in   0.00 in   9.1 mph
   19:00       0%    0.00 in   0.00 in   7.4 mph
   20:00       0%    0.00 in   0.00 in   6.0 mph
   21:00       0%    0.00 in   0.00 in   4.5 mph
   22:00       0%    0.00 in   0.00 in   4.1 mph
   23:00       0%    0.00 in   0.00 in   3.8 mph

[3/3] Requesting Daily Forecast...

=========================================== DAILY FORECAST ==========================================
   Date       Max/Min Temp    PoP%   Precip    Rain    Snow    MaxWind   Gusts   Condition
-----------------------------------------------------------------------------------------------------
   08-30     89.1 / 71.6 °F    0%   0.00 in  0.00 in  0.00 in  9.4 mph 10.7 mph  Partly cloudy
   08-31     84.4 / 68.7 °F    1%   0.00 in  0.00 in  0.00 in  9.8 mph 11.9 mph  Overcast
   09-01     82.1 / 62.5 °F    1%   0.00 in  0.00 in  0.00 in 10.3 mph 10.5 mph  Partly cloudy
   09-02     82.7 / 69.4 °F    1%   0.00 in  0.00 in  0.00 in 10.6 mph  9.6 mph  Clear sky
   09-03     82.5 / 70.6 °F    0%   0.00 in  0.00 in  0.00 in 11.3 mph  9.2 mph  Clear sky
   09-04     83.1 / 70.3 °F    1%   0.00 in  0.00 in  0.00 in 12.2 mph 11.2 mph  Clear sky
   09-05     82.3 / 71.5 °F   11%   0.00 in  0.00 in  0.00 in  9.4 mph  9.2 mph  Overcast
================================================================================---------------------

All data successfully fetched!
Enter City name:

/CODE]

It also allows me to type in a city name, which works for some and not others???
Like: New York

[CODE]New City: New York

[0/3] Map City to Location...
Name Query:/v1/search?name=New York&count=1
JSON Parsing failed: InvalidInput
null
Not sure why yet???
But you can also type in zip code and it will work:
Code:
New City: 1004

[0/3] Map City to Location...
Name Query:/v1/search?name=1004&count=1

====================== Map City ======================
Name:                Lausanne
latitude:            46.515999
longitude:           6.632820
Time Zone:           Europe/Zurich

[1/3] Requesting Current Weather...

====================== CURRENT WEATHER ======================
Time:                2026-08-31T04:30
Condition:           Overcast (Code 3)
Temperature:         69.8 °F
Pressure (MSL):      1018.1 hPa
Wind Speed:          7.3 mph
Wind Direction:      259°
Rain:                0.00 in
Snowfall:            0.00 in

[2/3] Requesting Hourly Forecast...

========================================== HOURLY FORECAST ==========================================
   Time        PoP%    Rain     Snow     Wind
-----------------------------------------------------------------------------------------------------
   00:00       3%    0.02 in   0.00 in  17.5 mph
   01:00       8%    0.23 in   0.00 in   1.0 mph
   02:00      15%    0.00 in   0.00 in   2.4 mph
   03:00      48%    0.00 in   0.00 in   5.7 mph
   04:00      40%    0.00 in   0.00 in   7.5 mph
   05:00      43%    0.00 in   0.00 in   6.5 mph
   06:00      50%    0.00 in   0.00 in   6.7 mph
   07:00      25%    0.00 in   0.00 in   6.6 mph
   08:00      15%    0.00 in   0.00 in   6.6 mph
   09:00      18%    0.00 in   0.00 in   6.7 mph
   10:00      10%    0.00 in   0.00 in   8.7 mph
   11:00       5%    0.00 in   0.00 in   8.9 mph
   12:00       3%    0.00 in   0.00 in   9.3 mph
   13:00       3%    0.00 in   0.00 in  10.0 mph
   14:00       0%    0.00 in   0.00 in  10.3 mph
   15:00       0%    0.00 in   0.00 in  10.3 mph
   16:00       0%    0.00 in   0.00 in   9.9 mph
   17:00       0%    0.00 in   0.00 in   9.9 mph
   18:00       0%    0.00 in   0.00 in   9.1 mph
   19:00       0%    0.00 in   0.00 in   6.8 mph
   20:00       0%    0.00 in   0.00 in   3.8 mph
   21:00       0%    0.00 in   0.00 in   2.3 mph
   22:00       0%    0.00 in   0.00 in   3.6 mph
   23:00       0%    0.00 in   0.00 in   4.1 mph

[3/3] Requesting Daily Forecast...

=========================================== DAILY FORECAST ==========================================
   Date       Max/Min Temp    PoP%   Precip    Rain    Snow    MaxWind   Gusts   Condition
-----------------------------------------------------------------------------------------------------
   08-30     80.3 / 65.9 °F   48%   0.25 in  0.24 in  0.00 in 17.5 mph 31.5 mph  Unknown
   08-31     76.4 / 63.1 °F   50%   0.00 in  0.00 in  0.00 in 10.3 mph 24.6 mph  Overcast
   09-01     77.3 / 62.1 °F    0%   0.00 in  0.00 in  0.00 in  5.9 mph 12.5 mph  Overcast
   09-02     76.6 / 66.0 °F    3%   0.00 in  0.00 in  0.00 in  8.8 mph 15.9 mph  Overcast
   09-03     79.0 / 65.3 °F    0%   0.00 in  0.00 in  0.00 in  6.0 mph  9.8 mph  Mainly clear
   09-04     84.5 / 68.0 °F    1%   0.00 in  0.00 in  0.00 in  4.7 mph  8.3 mph  Mainly clear
   09-05     85.0 / 67.0 °F    3%   0.00 in  0.00 in  0.00 in  4.9 mph  9.4 mph  Mainly clear
================================================================================---------------------

All data successfully fetched!
Enter City name:

Just playing...
If we were to make something like this as an example, we should probably put several comments in it giving credit to
things like: Your Friently AI, open-meteo.com, Not sure also mention Arduino with their Brick as a starting point...

But now just having some fun
These are the kind of examples that help validate a library:) Practical application. Downloaded the zip file and will play with it...
 
The home town info/forecast:
Code:
Enter City name:
New City: bellingham

[0/3] Map City to Location...
Name Query:/v1/search?name=bellingham&count=1

====================== Map City ======================
Name:                Bellingham
latitude:            48.759548
longitude:           -122.488220
Time Zone:           America/Los_Angeles

[1/3] Requesting Current Weather...

====================== CURRENT WEATHER ======================
Time:                2026-08-30T21:15
Condition:           Clear sky (Code 0)
Temperature:         59.9 °F
Pressure (MSL):      1017.5 hPa
Wind Speed:          2.9 mph
Wind Direction:      180°
Rain:                0.00 in
Snowfall:            0.00 in

[2/3] Requesting Hourly Forecast...

========================================== HOURLY FORECAST ==========================================
   Time        PoP%    Rain     Snow     Wind
-----------------------------------------------------------------------------------------------------
   00:00       1%    0.00 in   0.00 in   7.1 mph
   01:00       1%    0.00 in   0.00 in   5.6 mph
   02:00       1%    0.00 in   0.00 in   5.6 mph
   03:00       1%    0.00 in   0.00 in   5.7 mph
   04:00       1%    0.00 in   0.00 in   5.0 mph
   05:00       2%    0.00 in   0.00 in   4.9 mph
   06:00       2%    0.00 in   0.00 in   5.1 mph
   07:00       3%    0.00 in   0.00 in   5.3 mph
   08:00       8%    0.00 in   0.00 in   5.5 mph
   09:00      10%    0.00 in   0.00 in   7.4 mph
   10:00      14%    0.00 in   0.00 in   8.1 mph
   11:00      10%    0.00 in   0.00 in   8.5 mph
   12:00       6%    0.00 in   0.00 in   9.3 mph
   13:00       3%    0.00 in   0.00 in   7.4 mph
   14:00       3%    0.00 in   0.00 in   8.3 mph
   15:00       2%    0.00 in   0.00 in   6.9 mph
   16:00       2%    0.00 in   0.00 in   5.7 mph
   17:00       2%    0.00 in   0.00 in   4.7 mph
   18:00       2%    0.00 in   0.00 in   5.0 mph
   19:00       2%    0.00 in   0.00 in   3.7 mph
   20:00       2%    0.00 in   0.00 in   2.2 mph
   21:00       2%    0.00 in   0.00 in   2.7 mph
   22:00       2%    0.00 in   0.00 in   2.2 mph
   23:00       2%    0.00 in   0.00 in   2.4 mph

[3/3] Requesting Daily Forecast...

=========================================== DAILY FORECAST ==========================================
   Date       Max/Min Temp    PoP%   Precip    Rain    Snow    MaxWind   Gusts   Condition
-----------------------------------------------------------------------------------------------------
   08-31     73.6 / 52.4 °F    4%   0.00 in  0.00 in  0.00 in  8.3 mph  9.2 mph  Overcast
   09-01     68.5 / 54.2 °F   30%   0.00 in  0.00 in  0.00 in 13.5 mph 21.3 mph  Overcast
   09-02     70.5 / 53.6 °F   68%   0.02 in  0.02 in  0.00 in 13.3 mph 31.1 mph  Light drizzle
   09-03     61.3 / 51.4 °F   68%   0.50 in  0.30 in  0.00 in 11.1 mph 27.3 mph  Moderate rain showers
   09-04     63.0 / 53.1 °F   36%   0.02 in  0.00 in  0.00 in  9.1 mph 19.2 mph  Light drizzle
   09-05     64.9 / 48.0 °F   15%   0.00 in  0.00 in  0.00 in  5.9 mph  8.7 mph  Overcast
   09-06     67.7 / 52.9 °F   27%   0.00 in  0.00 in  0.00 in  6.0 mph  5.6 mph  Mainly clear
================================================================================---------------------

All data successfully fetched!
Enter City name:
Very cool, just have to be quick with city name entry...
 
@KurtE - @wwatson

There is one issue that I ran into when testing that I could not figure out. If you look at the hourly data

Code:
bool sendHourlyRequest() {
  client.stop(); // Clear existing socket
  if (!client.connect(server, port)) return false;

  JsonDocument params;
  params["latitude"] = weather_latitude;
  params["longitude"] = weather_longitude;

  JsonArray hourly = params["hourly"].to<JsonArray>();
  //hourly.add("temperature_2m");
  hourly.add("precipitation_probability");
  //hourly.add("precipitation");
  hourly.add("rain");
  hourly.add("snowfall");
  //hourly.add("pressure_msl");
  hourly.add("wind_speed_10m");

  params["timezone"] = weather_time_zone;
  params["forecast_days"] = 1;
  params["wind_speed_unit"] = "mph";
  params["temperature_unit"] = "fahrenheit";
  params["precipitation_unit"] = "inch";

  String resource = buildQueryString("/v1/forecast", params);

  client.print("GET ");
  client.print(resource.c_str());
  client.print(" HTTP/1.0\r\nHost: api.open-meteo.com\r\nUser-Agent: Teensy-QNEthernet\r\nConnection: close\r\n\r\n");

  headerState = 0;
  headerComplete = false;
  return true;
}

You will notice that some elements are commented. If you uncomment them the response from the server hangs for some reason. Now if I send the same param request with all the hourly data I requested on the Q in python

Python:
import openmeteo_requests

import pandas as pd
import requests_cache
from retry_requests import retry

def fetch_weather_data():
    cache_session = requests_cache.CachedSession('.cache', expire_after=3600)
    retry_session = retry(cache_session, retries=5, backoff_factor=0.2)
    openmeteo = openmeteo_requests.Client(session=retry_session)

    url = "https://api.open-meteo.com/v1/forecast"

    params = {
            "latitude": 40.7654,
            "longitude": -73.8174,
            "daily": [
                    "temperature_2m_max",
                    "temperature_2m_min",
                    "snowfall_sum",
                    "precipitation_probability_max",
                    "weather_code",
                    "wind_speed_10m_max",
                    "wind_gusts_10m_max",
                    "rain_sum",
                    "precipitation_sum",
            ],
            # Included surface_pressure to match extraction logic
            "hourly": [
                    "temperature_2m",
                    "precipitation_probability",
                    "precipitation",
                    "rain",
                    "snowfall",
                    "pressure_msl",
                    "surface_pressure",
                    "wind_speed_10m",
            ],
            "current": [
                    "temperature_2m",
                    "wind_speed_10m",
                    "wind_direction_10m",
                    "weather_code",
                    "pressure_msl",
                    "rain",
                    "snowfall",
            ],
            "timezone": "America/New_York",
            "forecast_days": 1,
            "wind_speed_unit": "mph",
            "temperature_unit": "fahrenheit",
            "precipitation_unit": "inch",
    }
    responses = openmeteo.weather_api(url, params=params)
    response = responses[0]

    hourly = response.Hourly()

    hourly_data = {
            "date": pd.date_range(
                    start=pd.to_datetime(hourly.Time() + response.UtcOffsetSeconds(), unit="s", utc=True),
                    end=pd.to_datetime(hourly.TimeEnd() + response.UtcOffsetSeconds(), unit="s", utc=True),
                    freq=pd.Timedelta(seconds=hourly.Interval()),
                    inclusive="left",
            ),
            "temperature_2m": hourly.Variables(0).ValuesAsNumpy(),
            "precipitation_probability": hourly.Variables(1).ValuesAsNumpy(),
            "precipitation": hourly.Variables(2).ValuesAsNumpy(),
            "rain": hourly.Variables(3).ValuesAsNumpy(),
            "snowfall": hourly.Variables(4).ValuesAsNumpy(),
            "pressure_msl": hourly.Variables(5).ValuesAsNumpy(),
            "surface_pressure": hourly.Variables(6).ValuesAsNumpy(),
            "wind_speed_10m": hourly.Variables(7).ValuesAsNumpy(),
    }
   
    pd.set_option("display.max_columns", None)
    pd.set_option("display.max_rows", None)
    pd.set_option("display.width", 1000)
   
    return pd.DataFrame(hourly_data)


def main():
    df = fetch_weather_data()
    # Ensure pandas doesn't truncate rows/columns when printing
    print(df)

if __name__ == "__main__":
    main()

I will get the whole dataset with no hangs, sample output

Code:
======== App is starting ============================
             date              temperature_2m  precipitation_probability  precipitation      rain  snowfall  pressure_msl  surface_pressure  wind_speed_10m
0  2026-08-31 00:00:00+00:00       74.417900                        6.0       0.000000  0.000000       0.0   1018.599976       1014.738464        2.702977
1  2026-08-31 01:00:00+00:00       71.897903                        2.0       0.000000  0.000000       0.0   1018.700012       1014.819946        3.906753
2  2026-08-31 02:00:00+00:00       72.257904                        2.0       0.000000  0.000000       0.0   1018.700012       1014.822632        4.606265
3  2026-08-31 03:00:00+00:00       71.087898                        2.0       0.000000  0.000000       0.0   1018.799988       1014.913513        3.325540
4  2026-08-31 04:00:00+00:00       70.727905                        3.0       0.000000  0.000000       0.0   1018.599976       1014.711731        1.500625
5  2026-08-31 05:00:00+00:00       70.277901                        1.0       0.000000  0.000000       0.0   1018.599976       1014.708618        0.500208

Might be something to look into - not sure if its a setting I am missing.

Did run one more test with simpleHttpclient and moded to read weather data so I test reading into buffer but that failed as well

C++:
// SPDX-FileCopyrightText: (c) 2024-2026 Shawn Silverman <shawn@pobox.com>
// SPDX-License-Identifier: AGPL-3.0-or-later

// SimpleHTTPClient implements a very rudimentary HTTP client. It
// makes an HTTP request once upon acquiring an IP address and then
// reads until connection-close. It also demonstrates use of a state
// machine. Note that the response is not parsed.

#include <QNEthernet.h>
#include <ArduinoJson.h>


using namespace qindesign::network;

// -------------------------------------------------------------------
//  Configuration
// -------------------------------------------------------------------

constexpr char kHost[]{"api.open-meteo.com"};
constexpr uint16_t kPort = 80;

// -------------------------------------------------------------------
//  Types
// -------------------------------------------------------------------

enum class States {
  kStart,
  kConnect,
  kSendRequest,
  kReadResponse,
  kEnd,
};

// -------------------------------------------------------------------
//  Program State
// -------------------------------------------------------------------

namespace {  // Internal linkage section

// Where we're at and what we're doing
States state = States::kStart;

// The network client
EthernetClient client;

// Program state
bool gotIP = false;  // Watch for when we get an IP
uint32_t responseStartTime = 0;
size_t responseSize = 0;

// Client read buffer
uint8_t readBuf[2 * 2048];

}  // namespace

JsonDocument doc;

// Helper to construct exact URL query
String buildQueryString(const char *basePath, JsonDocument &params) {
  String query = String(basePath);
  bool first = true;

  JsonObject obj = params.as<JsonObject>();
  for (JsonPair kv : obj) {
    query += first ? '?' : '&';
    first = false;

    query += kv.key().c_str();
    query += '=';

    if (kv.value().is<JsonArray>()) {
      bool firstElement = true;
      for (JsonVariant val : kv.value().as<JsonArray>()) {
        if (!firstElement) query += ',';
        query += val.as<String>();
        firstElement = false;
      }
    } else {
      query += kv.value().as<String>();
    }
  }
  return query;
}


// -------------------------------------------------------------------
//  Main Program
// -------------------------------------------------------------------

namespace {
// Forward declarations
bool connect();
void sendRequest();
bool readResponse();
}  // namespace

// Main program setup.
void setup() {
  Serial.begin(115200);
  while (!Serial && (millis() < 4000)) {
    // Wait for Serial
  }
  Serial.println("Starting...");

  // Watch for link changes
  Ethernet.onLinkState([](bool state) {
    if (state) {
      Serial.println("[Ethernet] Link ON");
    } else {
      Serial.println("[Ethernet] Link OFF");
    }
  });

  // Watch for address changes
  // It will take a little time to get an IP address, so watch for it
  Ethernet.onAddressChanged([]() {
    IPAddress ip = Ethernet.localIP();
    bool hasIP = (ip != INADDR_NONE);
    if (hasIP) {
      gotIP = true;
      Serial.printf("[Ethernet] Address changed: IP = %u.%u.%u.%u",
                    ip[0], ip[1], ip[2], ip[3]);
      Serial.println();
    } else {
      Serial.println("[Ethernet] Address changed: No IP");
    }
  });

  Serial.println();
  Serial.println("[Start]");
  Serial.println("Starting Ethernet with DHCP...");
  if (!Ethernet.begin()) {
    Serial.println("ERROR: Failed to start Ethernet");
    return;
  }
}

// Main program loop.
void loop() {
  switch (state) {
    case States::kStart:
      if (gotIP) {
        state = States::kConnect;
      }
      break;

    case States::kConnect:
      Serial.println();
      Serial.println("[Request]");
      if (connect()) {
        // For this demo, only send the request once
        state = States::kSendRequest;
      } else {
        state = States::kEnd;
      }
      break;

    case States::kSendRequest:
      sendRequest();

      Serial.println();
      Serial.println("[Response]");
      state = States::kReadResponse;

      // Initialize response state
      responseStartTime = micros();
      responseSize = 0;

      break;

    case States::kReadResponse:
      if (readResponse()) {
        state = States::kEnd;
      }
      break;

    case States::kEnd:
      break;
  }
}

// -------------------------------------------------------------------
//  Internal Functions
// -------------------------------------------------------------------

namespace {

// Attempts to connect to the host and returns whether successful.
bool connect() {
  Serial.printf("Connecting to %s:%" PRIu16 "...", kHost, kPort);
  Serial.println();

  // (This version waits; connectNoWait() does not wait, but would
  //  require another state)
  if (!client.connect(kHost, kPort)) {
    Serial.println("Could not connect to host");
    return false;
  }

  return true;
}

// Sends the HTTP request.
void sendRequest() {
  Serial.println("Sending request...");
 JsonDocument params;
  params["latitude"] = 40.7654;
  params["longitude"] = -73.8174;


  // Hourly parameters
  JsonArray hourly = params["hourly"].to<JsonArray>();
  hourly.add("temperature_2m");
  hourly.add("precipitation_probability");
  hourly.add("precipitation");
  hourly.add("rain");
  hourly.add("snowfall");
  hourly.add("pressure_msl");
  hourly.add("wind_speed_10m");

  params["timezone"] = "GMT-4";
  params["forecast_days"] = 1;
  params["wind_speed_unit"] = "mph";
  params["temperature_unit"] = "fahrenheit";
  params["precipitation_unit"] = "inch";

  String resource = buildQueryString("/v1/forecast", params);

  Serial.print("Built URL Path: ");
  Serial.println(resource.c_str());

    Serial.println("Connected to server. Sending request...");

    // Send HTTP GET with rigid carriage-return line-feeds
    client.print("GET ");
    client.print(resource.c_str());
    client.print(" HTTP/1.0\r\n");
    client.print("Host: api.open-meteo.com\r\n");
    client.print("User-Agent: Teensy-QNEthernet\r\n");
    client.print("Connection: close\r\n");
    client.print("\r\n");
}

// Reads the response and returns whether complete.
bool readResponse() {
  // Read what's available from the client and print it
  int avail = client.available();
  if (avail > 0) {
    int read = client.read(readBuf, sizeof(readBuf));
    if (read > 0) {
      responseSize += read;
      Serial.write(readBuf, read);
      Serial.flush();
    }
  }

  // Detect connection end and no data available
  if (!client.connected()) {
    uint32_t responseDuration = micros() - responseStartTime;
    Serial.println();
    Serial.printf("Response stats: %zu bytes in %g seconds",
                  responseSize, responseDuration / 1e6f);
    Serial.println();
    return true;
  }

  return false;
}

}  // namespace

but hangs at response
 
@KurtE - @wwatson

There is one issue that I ran into when testing that I could not figure out. If you look at the hourly data

Code:
bool sendHourlyRequest() {
  client.stop(); // Clear existing socket
  if (!client.connect(server, port)) return false;

  JsonDocument params;
  params["latitude"] = weather_latitude;
  params["longitude"] = weather_longitude;

  JsonArray hourly = params["hourly"].to<JsonArray>();
  //hourly.add("temperature_2m");
  hourly.add("precipitation_probability");
  //hourly.add("precipitation");
  hourly.add("rain");
  hourly.add("snowfall");
  //hourly.add("pressure_msl");
  hourly.add("wind_speed_10m");

  params["timezone"] = weather_time_zone;
  params["forecast_days"] = 1;
  params["wind_speed_unit"] = "mph";
  params["temperature_unit"] = "fahrenheit";
  params["precipitation_unit"] = "inch";

  String resource = buildQueryString("/v1/forecast", params);

  client.print("GET ");
  client.print(resource.c_str());
  client.print(" HTTP/1.0\r\nHost: api.open-meteo.com\r\nUser-Agent: Teensy-QNEthernet\r\nConnection: close\r\n\r\n");

  headerState = 0;
  headerComplete = false;
  return true;
}

You will notice that some elements are commented. If you uncomment them the response from the server hangs for some reason. Now if I send the same param request with all the hourly data I requested on the Q in python

Python:
import openmeteo_requests

import pandas as pd
import requests_cache
from retry_requests import retry

def fetch_weather_data():
    cache_session = requests_cache.CachedSession('.cache', expire_after=3600)
    retry_session = retry(cache_session, retries=5, backoff_factor=0.2)
    openmeteo = openmeteo_requests.Client(session=retry_session)

    url = "https://api.open-meteo.com/v1/forecast"

    params = {
            "latitude": 40.7654,
            "longitude": -73.8174,
            "daily": [
                    "temperature_2m_max",
                    "temperature_2m_min",
                    "snowfall_sum",
                    "precipitation_probability_max",
                    "weather_code",
                    "wind_speed_10m_max",
                    "wind_gusts_10m_max",
                    "rain_sum",
                    "precipitation_sum",
            ],
            # Included surface_pressure to match extraction logic
            "hourly": [
                    "temperature_2m",
                    "precipitation_probability",
                    "precipitation",
                    "rain",
                    "snowfall",
                    "pressure_msl",
                    "surface_pressure",
                    "wind_speed_10m",
            ],
            "current": [
                    "temperature_2m",
                    "wind_speed_10m",
                    "wind_direction_10m",
                    "weather_code",
                    "pressure_msl",
                    "rain",
                    "snowfall",
            ],
            "timezone": "America/New_York",
            "forecast_days": 1,
            "wind_speed_unit": "mph",
            "temperature_unit": "fahrenheit",
            "precipitation_unit": "inch",
    }
    responses = openmeteo.weather_api(url, params=params)
    response = responses[0]

    hourly = response.Hourly()

    hourly_data = {
            "date": pd.date_range(
                    start=pd.to_datetime(hourly.Time() + response.UtcOffsetSeconds(), unit="s", utc=True),
                    end=pd.to_datetime(hourly.TimeEnd() + response.UtcOffsetSeconds(), unit="s", utc=True),
                    freq=pd.Timedelta(seconds=hourly.Interval()),
                    inclusive="left",
            ),
            "temperature_2m": hourly.Variables(0).ValuesAsNumpy(),
            "precipitation_probability": hourly.Variables(1).ValuesAsNumpy(),
            "precipitation": hourly.Variables(2).ValuesAsNumpy(),
            "rain": hourly.Variables(3).ValuesAsNumpy(),
            "snowfall": hourly.Variables(4).ValuesAsNumpy(),
            "pressure_msl": hourly.Variables(5).ValuesAsNumpy(),
            "surface_pressure": hourly.Variables(6).ValuesAsNumpy(),
            "wind_speed_10m": hourly.Variables(7).ValuesAsNumpy(),
    }
 
    pd.set_option("display.max_columns", None)
    pd.set_option("display.max_rows", None)
    pd.set_option("display.width", 1000)
 
    return pd.DataFrame(hourly_data)


def main():
    df = fetch_weather_data()
    # Ensure pandas doesn't truncate rows/columns when printing
    print(df)

if __name__ == "__main__":
    main()

I will get the whole dataset with no hangs, sample output

Code:
======== App is starting ============================
             date              temperature_2m  precipitation_probability  precipitation      rain  snowfall  pressure_msl  surface_pressure  wind_speed_10m
0  2026-08-31 00:00:00+00:00       74.417900                        6.0       0.000000  0.000000       0.0   1018.599976       1014.738464        2.702977
1  2026-08-31 01:00:00+00:00       71.897903                        2.0       0.000000  0.000000       0.0   1018.700012       1014.819946        3.906753
2  2026-08-31 02:00:00+00:00       72.257904                        2.0       0.000000  0.000000       0.0   1018.700012       1014.822632        4.606265
3  2026-08-31 03:00:00+00:00       71.087898                        2.0       0.000000  0.000000       0.0   1018.799988       1014.913513        3.325540
4  2026-08-31 04:00:00+00:00       70.727905                        3.0       0.000000  0.000000       0.0   1018.599976       1014.711731        1.500625
5  2026-08-31 05:00:00+00:00       70.277901                        1.0       0.000000  0.000000       0.0   1018.599976       1014.708618        0.500208

Might be something to look into - not sure if its a setting I am missing.

Did run one more test with simpleHttpclient and moded to read weather data so I test reading into buffer but that failed as well

C++:
// SPDX-FileCopyrightText: (c) 2024-2026 Shawn Silverman <shawn@pobox.com>
// SPDX-License-Identifier: AGPL-3.0-or-later

// SimpleHTTPClient implements a very rudimentary HTTP client. It
// makes an HTTP request once upon acquiring an IP address and then
// reads until connection-close. It also demonstrates use of a state
// machine. Note that the response is not parsed.

#include <QNEthernet.h>
#include <ArduinoJson.h>


using namespace qindesign::network;

// -------------------------------------------------------------------
//  Configuration
// -------------------------------------------------------------------

constexpr char kHost[]{"api.open-meteo.com"};
constexpr uint16_t kPort = 80;

// -------------------------------------------------------------------
//  Types
// -------------------------------------------------------------------

enum class States {
  kStart,
  kConnect,
  kSendRequest,
  kReadResponse,
  kEnd,
};

// -------------------------------------------------------------------
//  Program State
// -------------------------------------------------------------------

namespace {  // Internal linkage section

// Where we're at and what we're doing
States state = States::kStart;

// The network client
EthernetClient client;

// Program state
bool gotIP = false;  // Watch for when we get an IP
uint32_t responseStartTime = 0;
size_t responseSize = 0;

// Client read buffer
uint8_t readBuf[2 * 2048];

}  // namespace

JsonDocument doc;

// Helper to construct exact URL query
String buildQueryString(const char *basePath, JsonDocument &params) {
  String query = String(basePath);
  bool first = true;

  JsonObject obj = params.as<JsonObject>();
  for (JsonPair kv : obj) {
    query += first ? '?' : '&';
    first = false;

    query += kv.key().c_str();
    query += '=';

    if (kv.value().is<JsonArray>()) {
      bool firstElement = true;
      for (JsonVariant val : kv.value().as<JsonArray>()) {
        if (!firstElement) query += ',';
        query += val.as<String>();
        firstElement = false;
      }
    } else {
      query += kv.value().as<String>();
    }
  }
  return query;
}


// -------------------------------------------------------------------
//  Main Program
// -------------------------------------------------------------------

namespace {
// Forward declarations
bool connect();
void sendRequest();
bool readResponse();
}  // namespace

// Main program setup.
void setup() {
  Serial.begin(115200);
  while (!Serial && (millis() < 4000)) {
    // Wait for Serial
  }
  Serial.println("Starting...");

  // Watch for link changes
  Ethernet.onLinkState([](bool state) {
    if (state) {
      Serial.println("[Ethernet] Link ON");
    } else {
      Serial.println("[Ethernet] Link OFF");
    }
  });

  // Watch for address changes
  // It will take a little time to get an IP address, so watch for it
  Ethernet.onAddressChanged([]() {
    IPAddress ip = Ethernet.localIP();
    bool hasIP = (ip != INADDR_NONE);
    if (hasIP) {
      gotIP = true;
      Serial.printf("[Ethernet] Address changed: IP = %u.%u.%u.%u",
                    ip[0], ip[1], ip[2], ip[3]);
      Serial.println();
    } else {
      Serial.println("[Ethernet] Address changed: No IP");
    }
  });

  Serial.println();
  Serial.println("[Start]");
  Serial.println("Starting Ethernet with DHCP...");
  if (!Ethernet.begin()) {
    Serial.println("ERROR: Failed to start Ethernet");
    return;
  }
}

// Main program loop.
void loop() {
  switch (state) {
    case States::kStart:
      if (gotIP) {
        state = States::kConnect;
      }
      break;

    case States::kConnect:
      Serial.println();
      Serial.println("[Request]");
      if (connect()) {
        // For this demo, only send the request once
        state = States::kSendRequest;
      } else {
        state = States::kEnd;
      }
      break;

    case States::kSendRequest:
      sendRequest();

      Serial.println();
      Serial.println("[Response]");
      state = States::kReadResponse;

      // Initialize response state
      responseStartTime = micros();
      responseSize = 0;

      break;

    case States::kReadResponse:
      if (readResponse()) {
        state = States::kEnd;
      }
      break;

    case States::kEnd:
      break;
  }
}

// -------------------------------------------------------------------
//  Internal Functions
// -------------------------------------------------------------------

namespace {

// Attempts to connect to the host and returns whether successful.
bool connect() {
  Serial.printf("Connecting to %s:%" PRIu16 "...", kHost, kPort);
  Serial.println();

  // (This version waits; connectNoWait() does not wait, but would
  //  require another state)
  if (!client.connect(kHost, kPort)) {
    Serial.println("Could not connect to host");
    return false;
  }

  return true;
}

// Sends the HTTP request.
void sendRequest() {
  Serial.println("Sending request...");
 JsonDocument params;
  params["latitude"] = 40.7654;
  params["longitude"] = -73.8174;


  // Hourly parameters
  JsonArray hourly = params["hourly"].to<JsonArray>();
  hourly.add("temperature_2m");
  hourly.add("precipitation_probability");
  hourly.add("precipitation");
  hourly.add("rain");
  hourly.add("snowfall");
  hourly.add("pressure_msl");
  hourly.add("wind_speed_10m");

  params["timezone"] = "GMT-4";
  params["forecast_days"] = 1;
  params["wind_speed_unit"] = "mph";
  params["temperature_unit"] = "fahrenheit";
  params["precipitation_unit"] = "inch";

  String resource = buildQueryString("/v1/forecast", params);

  Serial.print("Built URL Path: ");
  Serial.println(resource.c_str());

    Serial.println("Connected to server. Sending request...");

    // Send HTTP GET with rigid carriage-return line-feeds
    client.print("GET ");
    client.print(resource.c_str());
    client.print(" HTTP/1.0\r\n");
    client.print("Host: api.open-meteo.com\r\n");
    client.print("User-Agent: Teensy-QNEthernet\r\n");
    client.print("Connection: close\r\n");
    client.print("\r\n");
}

// Reads the response and returns whether complete.
bool readResponse() {
  // Read what's available from the client and print it
  int avail = client.available();
  if (avail > 0) {
    int read = client.read(readBuf, sizeof(readBuf));
    if (read > 0) {
      responseSize += read;
      Serial.write(readBuf, read);
      Serial.flush();
    }
  }

  // Detect connection end and no data available
  if (!client.connected()) {
    uint32_t responseDuration = micros() - responseStartTime;
    Serial.println();
    Serial.printf("Response stats: %zu bytes in %g seconds",
                  responseSize, responseDuration / 1e6f);
    Serial.println();
    return true;
  }

  return false;
}

}  // namespace

but hangs at response
@mjs513 - I think you found something. It definitely hangs. So in "qnethernet_opts.h":
Code:
// 1 == Disable T41 native ethernet IF and enable T41 CYW4343W IF (Default).
// 0 == Enable T41 native ethernet IF and disable T41 CYW4343W IF.
#ifndef ARDUINO_TEENSY41_CYW4343W
#define ARDUINO_TEENSY41_CYW4343W 0 <----------- Switched  from 1 to 0 (this enable T4.1 native wired Ethernet).
#endif
and your test code worked without issue. So there is a problem somewhere to track down...
EDIT: So did @KurtE's sketch...
 
and your test code worked without issue. So there is a problem somewhere to track down...
EDIT: So did @KurtE's sketch...
Funny just made that change and it hung on starting DHCP. Not using the version with BLE in it though.

Code:
Starting...

[Start]
Starting Ethernet with DHCP...

Nothing else.

This is with the debug code - last sketch posted


Did you test with the teensy wired? or on wifi
 
Funny just made that change and it hung on starting DHCP. Not using the version with BLE in it though.

Code:
Starting...

[Start]
Starting Ethernet with DHCP...

Nothing else.

This is with the debug code - last sketch posted


Did you test with the teensy wired? or on wifi
Tested with both. Wired worked:
Code:
[Start]
Starting Ethernet with DHCP...
[Ethernet] Link ON
[Ethernet] Address changed: IP = 192.168.7.213

[Request]
Connecting to api.open-meteo.com:80...
Sending request...
Built URL Path: /v1/forecast?latitude=40.7654&longitude=-73.8174&hourly=temperature_2m,precipitation_probability,rain,snowfall,wind_speed_10m&timezone=GMT-4&forecast_days=1&wind_speed_unit=m
ph&temperature_unit=fahrenheit&precipitation_unit=inch
Connected to server. Sending request...

[Response]
HTTP/1.1 200 OK
Date: Mon, 31 Aug 2026 13:20:20 GMT
Content-Type: application/json; charset=utf-8
Connection: close

{"latitude":40.76123,"longitude":-73.82837,"generationtime_ms":0.08881092071533203,"utc_offset_seconds":-14400,"timezone":"GMT-0400","timezone_abbreviation":"GMT-4","elevation":33.0,"hourly_
units":{"time":"iso8601","temperature_2m":"°F","precipitation_probability":"%","rain":"inch","snowfall":"inch","wind_speed_10m":"mp/h"},"hourly":{"time":["2026-08-31T00:00","2026-08-31T01:00
","2026-08-31T02:00","2026-08-31T03:00","2026-08-31T04:00","2026-08-31T05:00","2026-08-31T06:00","2026-08-31T07:00","2026-08-31T08:00","2026-08-31T09:00","2026-08-31T10:00","2026-08-31T11:00
","2026-08-31T12:00","2026-08-31T13:00","2026-08-31T14:00","2026-08-31T15:00","2026-08-31T16:00","2026-08-31T17:00","2026-08-31T18:00","2026-08-31T19:00","2026-08-31T20:00","2026-08-31T21:00
","2026-08-31T22:00","2026-08-31T23:00"],"temperature_2m":[74.4,71.9,72.3,71.1,70.7,70.3,69.9,69.2,71.0,71.9,73.3,75.4,76.6,77.7,76.6,76.4,75.2,75.2,74.0,72.4,71.4,70.3,70.0,69.7],"precipita
tion_probability":[6,2,2,2,3,1,1,1,1,1,1,1,4,4,5,5,4,7,10,11,9,9,11,18],"rain":[0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.
000,0.000,0.000,0.000,0.000,0.016],"snowfall":[0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000
],"wind_speed_10m":[2.7,3.9,4.6,3.3,1.5,0.5,3.8,2.6,5.1,5.0,4.7,2.4,1.1,1.8,6.6,5.9,4.9,3.9,4.2,2.8,3.2,4.5,3.5,4.5]}}
Response stats: 1571 bytes in 0.353156 seconds
WIFI:
Code:
Starting...

[Start]
Starting Ethernet with DHCP...
Setting link up
[Ethernet] Link ON
[Ethernet] Address changed: IP = 192.168.7.235

[Request]
Connecting to api.open-meteo.com:80...
Sending request...
Built URL Path: /v1/forecast?latitude=40.7654&longitude=-73.8174&hourly=temperature_2m,precipitation_probability,rain,snowfall,wind_speed_10m&timezone=GMT-4&forecast_days=1&wind_speed_unit=m
ph&temperature_unit=fahrenheit&precipitation_unit=inch
Connected to server. Sending request...

[Response]
Don't know yet. Just for the heck of it, I am going to try using switching to my other router...
 
@mjs513 - It seems the sketch is not getting a response here:
Code:
// Reads the response and returns whether complete.
bool readResponse() {
  // Read what's available from the client and print it
  int avail = client.available();
  if (avail > 0) {
printf("Is Available...\n");
    int read = client.read(readBuf, sizeof(readBuf));
    if (read > 0) {
      responseSize += read;
      Serial.write(readBuf, read);
      Serial.flush();
    }
  }
Line #245 is where it is hanging. That means I need to start working backwards through QNEthernet to the WIFI driver :unsure:
 
@wwatson

@KurtE and I were doing more testing and looks like there may be a 1500 byte transfer limit. So did a grepwin of the lib and in
driver_teensy41,spp found

Code:
// Sizes
static constexpr size_t kRxSize = 5;
static constexpr size_t kTxSize = 5;

// Buffer size for transferring to and from the Ethernet MAC. The frame size is
// either 1518 or 1522, assuming a 1500-byte payload, depending on whether VLAN
// support is desired. VLAN support requires an extra 4 bytes. The ARM cache
// management functions require 32-bit alignment, but the ENETx_MRBR max.
// receive buffer size register says that the RX buffer size must be a multiple
// of 64 and >= 256.
//
// [1518 or 1522 made into a multiple of 32 for ARM cache flush sizing and a
// multiple of 64 for ENETx_MRBR.]
// NOTE: kBufSize will be 1536 whether we use 1518 or 1522 (plus ETH_PAD_SIZE)
// * Padding(2)
// * Destination(6) + Source(6) + VLAN tag(2) + VLAN info(2) + Length/Type(2) +
//   Payload(1500) + FCS(4)
static constexpr size_t kBufSize =
    (((ETH_PAD_SIZE + 6 + 6 + 2 + 2 + 2 + 1500 + 4) + 63) & ~63);

// static constexpr int kIRQPriority = 64

// Size checks
static_assert((kRxSize >= 1) && (kRxSize >= 1), "Rx and Tx sizes must be >= 1");

#if !QNETHERNET_BUFFERS_IN_RAM1
ATTRIBUTE_NODISCARD ATTRIBUTE_ALWAYS_INLINE
static inline uint32_t multipleOf32(uint32_t x) {
  return (x + 31u) & ~31u;
}

#define BUFFER_DMAMEM DMAMEM
#else
#define BUFFER_DMAMEM
#endif  // !QNETHERNET_BUFFERS_IN_RAM1

and in cyw43_t4_sdio.cpp

Code:
#if WIFI_DEVICE == CYW43439
    memcpy(chunk_buf->data, clm_data_9 + cumulative_len, chunk_buf->len);
#else
    memcpy(chunk_buf->data, clm_data_4343W + cumulative_len, chunk_buf->len);
#endif
    ret = ioctl_set_data("clmload", 1500, chunk_buf, sizeof(brcmf_dload_data_le) + chunk_buf->len - 1, false);
    cumulative_len += chunk_buf->len;
    datalen -= chunk_buf->len;
  } while((datalen > 0) && (ret == 1));
#if INIT_DEBUG_MODE == true
  #if WIFI_DEVICE == CYW43439
    printf(SER_CYAN "CLM uploaded %ld/%d result: %ld\n" SER_RESET, cumulative_len, FIRMWARE_CLM_LEN_9, ret);
#else
    printf(SER_CYAN "CLM uploaded %ld/%d result: %ld\n" SER_RESET, cumulative_len, FIRMWARE_CLM_LEN_W, ret);
#endif
#endif

Could be a place to start - still digging
 
I couple of Thoughts: With asking for New York -> They convert this to New+York on their command line:
Just asking for one City: it returns (on PC) 1489 characters:
Code:
{
  "results": [
    {
      "id": 5128581,
      "name": "New York",
      "latitude": 40.71427,
      "longitude": -74.00597,
      "elevation": 10,
      "feature_code": "PPL",
      "country_code": "US",
      "admin1_id": 5128638,
      "timezone": "America/New_York",
      "population": 8804190,
      "postcodes": [
        "10001",
        "10002",
        "10003",
        "10004",
        "10005",
        "10006",
        "10007",
        "10008",
        "10009",
        "10010",
        "10011",
        "10012",
        "10013",
        "10014",
        "10016",
        "10017",
        "10018",
        "10019",
        "10020",
        "10021",
        "10022",
        "10023",
        "10024",
        "10025",
        "10026",
        "10027",
        "10028",
        "10029",
        "10030",
        "10031",
        "10032",
        "10033",
        "10034",
        "10035",
        "10036",
        "10037",
        "10038",
        "10039",
        "10040",
        "10041",
        "10043",
        "10044",
        "10045",
        "10055",
        "10060",
        "10065",
        "10069",
        "10080",
        "10081",
        "10087",
        "10090",
        "10101",
        "10102",
        "10103",
        "10104",
        "10105",
        "10106",
        "10107",
        "10108",
        "10109",
        "10110",
        "10111",
        "10112",
        "10113",
        "10114",
        "10115",
        "10116",
        "10117",
        "10118",
        "10119",
        "10120",
        "10121",
        "10122",
        "10123",
        "10124",
        "10125",
        "10126",
        "10128",
        "10129",
        "10130",
        "10131",
        "10132",
        "10133",
        "10138",
        "10150",
        "10151",
        "10152",
        "10153",
        "10154",
        "10155",
        "10156",
        "10157",
        "10158",
        "10159",
        "10160",
        "10161",
        "10162",
        "10163",
        "10164",
        "10165",
        "10166",
        "10167",
        "10168",
        "10169",
        "10170",
        "10171",
        "10172",
        "10173",
        "10174",
        "10175",
        "10176",
        "10177",
        "10178",
        "10179",
        "10185",
        "10199",
        "10203",
        "10211",
        "10212",
        "10213",
        "10242",
        "10249",
        "10256",
        "10258",
        "10259",
        "10260",
        "10261",
        "10265",
        "10268",
        "10269",
        "10270",
        "10271",
        "10272",
        "10273",
        "10274",
        "10275",
        "10276",
        "10277",
        "10278",
        "10279",
        "10280",
        "10281",
        "10282",
        "10285",
        "10286"
      ],
      "country_id": 6252001,
      "country": "United States",
      "admin1": "New York"
    }
  ],
  "generationtime_ms": 0.8940697
}
Plus the stuff at the start...
 
Ok dug some more looks like the only change that need to be made is in

C++:
// driver_CYW4343W.h

#pragma once

#define MTU           2000
#define MAX_FRAME_LEN 2018  /* Does not include the 4-byte FCS (frame check sequence) */

#define ETH_PAD_SIZE 0  /* 2 */
#define EVENT_POLL_USEC    100000 //100000

#define LINK_UP 1
#define LINK_DOWN 0

And now its working
 
Ok dug some more looks like the only change that need to be made is in

C++:
// driver_CYW4343W.h

#pragma once

#define MTU           2000
#define MAX_FRAME_LEN 2018  /* Does not include the 4-byte FCS (frame check sequence) */

#define ETH_PAD_SIZE 0  /* 2 */
#define EVENT_POLL_USEC    100000 //100000

#define LINK_UP 1
#define LINK_DOWN 0

And now its working
You guys are 😊
 
@wwatson - you did all the hard work - not sure you want to change it in the lib or make a note somewhere about it

EDIT: Cutting it close so will probably increase even more
Response]



Code:
HTTP/1.1 200 OK
Date: Mon, 31 Aug 2026 14:20:12 GMT
Content-Type: application/json; charset=utf-8
Connection: close
{"latitude":40.76123,"longitude":-73.82837,"generationtime_ms":0.08952617645263672,"utc_offset_seconds":-14400,"timezone":"GMT-0400","timezone_abbreviation":"GMT-4","elevation":33.0,"hourly_units":{"time":"iso8601","temperature_2m":"°F","precipitation_probability":"%","precipitation":"inch","rain":"inch","snowfall":"inch","pressure_msl":"hPa","wind_speed_10m":"mp/h"},"hourly":{"time":["2026-08-31T00:00","2026-08-31T01:00","2026-08-31T02:00","2026-08-31T03:00","2026-08-31T04:00","2026-08-31T05:00","2026-08-31T06:00","2026-08-31T07:00","2026-08-31T08:00","2026-08-31T09:00","2026-08-31T10:00","2026-08-31T11:00","2026-08-31T12:00","2026-08-31T13:00","2026-08-31T14:00","2026-08-31T15:00","2026-08-31T16:00","2026-08-31T17:00","2026-08-31T18:00","2026-08-31T19:00","2026-08-31T20:00","2026-08-31T21:00","2026-08-31T22:00","2026-08-31T23:00"],"temperature_2m":[74.4,71.9,72.3,71.1,70.7,70.3,69.9,69.2,70.7,71.1,72.5,74.8,76.3,77.9,78.6,76.7,75.5,73.5,72.8,72.0,70.5,69.5,69.7,69.6],"precipitation_probability":[6,2,2,2,3,1,1,1,1,1,1,1,2,3,4,4,4,13,25,13,8,8,9,19],"precipitation":[0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000],"rain":[0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000],"snowfall":[0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000],"pressure_msl":[1018.6,1018.7,1018.7,1018.8,1018.6,1018.6,1019.0,1019.6,1020.1,1019.9,1019.5,1019.7,1019.8,1019.8,1019.1,1018.7,1019.0,1019.1,1019.1,1018.8,1018.8,1018.4,1018.1,1018.2],"wind_speed_10m":[2.7,3.9,4.6,3.3,1.5,0.5,3.8,2.6,4.5,5.3,5.4,4.5,3.3,1.3,2.7,8.0,6.5,6.1,5.3,5.1,4.4,4.3,4.3,4.2]}}
Response stats: 1962 bytes in 0.217001 seconds


EDIT:
Think I am going to leave at these settings

C++:
#define MTU           4000
#define MAX_FRAME_LEN 4018  /* Does not include the 4-byte FCS (frame check sequence) */
 
Last edited:
@mjs513 I modified "Our" Sketch to output all of those fields, I also changed the code that if you enter a new
city, it converts spaces to +s and now if I run it:
Note the Hourly output format maybe needs to be fine tuned, but:

Code:
Waiting for local IP...
Setting link up
Local IP: 192.168.2.52

[0/3] Map City to Location...
Name Query:/v1/search?name=Disneyland&count=1

====================== Map City ======================
Name:                Disneyland
latitude:            33.812073
longitude:           -117.918980
Time Zone:           America/Los_Angeles

[1/3] Requesting Current Weather...

====================== CURRENT WEATHER ======================
Time:                2026-08-31T08:30
Condition:           Mainly clear (Code 1)
Temperature:         74.8 °F
Pressure (MSL):      1012.8 hPa
Wind Speed:          3.6 mph
Wind Direction:      158°
Rain:                0.00 in
Snowfall:            0.00 in

[2/3] Requesting Hourly Forecast...

========================================== HOURLY FORECAST ==========================================
   Time       Temp     PoP%    Precipitation     Rain          Snow       Pressure     Wind
-----------------------------------------------------------------------------------------------------
   00:00     74.0 °F    0%        0.00 in       0.00 in       0.00 in      1011.8     2.6 mph
   01:00     74.2 °F    0%        0.00 in       0.00 in       0.00 in      1012.0     4.7 mph
   02:00     73.1 °F    0%        0.00 in       0.00 in       0.00 in      1011.8     3.0 mph
   03:00     71.1 °F    0%        0.00 in       0.00 in       0.00 in      1011.9     0.7 mph
   04:00     71.6 °F    0%        0.00 in       0.00 in       0.00 in      1011.9     1.3 mph
   05:00     71.5 °F    0%        0.00 in       0.00 in       0.00 in      1011.7     2.1 mph
   06:00     71.2 °F    0%        0.00 in       0.00 in       0.00 in      1011.8     1.6 mph
   07:00     71.4 °F    0%        0.00 in       0.00 in       0.00 in      1012.2     1.7 mph
   08:00     73.3 °F    0%        0.00 in       0.00 in       0.00 in      1013.2     2.6 mph
   09:00     75.6 °F    0%        0.00 in       0.00 in       0.00 in      1012.4     4.0 mph
   10:00     78.7 °F    0%        0.00 in       0.00 in       0.00 in      1013.2     4.8 mph
   11:00     80.6 °F    0%        0.00 in       0.00 in       0.00 in      1012.8     7.3 mph
   12:00     82.2 °F    0%        0.00 in       0.00 in       0.00 in      1012.9     7.9 mph
   13:00     83.7 °F    0%        0.00 in       0.00 in       0.00 in      1013.1     8.5 mph
   14:00     83.9 °F    0%        0.00 in       0.00 in       0.00 in      1012.4     9.4 mph
   15:00     83.2 °F    0%        0.00 in       0.00 in       0.00 in      1012.1     9.4 mph
   16:00     81.7 °F    0%        0.00 in       0.00 in       0.00 in      1011.6     9.1 mph
   17:00     80.0 °F    0%        0.00 in       0.00 in       0.00 in      1011.1     8.6 mph
   18:00     77.7 °F    0%        0.00 in       0.00 in       0.00 in      1011.3     8.5 mph
   19:00     75.6 °F    0%        0.00 in       0.00 in       0.00 in      1011.3     6.7 mph
   20:00     73.7 °F    0%        0.00 in       0.00 in       0.00 in      1012.0     5.1 mph
   21:00     70.9 °F    0%        0.00 in       0.00 in       0.00 in      1012.6     5.2 mph
   22:00     69.4 °F    0%        0.00 in       0.00 in       0.00 in      1013.2     4.2 mph
   23:00     68.7 °F    0%        0.00 in       0.00 in       0.00 in      1013.9     3.3 mph

[3/3] Requesting Daily Forecast...

=========================================== DAILY FORECAST ==========================================
   Date       Max/Min Temp    PoP%   Precip    Rain    Snow    MaxWind   Gusts   Condition
-----------------------------------------------------------------------------------------------------
   08-31     83.9 / 71.1 °F    0%   0.00 in  0.00 in  0.00 in  9.4 mph 11.2 mph  Overcast
   09-01     79.9 / 67.1 °F    0%   0.00 in  0.00 in  0.00 in  9.8 mph 12.1 mph  Overcast
   09-02     83.1 / 62.0 °F    0%   0.00 in  0.00 in  0.00 in 11.1 mph  9.4 mph  Clear sky
   09-03     81.3 / 70.5 °F    0%   0.00 in  0.00 in  0.00 in 12.9 mph 11.9 mph  Clear sky
   09-04     80.0 / 69.7 °F    5%   0.00 in  0.00 in  0.00 in 13.1 mph 13.2 mph  Clear sky
   09-05     83.4 / 71.0 °F   21%   0.00 in  0.00 in  0.00 in  9.4 mph  8.3 mph  Overcast
   09-06     77.8 / 72.3 °F   33%   0.87 in  0.86 in  0.00 in 10.8 mph 21.0 mph  Moderate rain
================================================================================---------------------

All data successfully fetched!
Enter City name:
New City: New+York

[0/3] Map City to Location...
Name Query:/v1/search?name=New+York&count=1

====================== Map City ======================
Name:                New York
latitude:            40.714272
longitude:           -74.005966
Time Zone:           America/New_York

[1/3] Requesting Current Weather...

====================== CURRENT WEATHER ======================
Time:                2026-08-31T11:30
Condition:           Partly cloudy (Code 2)
Temperature:         74.0 °F
Pressure (MSL):      1019.6 hPa
Wind Speed:          1.2 mph
Wind Direction:      112°
Rain:                0.00 in
Snowfall:            0.00 in

[2/3] Requesting Hourly Forecast...

========================================== HOURLY FORECAST ==========================================
   Time       Temp     PoP%    Precipitation     Rain          Snow       Pressure     Wind
-----------------------------------------------------------------------------------------------------
   00:00     72.7 °F    5%        0.00 in       0.00 in       0.00 in      1018.7     5.3 mph
   01:00     72.2 °F    2%        0.00 in       0.00 in       0.00 in      1018.9     3.3 mph
   02:00     72.2 °F    2%        0.00 in       0.00 in       0.00 in      1018.9     6.4 mph
   03:00     70.5 °F    2%        0.00 in       0.00 in       0.00 in      1018.8     2.3 mph
   04:00     70.1 °F    3%        0.00 in       0.00 in       0.00 in      1018.7     3.5 mph
   05:00     69.4 °F    1%        0.00 in       0.00 in       0.00 in      1018.7     3.0 mph
   06:00     69.0 °F    1%        0.00 in       0.00 in       0.00 in      1019.1     4.3 mph
   07:00     69.3 °F    1%        0.00 in       0.00 in       0.00 in      1019.6     3.6 mph
   08:00     69.9 °F    1%        0.00 in       0.00 in       0.00 in      1020.1     4.0 mph
   09:00     71.2 °F    1%        0.00 in       0.00 in       0.00 in      1020.1     5.1 mph
   10:00     72.7 °F    1%        0.00 in       0.00 in       0.00 in      1020.0     4.5 mph
   11:00     74.0 °F    2%        0.00 in       0.00 in       0.00 in      1019.8     1.9 mph
   12:00     75.4 °F    3%        0.00 in       0.00 in       0.00 in      1019.4     1.6 mph
   13:00     76.7 °F    4%        0.00 in       0.00 in       0.00 in      1019.6     3.6 mph
   14:00     77.2 °F    8%        0.00 in       0.00 in       0.00 in      1019.4     5.0 mph
   15:00     75.5 °F    9%        0.00 in       0.00 in       0.00 in      1019.1     7.3 mph
   16:00     75.2 °F    6%        0.00 in       0.00 in       0.00 in      1018.9     7.3 mph
   17:00     74.6 °F    8%        0.00 in       0.00 in       0.00 in      1018.6     6.3 mph
   18:00     73.7 °F   10%        0.00 in       0.00 in       0.00 in      1018.3     5.1 mph
   19:00     71.6 °F   11%        0.00 in       0.00 in       0.00 in      1018.1     5.6 mph
   20:00     70.5 °F    8%        0.00 in       0.00 in       0.00 in      1018.0     4.9 mph
   21:00     70.1 °F    9%        0.00 in       0.00 in       0.00 in      1018.1     4.6 mph
   22:00     69.8 °F   13%        0.00 in       0.00 in       0.00 in      1017.7     4.3 mph
   23:00     70.1 °F   20%        0.00 in       0.00 in       0.00 in      1017.2     3.9 mph

[3/3] Requesting Daily Forecast...

=========================================== DAILY FORECAST ==========================================
   Date       Max/Min Temp    PoP%   Precip    Rain    Snow    MaxWind   Gusts   Condition
-----------------------------------------------------------------------------------------------------
   08-31     77.2 / 69.0 °F   20%   0.00 in  0.00 in  0.00 in  7.3 mph 13.0 mph  Overcast
   09-01     81.0 / 68.1 °F   54%   1.60 in  1.60 in  0.00 in 13.5 mph 30.4 mph  Heavy rain
   09-02     75.9 / 66.8 °F   54%   0.04 in  0.01 in  0.00 in 12.4 mph 20.6 mph  Light drizzle
   09-03     85.6 / 72.9 °F   45%   0.14 in  0.00 in  0.00 in 12.4 mph 22.6 mph  Slight rain showers
   09-04     87.3 / 74.1 °F   44%   0.29 in  0.00 in  0.00 in 14.4 mph 20.8 mph  Slight rain showers
   09-05     80.8 / 68.0 °F   14%   0.00 in  0.00 in  0.00 in 18.4 mph 23.7 mph  Overcast
   09-06     75.6 / 63.1 °F   14%   0.00 in  0.00 in  0.00 in 12.7 mph 18.1 mph  Partly cloudy
================================================================================---------------------

All data successfully fetched!
Enter City name:
 

Attachments

  • T41_wifi_weather_v3_plus-260831a.zip
    4 KB · Views: 15
Cool. And you can look up by ZIP code too:
Code:
Enter City name:
New City: 59111

[0/3] Map City to Location...
Name Query:/v1/search?name=59111&count=1

====================== Map City ======================
Name:                Billings Metropolitan Area
latitude:            45.783290
longitude:           -108.500690
Time Zone:           America/Denver

[1/3] Requesting Current Weather...

====================== CURRENT WEATHER ======================
Time:                2026-08-31T10:15
Condition:           Clear sky (Code 0)
Temperature:         70.0 °F
Pressure (MSL):      1013.3 hPa
Wind Speed:          7.6 mph
Wind Direction:      265°
Rain:                0.00 in
Snowfall:            0.00 in

[2/3] Requesting Hourly Forecast...

========================================== HOURLY FORECAST ==========================================
   Time       Temp     PoP%    Precipitation     Rain          Snow       Pressure     Wind
-----------------------------------------------------------------------------------------------------
   00:00     60.9 °F    0%        0.00 in       0.00 in       0.00 in      1010.4     4.3 mph
   01:00     57.4 °F    0%        0.00 in       0.00 in       0.00 in      1010.8     4.2 mph
   02:00     54.7 °F    0%        0.00 in       0.00 in       0.00 in      1011.0     2.7 mph
   03:00     52.5 °F    0%        0.00 in       0.00 in       0.00 in      1011.9     5.1 mph
   04:00     51.5 °F    0%        0.00 in       0.00 in       0.00 in      1012.1     3.9 mph
   05:00     49.9 °F    0%        0.00 in       0.00 in       0.00 in      1012.4     2.7 mph
   06:00     49.4 °F    0%        0.00 in       0.00 in       0.00 in      1012.2     5.1 mph
   07:00     49.1 °F    0%        0.00 in       0.00 in       0.00 in      1012.7     4.7 mph
   08:00     53.6 °F    0%        0.00 in       0.00 in       0.00 in      1013.9     4.7 mph
   09:00     61.2 °F    0%        0.00 in       0.00 in       0.00 in      1014.0     8.8 mph
   10:00     67.6 °F    0%        0.00 in       0.00 in       0.00 in      1013.3     7.7 mph
   11:00     73.6 °F    0%        0.00 in       0.00 in       0.00 in      1013.6     8.2 mph
   12:00     76.8 °F    0%        0.00 in       0.00 in       0.00 in      1013.7     8.3 mph
   13:00     79.5 °F    0%        0.00 in       0.00 in       0.00 in      1013.3     8.6 mph
   14:00     81.4 °F    0%        0.00 in       0.00 in       0.00 in      1012.3     5.7 mph
   15:00     83.0 °F    0%        0.00 in       0.00 in       0.00 in      1011.4     1.8 mph
   16:00     84.7 °F    0%        0.00 in       0.00 in       0.00 in      1010.8     1.1 mph
   17:00     84.9 °F    0%        0.00 in       0.00 in       0.00 in      1009.9     6.8 mph
   18:00     84.6 °F    0%        0.00 in       0.00 in       0.00 in      1009.6     3.2 mph
   19:00     82.2 °F    0%        0.00 in       0.00 in       0.00 in      1008.8     6.9 mph
   20:00     75.6 °F    0%        0.00 in       0.00 in       0.00 in      1009.5     5.5 mph
   21:00     71.4 °F    0%        0.00 in       0.00 in       0.00 in      1009.8     4.3 mph
   22:00     69.2 °F    0%        0.00 in       0.00 in       0.00 in      1009.6     2.2 mph
   23:00     68.3 °F    0%        0.00 in       0.00 in       0.00 in      1009.7     5.1 mph

[3/3] Requesting Daily Forecast...

=========================================== DAILY FORECAST ==========================================
   Date       Max/Min Temp    PoP%   Precip    Rain    Snow    MaxWind   Gusts   Condition
-----------------------------------------------------------------------------------------------------
   08-31     84.9 / 49.1 °F    0%   0.00 in  0.00 in  0.00 in  8.8 mph 18.1 mph  Clear sky
   09-01     86.7 / 55.1 °F    3%   0.00 in  0.00 in  0.00 in 10.8 mph 15.4 mph  Overcast
   09-02     93.2 / 61.7 °F    9%   0.00 in  0.00 in  0.00 in 21.7 mph 32.9 mph  Overcast
   09-03     89.1 / 57.9 °F    9%   0.00 in  0.00 in  0.00 in 19.5 mph 33.3 mph  Overcast
   09-04     89.1 / 55.8 °F    5%   0.00 in  0.00 in  0.00 in 13.9 mph 27.7 mph  Overcast
   09-05     89.0 / 59.1 °F    9%   0.00 in  0.00 in  0.00 in  9.1 mph 19.0 mph  Partly cloudy
   09-06     90.5 / 62.3 °F   25%   0.00 in  0.00 in  0.00 in 11.5 mph 15.7 mph  Overcast
================================================================================---------------------
 
Back at home now. That change to the MTU setting fixed the issue here as well as another two I had not got into yet.
"SimpleIPerfServer.ino" before MTU change:
Code:
------------------------------------------------------------
Client connecting to 192.168.7.235, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  1] local 192.168.4.20 port 50056 connected with 192.168.7.235 port 5001
[ ID] Interval       Transfer     Bandwidth
[  1] 0.0000-1.0000 sec  64.2 KBytes   526 Kbits/sec
[  1] 1.0000-2.0000 sec  0.000 Bytes  0.000 bits/sec
[  1] 2.0000-3.0000 sec  0.000 Bytes  0.000 bits/sec
[  1] 3.0000-4.0000 sec  0.000 Bytes  0.000 bits/sec
[  1] 4.0000-5.0000 sec  0.000 Bytes  0.000 bits/sec
[  1] 5.0000-6.0000 sec  0.000 Bytes  0.000 bits/sec
[  1] 6.0000-7.0000 sec  0.000 Bytes  0.000 bits/sec
[  1] 7.0000-8.0000 sec  0.000 Bytes  0.000 bits/sec
[  1] 8.0000-9.0000 sec  0.000 Bytes  0.000 bits/sec
[  1] 9.0000-10.0000 sec  0.000 Bytes  0.000 bits/sec
[  1] 0.0000-20.4319 sec  64.2 KBytes  25.7 Kbits/sec
After MTU change:
Code:
------------------------------------------------------------
[  1] local 192.168.4.20 port 58464 connected with 192.168.7.235 port 5001
[ ID] Interval       Transfer     Bandwidth
[  1] 0.0000-1.0000 sec  2.44 MBytes  20.5 Mbits/sec
[  1] 1.0000-2.0000 sec  2.16 MBytes  18.1 Mbits/sec
[  1] 2.0000-3.0000 sec  2.53 MBytes  21.3 Mbits/sec
[  1] 3.0000-4.0000 sec  2.61 MBytes  21.9 Mbits/sec
[  1] 4.0000-5.0000 sec  2.50 MBytes  21.0 Mbits/sec
[  1] 5.0000-6.0000 sec  2.65 MBytes  22.2 Mbits/sec
[  1] 6.0000-7.0000 sec  2.52 MBytes  21.1 Mbits/sec
[  1] 7.0000-8.0000 sec  2.51 MBytes  21.1 Mbits/sec
[  1] 8.0000-9.0000 sec  2.42 MBytes  20.3 Mbits/sec
[  1] 9.0000-10.0000 sec  2.62 MBytes  22.0 Mbits/sec
[  1] 0.0000-10.1137 sec  25.0 MBytes  20.7 Mbits/sec
With the second sketch "IPerfServer.ino" and MTU 4000 I get:
Code:
Client connecting to 192.168.7.235, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  1] local 192.168.4.20 port 60270 connected with 192.168.7.235 port 5001
[ ID] Interval       Transfer     Bandwidth
[  1] 0.0000-1.0000 sec  1.96 MBytes  16.5 Mbits/sec
[  1] 1.0000-2.0000 sec  2.73 MBytes  22.9 Mbits/sec
[  1] 2.0000-3.0000 sec  2.60 MBytes  21.8 Mbits/sec
[  1] 3.0000-4.0000 sec  1.48 MBytes  12.4 Mbits/sec
[  1] 4.0000-5.0000 sec  0.000 Bytes  0.000 bits/sec
[  1] 5.0000-6.0000 sec  0.000 Bytes  0.000 bits/sec
[  1] 6.0000-7.0000 sec  0.000 Bytes  0.000 bits/sec
[  1] 7.0000-8.0000 sec  0.000 Bytes  0.000 bits/sec
[  1] 8.0000-9.0000 sec  0.000 Bytes  0.000 bits/sec
[  1] 9.0000-10.0000 sec  0.000 Bytes  0.000 bits/sec
[  1] 0.0000-17.4165 sec  8.76 MBytes  4.22 Mbits/sec
I had to change the MTU settings to:
Code:
// driver_CYW4343W.h

#pragma once

#define MTU           5018
#define MAX_FRAME_LEN 5018  /* Does not include the 4-byte FCS (frame check sequence) */

#define ETH_PAD_SIZE 0  /* 2 */
#define EVENT_POLL_USEC    100000 //100000

#define LINK_UP 1
#define LINK_DOWN 0
To get this:
Code:
------------------------------------------------------------
Client connecting to 192.168.7.235, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  1] local 192.168.4.20 port 60178 connected with 192.168.7.235 port 5001
[ ID] Interval       Transfer     Bandwidth
[  1] 0.0000-1.0000 sec  2.75 MBytes  23.0 Mbits/sec
[  1] 1.0000-2.0000 sec  2.81 MBytes  23.5 Mbits/sec
[  1] 2.0000-3.0000 sec  2.93 MBytes  24.6 Mbits/sec
[  1] 3.0000-4.0000 sec  2.83 MBytes  23.8 Mbits/sec
[  1] 4.0000-5.0000 sec  2.88 MBytes  24.2 Mbits/sec
[  1] 5.0000-6.0000 sec  3.01 MBytes  25.2 Mbits/sec
[  1] 6.0000-7.0000 sec  2.97 MBytes  24.9 Mbits/sec
[  1] 7.0000-8.0000 sec  2.42 MBytes  20.3 Mbits/sec
[  1] 8.0000-9.0000 sec  2.84 MBytes  23.8 Mbits/sec
[  1] 9.0000-10.0000 sec  2.67 MBytes  22.4 Mbits/sec
[  1] 0.0000-10.1236 sec  28.1 MBytes  23.3 Mbits/sec
I am not that familiar with the MTU settings but I assume it has something to do with the unit size of a buffer. Any thanks for the find and fix :D
 
Hi All -

Wow, great work/hacking this weekend here! Great news on the Bluetooth driver - thanks @wwatson and everyone else who got this working and validating the hardware!

The last check we (SparkFun) need to do to before our production run is the BLE Audio capabilities of the board. This is something I'll focus on this week, at least to get the a test up and running.

Once the hardware is verified, we'll get a production run scheduled for final boards. Note: We will send final board to everyone who got a prototype board!

Thanks!
-Kirk
 
These numbers look kind of strange - max MTU for wifi is usually around 2300 and according to the CYW4343W datasheet the maximum SDIO packet size is only 2048 bytes...
 
These numbers look kind of strange - max MTU for wifi is usually around 2300 and according to the CYW4343W datasheet the maximum SDIO packet size is only 2048 bytes...
I think it has to do with the way data is buffered in the CYW4343x driver. You can actually raise the MTU size but you take a hit on through put as you raise the MTU size. The buffering has not been addressed yet in the driver...
 
In the "iPerfServer.ino" sketch @shawn mentioned this:
Code:
// [/// Under Repair ///]
// NOTE: This example doesn't currently behave well.
//       I could use some help fixing it; my gumption for this is low.
// [/// Under Repair ///]
//
Which explains the erratic behavior of that sketch. Sometimes it will give erratic results...

EDIT: For know I will keep the MTU at 4018.
EDIT 2: I think I need to go through all of the examples again to make sure there is no side effects.
That has bit me before :)
 
Ok, could not leave it alone. In "event.h" I set:
Code:
#define TXDATA_LEN       2048//1600 <------ as per SDIO specs
#define RXDATA_LEN       2048//1600 <------- as per SDIO specs
In "driver_CYW4343W.h" I set:
Code:
#define MTU           2318
#define MAX_FRAME_LEN 2318  /* Does not include the 4-byte FCS (frame check sequence) */
Everything seems to be working BUT, here is the output from the SimpleIPerfServer sketch:
Code:
------------------------------------------------------------
Client connecting to 192.168.7.235, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  1] local 192.168.4.20 port 54434 connected with 192.168.7.235 port 5001
[ ID] Interval       Transfer     Bandwidth
[  1] 0.0000-1.0000 sec  1.17 MBytes  9.84 Mbits/sec
[  1] 1.0000-2.0000 sec  1.72 MBytes  14.4 Mbits/sec
[  1] 2.0000-3.0000 sec  1.66 MBytes  13.9 Mbits/sec
[  1] 3.0000-4.0000 sec  1.66 MBytes  13.9 Mbits/sec
[  1] 4.0000-5.0000 sec  1.67 MBytes  14.0 Mbits/sec
[  1] 5.0000-6.0000 sec  1.65 MBytes  13.8 Mbits/sec
[  1] 6.0000-7.0000 sec  1.54 MBytes  12.9 Mbits/sec
[  1] 7.0000-8.0000 sec  1.73 MBytes  14.5 Mbits/sec
[  1] 8.0000-9.0000 sec  1.72 MBytes  14.4 Mbits/sec
[  1] 9.0000-10.0000 sec  1.62 MBytes  13.6 Mbits/sec
[  1] 0.0000-10.0421 sec  16.1 MBytes  13.5 Mbits/sec
Perfomance is worse than before with the larger MTU 5018:
Code:
Client connecting to 192.168.7.235, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  1] local 192.168.4.20 port 52404 connected with 192.168.7.235 port 5001
[ ID] Interval       Transfer     Bandwidth
[  1] 0.0000-1.0000 sec  2.21 MBytes  18.6 Mbits/sec
[  1] 1.0000-2.0000 sec  3.02 MBytes  25.4 Mbits/sec
[  1] 2.0000-3.0000 sec  2.82 MBytes  23.6 Mbits/sec
[  1] 3.0000-4.0000 sec  2.54 MBytes  21.3 Mbits/sec
[  1] 4.0000-5.0000 sec  2.86 MBytes  24.0 Mbits/sec
[  1] 5.0000-6.0000 sec  2.98 MBytes  25.0 Mbits/sec
[  1] 6.0000-7.0000 sec  2.86 MBytes  24.0 Mbits/sec
[  1] 7.0000-8.0000 sec  2.97 MBytes  24.9 Mbits/sec
[  1] 8.0000-9.0000 sec  2.98 MBytes  25.0 Mbits/sec
[  1] 9.0000-10.0000 sec  2.84 MBytes  23.8 Mbits/sec
Specs are confusing me :confused:
EDIT: Wired Ethernet results with MTU 1500:
Code:
------------------------------------------------------------
Client connecting to 192.168.7.213, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  1] local 192.168.4.20 port 33400 connected with 192.168.7.213 port 5001
[ ID] Interval       Transfer     Bandwidth
[  1] 0.0000-1.0000 sec  4.23 MBytes  35.4 Mbits/sec
[  1] 1.0000-2.0000 sec  4.13 MBytes  34.6 Mbits/sec
[  1] 2.0000-3.0000 sec  4.12 MBytes  34.6 Mbits/sec
[  1] 3.0000-4.0000 sec  4.09 MBytes  34.3 Mbits/sec
[  1] 4.0000-5.0000 sec  4.07 MBytes  34.1 Mbits/sec
[  1] 5.0000-6.0000 sec  4.14 MBytes  34.7 Mbits/sec
[  1] 6.0000-7.0000 sec  4.14 MBytes  34.7 Mbits/sec
[  1] 7.0000-8.0000 sec  4.11 MBytes  34.5 Mbits/sec
[  1] 8.0000-9.0000 sec  4.07 MBytes  34.2 Mbits/sec
[  1] 9.0000-10.0000 sec  4.05 MBytes  34.0 Mbits/sec
[  1] 0.0000-10.0123 sec  41.1 MBytes  34.5 Mbits/sec
????
 
Last edited:
Out of curiosity I tested the UDP sketches I posted and they seem to be working with 4000/4018 and 5000/5018 as well.
Just another data point.

@wwatson - whats the command you are using to send data to the teensy
 
Sorry for the delay I had to lay for a nap. These 3:00 AM mornings are hard for me to keep up with:) Anyway, output from QNEthernet starts here in "driver_CYW4343W.cpp" line #186:
Code:
//==============================================================================
//
//==============================================================================
err_t output(struct pbuf *p) {
  uint8_t *buffer;
  // Create a packet buffer.
  buffer = (uint8_t *)malloc(p->tot_len*sizeof(uint8_t));
  // Fill buffer with packet info.
  const uint16_t copied = pbuf_copy_partial(p, buffer, p->tot_len, 0);
  if (copied != p->tot_len) {
    return ERR_BUF;
  }
  // Transmit buffer.
  evt.event_net_tx(buffer, copied + ETH_PAD_SIZE); <------- This call is in "event.cpp line #205" 
  free(buffer);  // Free buffer mem.
  return ERR_OK;
}

In "event.cpp" line #205:
Code:
// =====================================================================
// Transmit network data
// =====================================================================
int Event::event_net_tx(void *data, int len) {
  TX_MSG *txp = &tx_msg;
  uint8_t *dp = (uint8_t *)txp;
  int txlen = sizeof(SDPCM_HDR)+2+sizeof(BDC_HDR_T4)+len;
  txp->sdpcm.len = txlen;
  txp->sdpcm.notlen = ~txp->sdpcm.len;
  txp->sdpcm.seq = sd_tx_seq++;
  memcpy(txp->data, (uint8_t *)data, len);
  while (txlen & 3) dp[txlen++] = 0;
  return (WIFIcard.cardCMD53_write(SD_FUNC_RAD, 0, (uint8_t *)dp, txlen, false)); <------ This is the lowest level call to write data
}
Similarly for receive data in "driver_CYW4343W.cpp" line #136 we have:
Code:
//==============================================================================
// driver_proc_input(). (polled by LWIP)
//==============================================================================
struct pbuf* proc_input(struct netif *netif, int counter) {
  // Finish any pending link and join status check
  if(netif_is_link_up(netif) == 0) return NULL;
  sdpcm_header_t hp; // Get capy of WIFI header struct.
  uint8_t bf[MAX_FRAME_LEN];
  uint32_t data_len;
  // Check for an available event frame. 
  if((data_len = evt.ioctl_get_event(&hp, bf, MAX_FRAME_LEN)) > 0) {      <------ Checks for an event frame and saves it
    struct pbuf *p = pbuf_alloc(PBUF_RAW, data_len+ETH_PAD_SIZE, PBUF_RAM); <----- in an allocated buffer if available.
    if (p == NULL) {
      printf("Failed to allocate pbuf\n");
      return NULL;
    }
    p->len = p->tot_len = data_len+ETH_PAD_SIZE+ETH_PAD_SIZE;
    LWIP_ASSERT("Expected space for pbuf fill",
      pbuf_take(p, (uint8_t *)bf+10, p->tot_len) == ERR_OK);
    return p;       <------------ If data in buffer return it here.
  }
  return NULL; <------- else return a null if no data is available.
}
Note that the input events are polled here in "driver_CYW4343W.cpp" line #160:
Code:
//==============================================================================
// Poll network. (Polled by LWIP).
//==============================================================================
void poll(struct netif *netif) {
  // Get any events, poll the joining state machine.
  if(WIFIcard.ustimeout(&poll_ticks, EVENT_POLL_USEC)) {
    evt.pollEvents(); // Check for an event frame.        <---------------- in "event.cpp" line #180
    // Poll join status. Try to re-join if link is lost.
    qnjoin.join_state_poll(MY_SSID, MY_PASSPHRASE, SECURITY);
    WIFIcard.ustimeout(&poll_ticks, 0); // Clear Polling timout counter.
  }
  // Check if link is up.
  uint8_t link_state = qnjoin.join_check() ? LINK_UP : LINK_DOWN;
  if (netif_is_link_up(netif) != link_state) {
    if (link_state) {
      printf("Setting link up\n");
      netif_set_link_up(netif);
      s_checkLinkStatusState = link_state; //
    } else {
      printf("Setting link down\n");
      netif_set_link_down(netif);
      s_checkLinkStatusState = link_state;
    }
  }
}
Function ioctl_get_event() is found in "event.cpp" at line #180.
The T4.1 wired Ethernet driver uses the built in hardware FIFO system shown in "driver_teensy41.cpp". All input from the CYW4343W/CYW43439 is event driven.
Hope that is not confusing and answers your question....
 
Back
Top