Call to arms | Teensy + WiFi = true

@wwatson
Finally got simperfserver working - had to use iperf and not iperf3
with 4018
Code:
C:\Users\Merli>C:\Users\Merli\Downloads\iperf -c 192.168.1.111  -i 1 -l 1000000 -p 5001
------------------------------------------------------------
Client connecting to 192.168.1.111, TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[  1] local 192.168.1.36 port 62303 connected with 192.168.1.111 port 5001
[ ID] Interval       Transfer     Bandwidth
[  1] 0.00-1.00 sec  3.81 MBytes  32.0 Mbits/sec
[  1] 1.00-2.00 sec  3.81 MBytes  32.0 Mbits/sec
[  1] 2.00-3.00 sec  1.91 MBytes  16.0 Mbits/sec
[  1] 3.00-4.00 sec  3.81 MBytes  32.0 Mbits/sec
[  1] 4.00-5.00 sec  2.86 MBytes  24.0 Mbits/sec
[  1] 5.00-6.00 sec  2.86 MBytes  24.0 Mbits/sec
[  1] 6.00-7.00 sec  2.86 MBytes  24.0 Mbits/sec
[  1] 7.00-8.00 sec  2.86 MBytes  24.0 Mbits/sec
[  1] 8.00-9.00 sec  2.86 MBytes  24.0 Mbits/sec
[  1] 9.00-10.00 sec  2.86 MBytes  24.0 Mbits/sec
[  1] 10.00-10.81 sec   977 KBytes  9.86 Mbits/sec
[  1] 0.00-10.81 sec  31.5 MBytes  24.4 Mbits/sec

with 5018
Code:
C:\Users\Merli>C:\Users\Merli\Downloads\iperf -c 192.168.1.111  -i 1 -l 1000000 -p 5001
------------------------------------------------------------
Client connecting to 192.168.1.111, TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[  1] local 192.168.1.36 port 58239 connected with 192.168.1.111 port 5001
[ ID] Interval       Transfer     Bandwidth
[  1] 0.00-1.00 sec  3.81 MBytes  32.0 Mbits/sec
[  1] 1.00-2.00 sec  3.81 MBytes  32.0 Mbits/sec
[  1] 2.00-3.00 sec  2.86 MBytes  24.0 Mbits/sec
[  1] 3.00-4.00 sec  0.000 Bytes  0.000 bits/sec
[  1] 4.00-5.00 sec  0.000 Bytes  0.000 bits/sec
[  1] 5.00-6.00 sec  0.000 Bytes  0.000 bits/sec
[  1] 6.00-7.00 sec  0.000 Bytes  0.000 bits/sec
[  1] 7.00-8.00 sec  0.000 Bytes  0.000 bits/sec
[  1] 8.00-9.00 sec  0.000 Bytes  0.000 bits/sec
[  1] 9.00-10.00 sec  0.000 Bytes  0.000 bits/sec
[  1] 0.00-19.03 sec  19.1 MBytes  8.41 Mbits/sec
alot worse at 5018 but then again maybe not.

If I go lower to about 2K
C:\Users\Merli>C:\Users\Merli\Downloads\iperf -c 192.168.1.111 -i 1 -l 2000 -p 5001
------------------------------------------------------------
Client connecting to 192.168.1.111, TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[ 1] local 192.168.1.36 port 62873 connected with 192.168.1.111 port 5001
[ ID] Interval Transfer Bandwidth
[ 1] 0.00-1.00 sec 82.1 KBytes 673 Kbits/sec
[ 1] 1.00-2.00 sec 0.000 Bytes 0.000 bits/sec
[ 1] 2.00-3.00 sec 0.000 Bytes 0.000 bits/sec
[ 1] 3.00-4.00 sec 0.000 Bytes 0.000 bits/sec
[ 1] 4.00-5.00 sec 0.000 Bytes 0.000 bits/sec
[ 1] 5.00-6.00 sec 0.000 Bytes 0.000 bits/sec
[ 1] 6.00-7.00 sec 0.000 Bytes 0.000 bits/sec
[ 1] 7.00-8.00 sec 0.000 Bytes 0.000 bits/sec
[ 1] 8.00-9.00 sec 0.000 Bytes 0.000 bits/sec
[ 1] 9.00-10.00 sec 0.000 Bytes 0.000 bits/sec
[ 1] 0.00-19.08 sec 82.1 KBytes 35.3 Kbits/sec


Yep found it right after I posted :)
 
Last edited:
Gave up on iPerf very inconsistent when testing any thing including my desktops and laptop. Anyway, there is one example that is consistent and that is "SimpleHTTPClient.ino".
With original MTU and RX/TX buffer sizes I get:
Code:
Response stats: 88485 bytes in 0.326005 seconds
With MTU at 4018 and RX/TX buffer sizes at 2048 I get this"
Code:
Response stats: 88612 bytes in 0.165871 seconds
With wired Ethernet I get this:
Code:
Response stats: 88381 bytes in 0.294162 seconds
So for now I am choosing @mjs513 suggested settings:
Code:
#define MTU           4018//2318
#define MAX_FRAME_LEN 4018//2318  /* Does not include the 4-byte FCS (frame check sequence) */
and SDIO buffer sizes:
Code:
#define TXDATA_LEN       2048//1600
#define RXDATA_LEN       2048//1600
At least for now :D
 
It's late but one more test with wired Ethernet and MTU set to 4018 temporarily running "SimpleHTTPClient.ino" we get:
Code:
Response stats: 88620 bytes in 0.137245 seconds
Maybe test UDP response times?
 
Not crazy about response times since it depends too much on other factors, but with that said working with AI to come up with something that sends UDP packets using `iperf`
Using iperf command
Code:
iperf -u -c <Teensy-IP> -p 5001 -b 1M

Got this on the Teensy side
Code:
Packets: 0 | Lost: 0 (0.00%) | Throughput: 0.00 kbps
Packets: 0 | Lost: 0 (0.00%) | Throughput: 0.00 kbps
Packets: 115 | Lost: 0 (0.00%) | Throughput: 676.20 kbps
Packets: 178 | Lost: 0 (0.00%) | Throughput: 1046.64 kbps
Packets: 179 | Lost: 0 (0.00%) | Throughput: 1052.52 kbps
Packets: 178 | Lost: 0 (0.00%) | Throughput: 1046.64 kbps
Packets: 179 | Lost: 0 (0.00%) | Throughput: 1052.52 kbps
Packets: 1 | Lost: 0 (0.00%) | Throughput: 811.44 kbps
Packets: 1 | Lost: 0 (0.00%) | Throughput: 711.48 kbps
Packets: 1 | Lost: 0 (0.00%) | Throughput: 23.52 kbps
Packets: 0 | Lost: 0 (0.00%) | Throughput: 0.00 kbps
Packets: 0 | Lost: 0 (0.00%) | Throughput: 0.00 kbps

On windows side it outputs
Code:
PS C:\Users\Merli> C:\Users\Merli\OneDrive\Desktop\iperf -u -c 192.168.1.12 -p 5001 -b 1M
------------------------------------------------------------
Client connecting to 192.168.1.12, UDP port 5001
Sending 1470 byte datagrams, IPG target: 0.00 us (kalman adjust)
UDP buffer size: 64.0 KByte (default)
------------------------------------------------------------
[  1] local 192.168.1.36 port 60403 connected with 192.168.1.12 port 5001
[ ID] Interval       Transfer     Bandwidth
[  1] 0.00-10.02 sec  1.25 MBytes  1.05 Mbits/sec
[  1] Sent 893 datagrams

If your want to play more here is the sketch
C++:
#include <SPI.h>
#include <QNEthernet.h>

using namespace qindesign::network;
EthernetUDP _udp;

// iperf -u -c <Teensy IP> -p 5001 -b 1M

// Network settings (adjust for your network)
unsigned int localPort = 5001;       // iperf default UDP port

EthernetUDP Udp;

// Stats
unsigned long packetCount = 0;
unsigned long lastSeq = 0;
unsigned long lostPackets = 0;
unsigned long startTime = 0;
unsigned long totalBytes = 0;

void setup();
void loop();
void setup() {
  Serial.begin(115200);

  // Start Ethernet
  if (!Ethernet.begin()) {
    printf("Failed to start Ethernet hardware.\r\n");
    while (1) delay(1000);
  }
 
  if (!Ethernet.waitForLocalIP(15000)) {
    printf("DHCP Timeout failed.\r\n");
    while (1) delay(1000);
  }

  // Start UDP
  if (!Udp.begin(localPort)) {
    Serial.println("UDP start failed");
    while (true);
  }

  Serial.println("UDP Throughput Test with IPERF");
}

void loop() {
  int packetSize = Udp.parsePacket();
  if (packetSize) {
    uint8_t buffer[4000]; // Enough for typical MTU
    int len = Udp.read(buffer, sizeof(buffer));

    if (len >= 12) {
      // iperf UDP header format:
      // 0-3: sequence number (signed int, big-endian)
      // 4-7: timestamp seconds
      // 8-11: timestamp microseconds

      int32_t seqNum =
        ((int32_t)buffer[0] << 24) |
        ((int32_t)buffer[1] << 16) |
        ((int32_t)buffer[2] << 8)  |
        ((int32_t)buffer[3]);

      if (packetCount == 0) {
        // First packet
        lastSeq = seqNum;
      } else {
        if (seqNum > lastSeq) {
          lostPackets += (uint32_t)(seqNum - lastSeq - 1);
        }
        else if (seqNum < lastSeq) {
          // Sequence reset or wrap-around — start fresh
          lostPackets = 0;
          packetCount = 0;
        }
      }

      lastSeq = seqNum;
      packetCount++;
      totalBytes += len;
    }
  }

  // Print stats every 2 seconds
  if (millis() - startTime >= 2000) {
    float seconds = (millis() - startTime) / 1000.0f;
    float kbps = (totalBytes * 8.0f) / 1000.0f / seconds;
    float lossPercent = (packetCount + lostPackets) > 0 ?
                        (lostPackets * 100.0f) / (packetCount + lostPackets) : 0;

    Serial.print("Packets: ");
    Serial.print(packetCount);
    Serial.print(" | Lost: ");
    Serial.print(lostPackets);
    Serial.print(" (");
    Serial.print(lossPercent, 2);
    Serial.print("%) | Throughput: ");
    Serial.print(kbps, 2);
    Serial.println(" kbps");

    // Reset counters for next interval
    packetCount = 0;
    lostPackets = 0;
    totalBytes = 0;
    startTime = millis();
  }
}
 
Last edited:
Another datapoint on the Mircromod ESP32 board

Code:
Packets: 0 | Lost: 0 (0.00%) | Throughput: 0.00 kbps
Packets: 70 | Lost: 0 (0.00%) | Throughput: 408.80 kbps
Packets: 179 | Lost: 0 (0.00%) | Throughput: 1045.36 kbps
Packets: 178 | Lost: 0 (0.00%) | Throughput: 1039.52 kbps
Packets: 179 | Lost: 0 (0.00%) | Throughput: 1045.36 kbps
Packets: 178 | Lost: 0 (0.00%) | Throughput: 1039.52 kbps
Packets: 1 | Lost: 0 (0.00%) | Throughput: 899.36 kbps
Packets: 1 | Lost: 0 (0.00%) | Throughput: 700.80 kbps
Packets: 1 | Lost: 0 (0.00%) | Throughput: 204.40 kbps
Packets: 0 | Lost: 0 (0.00%) | Throughput: 0.00 kbps

but the data gram is limited to < 1500 bytes where as on Teensy you can change the data gram sent to 2000:
 
Last edited:
@mjs513 - Probably not going to have much time today to play with it today. It interesting to see that both boards perform about the same.
Will play with it tomorrow (y)
 
Probably not going to have much time today to play with it today. It interesting to see that both boards perform about the same.
Will play with it tomorrow (y)
Big difference is that ESP32 cant handle datagrams > 1500 bytes - we took care of that when we changed the MTU

EDIT:
Here is where you see the difference if I do
Code:
iperf -u -c 192.168.1.12 -l 4000 -p 5001 -b 1M

and change packetbuffer to 4000

Code:
Packets: 0 | Lost: 0 (0.00%) | Throughput: 0.00 kbps
Packets: 31 | Lost: 0 (0.00%) | Throughput: 496.00 kbps
Packets: 65 | Lost: 0 (0.00%) | Throughput: 1040.00 kbps
Packets: 67 | Lost: 0 (0.00%) | Throughput: 1072.00 kbps
Packets: 65 | Lost: 0 (0.00%) | Throughput: 1040.00 kbps
Packets: 66 | Lost: 0 (0.00%) | Throughput: 1056.00 kbps
Packets: 1 | Lost: 0 (0.00%) | Throughput: 1440.00 kbps
Packets: 1 | Lost: 0 (0.00%) | Throughput: 1984.00 kbps
Packets: 1 | Lost: 0 (0.00%) | Throughput: 352.00 kbps
Packets: 0 | Lost: 0 (0.00%) | Throughput: 0.00 kbps

which you cant do on the ESP32
 
Last edited:
@mjs513 - Got pretty much the same results as you did with the UDP test:
Code:
Setting link up
    Local IP    = 192.168.7.235
    Subnet mask = 255.255.252.0
    Gateway     = 192.168.4.1
    DNS         = 75.75.75.75
UDP Throughput Test with IPERF
Packets: 0 | Lost: 0 (0.00%) | Throughput: 0.00 kbps
Packets: 0 | Lost: 0 (0.00%) | Throughput: 0.00 kbps
Packets: 0 | Lost: 0 (0.00%) | Throughput: 0.00 kbps
Packets: 155 | Lost: 6 (3.73%) | Throughput: 929.04 kbps
Packets: 179 | Lost: 0 (0.00%) | Throughput: 1052.52 kbps
Packets: 178 | Lost: 0 (0.00%) | Throughput: 1046.64 kbps
Packets: 178 | Lost: 0 (0.00%) | Throughput: 1046.64 kbps
Packets: 179 | Lost: 0 (0.00%) | Throughput: 1052.52 kbps
Packets: 1 | Lost: 0 (0.00%) | Throughput: 1146.60 kbps
Packets: 1 | Lost: 0 (0.00%) | Throughput: 123.48 kbps
Packets: 0 | Lost: 0 (0.00%) | Throughput: 0.00 kbps
Packets: 0 | Lost: 0 (0.00%) | Throughput: 0.00 kbps
Going back to Bluetooth for a bit...
 
One more thing, I fixed the problem with the "Sparkfun_teensy_Bluetooth" library showing up in the "INCOMPATIBLE" menu in Arduino 1.8.19:
Code:
name=SparkFun_Teensy_Bluetooth
version=1.0.0
author=SparkFun Electronics <techsupport@sparkfun.com>
maintainer=SparkFun Electronics <techsupport@sparkfun.com>
sentence=Arduino Bluetooth driver for the CYW43439 (BLE peripheral and central roles via HCI UART)
paragraph=Drives the CYW43439 WiFi/BT combo chip over a dedicated HCI UART. Exposes a NimBLE-style API for advertising, scanning, GATT server (peripheral), and GATT client (central). Requires firmware patch binary (see examples/firmware).
category=Communication
url=https://github.com/sparkfun/SparkFun_Teensy_Bluetooth
architectures=* <------------------- Changed from "teensy" to "*".
includes=SparkFun_BLE.h
I guess Arduino does not consider "teensy" as an architecture. Maybe NXP?
EDIT: This is only for Arduino 1.8.19 not the Arduino IDE...
 
Ok all been playing with UDP and did something that been wanting to do except this time had AI to help - found that if you feed AI some working examples it helps. Any ways created a msg pack for udp class that simplifies transferring and receiving data. Just finished testing it on the Teensy and Micromod ESP32View attachment 39756

Sample output
View attachment 39757

If interested here are the sketches
I forgot about this. Just for the heck of it I wanted to try it out between the T41 with the CYW4343W chip and another T41 with the CYW43439 chip. Even though the messages to match they appear to transfer properly:
Code:
[TEENSY TX] Distributing state struct to ESP32...
  >> ESP32 confirmed structural receipt.
                                                                                
[TEENSY RECV] Incoming packet from ESP32 recognized!
  > Type: Array (3 elements)                                                  
  > Values: 12 45 78                                                            
                                                                                
[TEENSY TX] Distributing a float Array to ESP32...
  >> ESP32 confirmed array receipt.

[TEENSY RECV] Incoming packet from ESP32 recognized!
  > Type: Generic Primitive
  > Value: TEENSY_CORE_CRITICAL_OK

[TEENSY TX] Distributing basic string diagnostic to ESP32...
  >> ESP32 confirmed generic receipt.

[TEENSY RECV] Incoming packet from ESP32 recognized!
  > Type: Struct
  > Node ID: 999, Battery: 3.82V, Active: NO
Using the same Teensy side sketch I get the same the other Teensy. It works :D
 
Ok all been busy working on a realtime display for the weather app. So far this is what I have but still a work in progress
1788376858682.jpeg
 
Great stuff @mjs513,

For the heck of it, I have been playing some with the new Arduino Zephyr Release (and stuff leading up to the release, which now includes
the new Q board:
1788379547353.png

(Which I currently own nor have on order, but...)

Was playing around with stuff on the other boards, like Giga, Portenta H7, and Portenta C33...

They now have some support for WiFi on these boards. So I thought I would try converting the above sketch (one with Serial output) to their
WiFi library.

Getting some results:
Code:
Attempting to connect to SSID: Upstairs
Attempting to connect to SSID: Upstairs
Attempting to connect to SSID: Upstairs
Connected to wifi
SSID: Upstairs
IP Address: 192.168.2.165
signal strength (RSSI):-97 dBm

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

====================== Map City ======================
Name:                Seattle
latitude:            47.606209
longitude:           -122.332070
Time Zone:           America/Los_Angeles

[1/3] Requesting Current Weather...

====================== CURRENT WEATHER ======================
Time:                2026-09-02T13:00
Condition:           Overcast (Code 3)
Temperature:         62.3 °F
Pressure (MSL):      1005.1 hPa
Wind Speed:          6.4 mph
Wind Direction:      216°
Rain:                0.00 in
Snowfall:            0.00 in

[2/3] Requesting Hourly Forecast...

========================================== HOURLY FORECAST ==========================================
   Time       Temp     PoP%    Precipitation     Wind
-----------------------------------------------------------------------------------------------------
   00:00     58.9 °F    2%        0.00 in       6.0 mph
   01:00     59.8 °F    2%        0.00 in       3.7 mph
   02:00     58.6 °F    2%        0.00 in       3.4 mph
   03:00     58.9 °F    2%        0.00 in       2.3 mph
   04:00     58.5 °F    3%        0.00 in       5.3 mph
   05:00     58.9 °F    4%        0.00 in       3.9 mph
   06:00     57.1 °F    9%        0.00 in       4.0 mph
   07:00     57.1 °F    6%        0.00 in       2.9 mph
   08:00     59.1 °F    3%        0.00 in       4.1 mph
   09:00     62.5 °F    5%        0.00 in       4.6 mph
   10:00     63.6 °F    9%        0.00 in       3.7 mph
   11:00     65.2 °F   11%        0.00 in       5.2 mph
   12:00     66.5 °F   13%        0.00 in       8.9 mph
   13:00     62.3 °F   22%        0.00 in       6.4 mph
   14:00     62.1 °F   42%        0.02 in      11.3 mph
   15:00     62.4 °F   74%        0.02 in       9.9 mph
   16:00     62.0 °F   89%        0.05 in      11.5 mph
   17:00     59.5 °F   79%        0.21 in      11.4 mph
   18:00     59.2 °F   42%        0.00 in      12.0 mph
   19:00     58.1 °F   14%        0.00 in      11.3 mph
   20:00     56.0 °F    9%        0.00 in       6.3 mph
   21:00     55.8 °F    9%        0.00 in       6.1 mph
   22:00     54.9 °F    5%        0.00 in       3.6 mph
   23:00     54.0 °F    4%        0.00 in       6.4 mph

[3/3] Requesting Daily Forecast...

=========================================== DAILY FORECAST ==========================================
   Date       Max/Min Temp    PoP%   Precip    Rain    Snow    MaxWind   Gusts   Condition
-----------------------------------------------------------------------------------------------------
   09-02     66.5 / 56.0 °F   89%   0.30 in  0.30 in  0.00 in 12.0 mph 28.2 mph  Moderate rain
   09-03     62.0 / 52.5 °F   30%   0.02 in  0.02 in  0.00 in  8.1 mph 19.9 mph  Light drizzle
   09-04     67.2 / 51.5 °F    7%   0.00 in  0.00 in  0.00 in  4.9 mph  6.9 mph  Overcast
   09-05     64.5 / 53.0 °F   10%   0.18 in  0.18 in  0.00 in  7.1 mph 17.7 mph  Slight rain
   09-06     73.0 / 51.2 °F    8%   0.00 in  0.00 in  0.00 in  7.2 mph 18.3 mph  Overcast
   09-07     78.3 / 52.6 °F    9%   0.00 in  0.00 in  0.00 in  6.3 mph 11.9 mph  Clear sky
   09-08     73.0 / 54.8 °F    3%   0.00 in  0.00 in  0.00 in  8.6 mph 12.1 mph  Overcast
================================================================================---------------------

All data successfully fetched!
Enter City name:

However running into similar issues like we were seeing on Teensy with too much data and erroring out...
Including trying to get information about city... Like I mentioned earlier could not retrieve "New York"

But when I got into an error case with it on the GIGA, I see in the debug monitor:
I see:
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",
        null
      ]
    }
  ]
}
So the data I am interested in is there, so tried processing it:
It simply outputs:
Code:
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

Always something....
 
Great stuff @mjs513,

For the heck of it, I have been playing some with the new Arduino Zephyr Release (and stuff leading up to the release, which now includes
the new Q board:
View attachment 39785
(Which I currently own nor have on order, but...)

Was playing around with stuff on the other boards, like Giga, Portenta H7, and Portenta C33...

They now have some support for WiFi on these boards. So I thought I would try converting the above sketch (one with Serial output) to their
WiFi library.

Getting some results:
Code:
Attempting to connect to SSID: Upstairs
Attempting to connect to SSID: Upstairs
Attempting to connect to SSID: Upstairs
Connected to wifi
SSID: Upstairs
IP Address: 192.168.2.165
signal strength (RSSI):-97 dBm

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

====================== Map City ======================
Name:                Seattle
latitude:            47.606209
longitude:           -122.332070
Time Zone:           America/Los_Angeles

[1/3] Requesting Current Weather...

====================== CURRENT WEATHER ======================
Time:                2026-09-02T13:00
Condition:           Overcast (Code 3)
Temperature:         62.3 °F
Pressure (MSL):      1005.1 hPa
Wind Speed:          6.4 mph
Wind Direction:      216°
Rain:                0.00 in
Snowfall:            0.00 in

[2/3] Requesting Hourly Forecast...

========================================== HOURLY FORECAST ==========================================
   Time       Temp     PoP%    Precipitation     Wind
-----------------------------------------------------------------------------------------------------
   00:00     58.9 °F    2%        0.00 in       6.0 mph
   01:00     59.8 °F    2%        0.00 in       3.7 mph
   02:00     58.6 °F    2%        0.00 in       3.4 mph
   03:00     58.9 °F    2%        0.00 in       2.3 mph
   04:00     58.5 °F    3%        0.00 in       5.3 mph
   05:00     58.9 °F    4%        0.00 in       3.9 mph
   06:00     57.1 °F    9%        0.00 in       4.0 mph
   07:00     57.1 °F    6%        0.00 in       2.9 mph
   08:00     59.1 °F    3%        0.00 in       4.1 mph
   09:00     62.5 °F    5%        0.00 in       4.6 mph
   10:00     63.6 °F    9%        0.00 in       3.7 mph
   11:00     65.2 °F   11%        0.00 in       5.2 mph
   12:00     66.5 °F   13%        0.00 in       8.9 mph
   13:00     62.3 °F   22%        0.00 in       6.4 mph
   14:00     62.1 °F   42%        0.02 in      11.3 mph
   15:00     62.4 °F   74%        0.02 in       9.9 mph
   16:00     62.0 °F   89%        0.05 in      11.5 mph
   17:00     59.5 °F   79%        0.21 in      11.4 mph
   18:00     59.2 °F   42%        0.00 in      12.0 mph
   19:00     58.1 °F   14%        0.00 in      11.3 mph
   20:00     56.0 °F    9%        0.00 in       6.3 mph
   21:00     55.8 °F    9%        0.00 in       6.1 mph
   22:00     54.9 °F    5%        0.00 in       3.6 mph
   23:00     54.0 °F    4%        0.00 in       6.4 mph

[3/3] Requesting Daily Forecast...

=========================================== DAILY FORECAST ==========================================
   Date       Max/Min Temp    PoP%   Precip    Rain    Snow    MaxWind   Gusts   Condition
-----------------------------------------------------------------------------------------------------
   09-02     66.5 / 56.0 °F   89%   0.30 in  0.30 in  0.00 in 12.0 mph 28.2 mph  Moderate rain
   09-03     62.0 / 52.5 °F   30%   0.02 in  0.02 in  0.00 in  8.1 mph 19.9 mph  Light drizzle
   09-04     67.2 / 51.5 °F    7%   0.00 in  0.00 in  0.00 in  4.9 mph  6.9 mph  Overcast
   09-05     64.5 / 53.0 °F   10%   0.18 in  0.18 in  0.00 in  7.1 mph 17.7 mph  Slight rain
   09-06     73.0 / 51.2 °F    8%   0.00 in  0.00 in  0.00 in  7.2 mph 18.3 mph  Overcast
   09-07     78.3 / 52.6 °F    9%   0.00 in  0.00 in  0.00 in  6.3 mph 11.9 mph  Clear sky
   09-08     73.0 / 54.8 °F    3%   0.00 in  0.00 in  0.00 in  8.6 mph 12.1 mph  Overcast
================================================================================---------------------

All data successfully fetched!
Enter City name:

However running into similar issues like we were seeing on Teensy with too much data and erroring out...
Including trying to get information about city... Like I mentioned earlier could not retrieve "New York"

But when I got into an error case with it on the GIGA, I see in the debug monitor:
I see:
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",
        null
      ]
    }
  ]
}
So the data I am interested in is there, so tried processing it:
It simply outputs:
Code:
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

Always something....
Isn't that the truth:)
 
Ok guys think I am done tweaking for this for a bit.

Am attaching the sketch, the icon file which I put on a sd card, and the moded pngdec lib for use with the qnet lib.

Cheers
mike
 

Attachments

  • weather_display_v3.zip
    8.5 KB · Views: 19
  • airy.zip
    95.2 KB · Views: 20
  • PNGdec.zip
    812 KB · Views: 17
:)
With SerMon entered another city or two last night and they came through. Typed cities now 9-10 hours later it seems?
Code:
All data successfully fetched!
Enter City name:
Leaving network
Setting link down

******************** Failed to join network ************************

Setting link up
Setting link down
Setting link up
New City: paris

[0/3] Map City to Location...
Connection failed.
New City: loganville

[0/3] Map City to Location...
Connection failed.
New City: York

[0/3] Map City to Location...
Connection failed.

Something loose with wire bundle - I touched the unit to see if display was hindering antenna and it flashed/whited out :(
Doesn't seem it was the antenna as repowered in place and it is working fine with SerMon updates
 
Ok all @KurtE and I are still at it, we made some more changes to the display code
1. Will support ILI9488 or ST7796 with resistive touch
2. Added a few things to the main display like AQI and day of week instead of Day1....
3. Now if you touch the day on the main screen a new window will be drawn showing weather data for the day selected.

think only a little bit more to do.

Cheers

PS so far so good with the WiFi board :)
 

Attachments

  • weather_display_v4-260903a.zip
    12.6 KB · Views: 15
Quick notes: yep @mjs513 - still hacking a way.

Still wondering why though, why on the Daily query, that if you leave the location code to New York it works,
if however it is updated to use the correct location code, like for example Disneyland which is Location code of: Los Angeles
the request fails.

I wonder if the added three characters to the request causes something to overflow.

I added code to print out what was output to the server"
Code:
GET /v1/forecast?latitude=33.81207&longitude=-117.91898&daily=temperature_2m_max,temperature_2m_min,snowfall_sum,precipitation_probability_max,weather_code,wind_speed_10m_max,wind_direction_10m_dominant,rain_sum,sunrise,sunset,relative_humidity_2m_mean&timezone=America/Los_Angeles&wind_speed_unit=mph&temperature_unit=fahrenheit&precipitation_unit=inch HTTP/1.0
Host: api.open-meteo.com
User-Agent: Teensy-QNEthernet
Connection: close
Again added 3 bytes: timezone=America/Los_Angeles instead of: timezone=America/New_York

I believe the data sent changed from 440 bytes to 443... Not sure what other data maybe also be packaged with it.

I still need to update my wiring to enable the Touch Screen.

Was slightly distracted on this today:
1788487644152.png


But it is a start
 
Morning all. Think this is the last version. @KurtE changed all the image files on the sd card to images files on the SD card to .h images so no longer need to use a SD card

Main Screen: Daily Screen:
IMG_1763.png
IMG_1764.png


Attached is the updated app.

Cheers
 

Attachments

  • weather_display_v5-260904a.zip
    74.5 KB · Views: 13
Back
Top