Hi Just add HardwareSerial Serial2(2); under #include <Arduino.h> in /Users/matthias/Documents/Arduino/libraries/M5Stack/src/LoRaWan.h