Seeed XIAO S3 CC1101 Invalid pin

I’m trying to build OpenMQTTGateway for a Seeed Studio XIAO ESP32S3. For RF control of KlikAanKlikUit devices over RF(KaKu) using a CC1101. I have the following config in my environments.ini:

[env:seeed-s3]
platform = ${com.esp32_platform}
board = seeed_xiao_esp32s3
lib_deps = 
  ${com-esp32.lib_deps}
  ${libraries.rc-switch}
  ${libraries.smartrc-cc1101-driver-lib}
  ${libraries.rtl_433_ESP}
  ${libraries.newremoteswitch}
  ${libraries.ble}
  ${libraries.decoder}
build_flags =
  ${com-esp32.build_flags}
  '-DNO_INT_TEMP_READING=true' ; Internal temperature reading not building on ESP32 C3 or S3
  '-DZgatewayRF2="RF2"'
  '-DZgatewayRTL_433="RTL_433"'
  '-DZradioCC1101="CC1101"'
  '-DGateway_Name="OMG_multi_receiver"'
  '-DvalueAsATopic=true'  ; MQTT topic includes model and device (rtl_433) or protocol and id (RF and PiLight)
; *** RF Module Options ***
  '-DRF_CC1101="CC1101"'  ; CC1101 Transceiver Module
  '-DRF_MODULE_CS=3'      ; pin to be used as chip select
  '-DRF_MODULE_GDO0=4'   ; CC1101 pin GDO0
  '-DRF_MODULE_GDO2=1'   ; CC1101 pin GDO2
  '-DRF_MODULE_SCK=8'
  '-DRF_MODULE_MOSI=10'
  '-DRF_MODULE_MISO=9'
  '-DRF_RECEIVER_GPIO=1'
  '-DRF_EMITTER_GPIO=4'
  '-DESPWifiManualSetup=true'
  '-Dwifi_ssid="<ssid>"'
  '-Dwifi_password="<pass>"'
  '-DMQTT_SERVER="192.168.2.1"'
  '-DMQTT_USER="openmqtt"'
  '-DMQTT_PASS="<pass>"'
  '-DMQTT_PORT="1883"'

However, I get the following errors in my serial output. And don’t see any RF traffic being logged.

[  8514][E][esp32-hal-gpio.c:102] __pinMode(): Invalid pin selected

I’ve tried using both GPIO pin numbering and D pin numbering. But neither seems to work. I can’t seem to find out which pin is triggering this error, which makes it pretty hard to debug.

You could try some basic CC1101 examples to verify that they work first. This would validate your wiring and pin assignment.