HTCC-AB1 no Serial while waiting for packet

Hi everybody.
I’ m trying to forward packets form Serial to Lora back and for.
Hacking from the Ping Pong example the RX packets get printed IN Serial as I wish.
But could not get Serail.available() to detect anything.
My suspicion is the interrupts are disable in the loop:
Any clue? Thanks in advance.
Lalo

This is the code:

void loop() {
if (Serial.available() > 0) {
c = Serial.read();
if (c == 13) {
txpacket[sptr] = 0;
state = TX;
} else {
if (c != ‘\n’ && sptr < (BUFFER_SIZE - 1)) {
txpacket[sptr++] = c;
}
}
}
switch (state) {
case TX:

  Serial.printf("\r\nsending packet \"%s\" , length %d\r\n", txpacket, strlen(txpacket));

  Radio.Send((uint8_t *)txpacket, strlen(txpacket));
  state = LOWPOWER;
  break;
case RX:
  Serial.println("into RX mode");
  Radio.Rx(0);
  state = LOWPOWER;
  break;
case LOWPOWER:
  lowPowerHandler();
  break;
default:
  break;

}
Radio.IrqProcess();
}

Not 100% sure if this is relevant but when LoRa on the Heltec goes into sleep mode it disables the serial port. This is all part of the LoRa cycle and you don’t have a lot of control over it.

|Where change occurs|Explanation|
| --- | --- |
|Internal LoRaWAN stack|INIT → JOIN, JOIN → SEND, SLEEP, wakeup → SEND|