@abhishek2101 I've got some Lopy4 acting as a class C, and it works fine (mine are always powered)
but you need a server capable of sending downlink of course.
I'm sorry I can't share any code but looks like something
LoRa(mode=LoRa.LORAWAN, public=True, tx_retries=3, device_class=LoRa.CLASS_C)
while (not lora.has_joined()):
time.sleep(0.1)
lsock = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
lsock.setsockopt(socket.SOL_LORA, socket.SO_DR, 5)
lsock.setsockopt(socket.SOL_LORA, socket.SO_CONFIRMED, False)
lsock.setblocking(False)
while true:
data, port = self.lsock.recvfrom(32)
lg = len (data)
if lg > 0:
print("Downlink Port={:d} Size={:d} Payload={}".format(port, lg, hexlify(data).upper()) )
time.sleep(0.1)