Weird behavior with wifi on battery power

So I'm trying to make a simple http server on the rp2040 connect. Here's my code so far...

#include <WiFiNINA.h>
#include "secrets.h"

WiFiServer server(80);

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);

  int status = WiFi.status();
  while (status == WL_NO_MODULE);
  while (status != WL_CONNECTED) {
    status = WiFi.begin(NETWORK_SSID, NETWORK_PASSWORD);
    digitalWrite(LED_BUILTIN, HIGH);
    delay(1000);
    digitalWrite(LED_BUILTIN, LOW);
    delay(1000);
  }

  digitalWrite(LED_BUILTIN, HIGH);
  server.begin();
}

void loop() {
  WiFiClient client = server.available();
  if (client) {
    client.println("HTTP/1.1 204 No Content");
    client.println();
    client.stop();
  }
}
#include <WiFiNINA.h>
#include "secrets.h"

WiFiServer server(80);

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);

  int status = WiFi.status();
  while (status == WL_NO_MODULE);
  while (status != WL_CONNECTED) {
    status = WiFi.begin(NETWORK_SSID, NETWORK_PASSWORD);
    digitalWrite(LED_BUILTIN, HIGH);
    delay(1000);
    digitalWrite(LED_BUILTIN, LOW);
    delay(1000);
  }

  digitalWrite(LED_BUILTIN, HIGH);
  server.begin();
}

void loop() {
  WiFiClient client = server.available();
  if (client) {
    client.println("HTTP/1.1 204 No Content");
    client.println();
    client.stop();
  }
}

It works great when the board is connected by usb to my computer, the led blinks a few times then remains solid and it responds as expected to incoming http requests. When I move it to battery power though, the led doesn't turn on at all.

Why isn't WiFiNINA detecting the wifi module on battery power?

Most likely, the battery power supply is either incorrectly wired or cannot supply enough current. Post a schematic wiring diagram and links to the actual components.

Yeah... turns out it was because the battery supply was 3.3V. I've got it working now, Thanks.