If you send a packet and immediatly check if there is a packet received, that is going to fail, LoRa devices are transceivers but they cannot transmit and receive at the same time..
Think of the sequence;
- Device A completes transmitting a packet
- Device A turns around into receive mode
- Device B receives a packet.
- Device B processes the packet, displays it records it etc.
- Device B turns around into transmit mode
- Device B starts transmitting a packet
- Device B completes transmitting a packet
- Device A receives a packet
So if at point 2 device A checks to see if a packet has been received then it wont be, since steps 3,4,5,6,7 have yet to happen and all take time.
Not sure how the LoRa library you are using deals with the turnaround between TX and RX although there is a Duplex example provided.