lora-mote-emulator icon indicating copy to clipboard operation
lora-mote-emulator copied to clipboard

ERROR - [Errno 22] Invalid argument while wotking with LoRiot (mac version 1.0.3)

Open t0mer opened this issue 1 year ago • 3 comments

Hi, I'm trying to run mote with LoRiot server and I'm getting the following error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/src/__main__.py", line 113, in main
    gateway.push(udp_client, phypld, mote)
  File "/usr/local/lib/python3.8/site-packages/src/mac.py", line 296, in push
    transmitter.send(self.form_pshdat(data, mote))
  File "/usr/local/lib/python3.8/site-packages/src/network.py", line 17, in send
    self.s.sendto(data, self.target)
OSError: [Errno 22] Invalid argument

Thanks

t0mer avatar Dec 25 '22 13:12 t0mer

Hi, please tell us how is this error got? Which command are you running?

houluy avatar Dec 26 '22 12:12 houluy

Hi, I have updated the device.json, config.json and gateway.json(Attached) Then I ran the following command: mote join -n Then I got the following response:

Forming a join request message - NwkKey: e8f2e241a6496f4699bbf876ee70aaaa, AppKey: e8f2e241a6496f4699bbf876ee70aaaa, AppEUI: , DevEUI: 4491600000f7aaaa, DevNonce: 10, MIC: f844d810,Final Join Req: 000000000000000000aaaaf700006091440a00f844d810 --

Followed by: 2023-01-01 14:35:39,683 - INFO - Sending a PUSH DATA - Verson: 02, Token: a2b2, Identifier: 00, GatewayEUI: 4e7b27ffffbfd427

Followed by: b'\x02\xa2\xb2\x00N{'\xff\xff\xbf\xd4'{"rxpk": [{"tmst": 1672583739, "chan": 1, "rfch": 1, "freq": 868.3, "stat": 1, "modu": "LORA", "datr": "SF7BW125", "codr": "4/5", "lsnr": 2, "rssi": -119, "size": 32, "data": "AAAAAAAAAAAAqqr3AABgkUQKAPhE2BA="}], "stat": {"time": "2023-01-01 14:35:39 GMT", "lati": 39.9075, "long": 116.38806, "rxnb": 1, "rxok": 0, "rxfw": 0, "ackr": 0, "dwnb": 0, "txnb": 0}}'

and in the end: 2023-01-01 14:35:39,698 - ERROR - [Errno 22] Invalid argument

Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/src/main.py", line 113, in main gateway.push(udp_client, phypld, mote) File "/usr/local/lib/python3.8/site-packages/src/mac.py", line 296, in push transmitter.send(self.form_pshdat(data, mote)) File "/usr/local/lib/python3.8/site-packages/src/network.py", line 17, in send self.s.sendto(data, self.target) OSError: [Errno 22] Invalid argument

Thanks (:

config.txt device.txt gateway.txt

t0mer avatar Jan 01 '23 14:01 t0mer

Hi @houluy, Did you have the chance to take a look?

Cheers (:

t0mer avatar Jan 18 '23 12:01 t0mer