Default value for maximum measurement distance is 4m, since HC-SR04 sensor can't measure reliably beyond that. However, if you are using another sensor or if you you don't care about distances larger ...
The arduino-lorawan library provides a structured way of using the arduino-lmic library to send sensor data over The Things Network or a similar LoRaWAN-based data network. This version targets v4.0.0 ...