In recent days i made a config for the Seeed xiao esp32c6 with ble.
Tested and working with the current OMG Dev version.
Also got the external antenna working, but needed to modify the source.
Not sure if its possible to add it with a commit so in the future it could be activated within the config itself?
I added the -Os line , but not sure if it works. And unsure about the correct fallback wifi ssid line.
Is it -DWifiManager_ssid Gateway_Name= or -DWifiManager_ssid= ?
[platformio]
default_envs = seeed_xiao_esp32c6-ble
[env:seeed_xiao_esp32c6-ble]
; --- PLATFORM ---
; Used for pioarduino Seeed XIAO ESP32-C6 support
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.39/platform-espressif32.zip
board = seeed_xiao_esp32c6
upload_protocol = esptool
; Use 'no_ota.csv' for space ( min_spiffs.csv is to small )
board_build.partitions = no_ota.csv
; --- LIBRARIES ---
lib_deps =
${com-esp32.lib_deps}
${libraries.ble}
${libraries.decoder}
; --- BUILD FLAGS ---
build_flags =
${com-esp32.build_flags}
; --- CRITICAL: USB Serial Fix for XIAO ESP32C6 ---
; Needed for serial monitor to show logs
'-DARDUINO_USB_MODE=1'
'-DARDUINO_USB_CDC_ON_BOOT=1'
; --- OpenMQTTGateway Config ---
'-DZgatewayBT="BT"' ; Activate BLE Gateway
'-DNO_INT_TEMP_READING=1' ; ESP32-C6 intern temp sensor disable, not present.
; --- System & Name ---
'-DGateway_Name="MYMQTTname"'
'-DOMG_VERSION="Dev-v26-08-2026"'
'-Os' ; Optimize seize
; --- WiFi & MQTT settings ---
'-DESPWifiManualSetup=true'
'-Dwifi_ssid="MySSID"'
'-Dwifi_password="MyPass"'
'-DMQTT_SERVER="MYIP"'
'-DMQTT_PORT="MyPort"'
'-DMQTT_USER="MYMQTTuser"'
'-DMQTT_PASS="MyPass"'
'-DBase_Topic="MYMQTTuserTopic/"'
; --- WebUI & OTA ---
'-DWEBUI_AUTH=false'
'-Dota_password="MyPass"'
; --- Time & NTP ---
'-DNTP_SERVER="MYIP"'
; --- WiFiManager (Fallback Access Point) ---
; '-DWifiManager_ssid Gateway_Name="MYFallbackSSID"' ; Includes a space, wrong?
'-DWifiManager_ssid="MYFallbackSSID"' ; correct line for fallback ssid?
'-DWifiManager_password="MyPass"'
'-DWifiManager_ConfigPortalTimeOut="240"'
'-DWifiManager_TimeOut="5"'
;
; --- Flash instructions ---
;
; To flash the C6 it needs to be in flash mode. Hold the left mini button and connect the usb cable.
; Than release the button. Flash should now pass the COM search in the terminal and show the esp32 specs before flashing starts.
;
; ACTIVATE EXT. ANTENNA :
; Add below code to the /main/main.ccp file. (About line 1342.)
; Without the internal antenna is active. Test signal about -81 / -9- dBm.
; With code and disconected ext. antenna : -98 / -91 dBm. With ext. antenne connectec very strong signal -54 / -90 dBm.
;
;void setup() {
; //Launch serial for debugging purposes
; Serial.begin(SERIAL_BAUD);
; // === XIAO ESP32C6: External antenna ===
; #if defined(ARDUINO_XIAO_ESP32C6)
; pinMode(WIFI_ENABLE, OUTPUT); // GPIO3
; digitalWrite(WIFI_ENABLE, LOW); // RF-switch on
; delay(100);
; pinMode(WIFI_ANT_CONFIG, OUTPUT); // GPIO14
; digitalWrite(WIFI_ANT_CONFIG, HIGH); // External antenna
; Serial.println("External antenna enabled");
; #endif
; // ======================================
;
custom_description = Regular BLE gateway with adaptive scanning activated