LWN-Simulator icon indicating copy to clipboard operation
LWN-Simulator copied to clipboard

How to connect Chirpstack device and generate testing data from simulator device?

Open zhgchen opened this issue 2 years ago • 3 comments

I have copied DevEUI to Chirpstack's device. The gateway can be associated correctly. But "Last seen at" is always "never" for device.

zhgchen avatar Apr 18 '22 15:04 zhgchen

Do the Gateway and devices work?

fedyfausto avatar Apr 19 '22 14:04 fedyfausto

Gateway seems work and is visible at "Active gateways", but device is not available at "Active devices"

From LWN-Simulator console: 2022/04/20 10:31:26 DEV[LWN-Dev-1] |Activation| {A}: None downlink received 2022/04/20 10:31:26 DEV[LWN-Dev-1] |Activation| {A}: Unjoined 2022/04/20 10:31:26 DEV[LWN-Dev-1] |Activation| {A}: JOIN REQUEST sent 2022/04/20 10:31:26 DEV[LWN-Dev-1] |Activation| {A}: Open RXs 2022/04/20 10:31:26 GW[LWN-GT-1]: PUSH DATA send 2022/04/20 10:31:27 GW[LWN-GT-1]: PUSH ACK received 2022/04/20 10:31:28 GW[LWN-GT-1]: PULL RESP received 2022/04/20 10:31:28 GW[LWN-GT-1]: TX ACK sent

From NS console (dev_eui is the one configured from LWN-Simulator ): time="2022-04-20T10:01:01.1066545+08:00" level=info msg="backend/joinserver: sending response" dev_eui=218bfeacd34a8728 message_type=JoinAns receiver_id=000000 result_code=Success sender_id=0000000000000000 transaction_id=4181779636

From Application console (gateway_id and dev_eui are set from LWN-Simulator ): time="2022-04-20T10:26:02.5749609+08:00" level=error msg="log uplink frame for device error" ctx_id="" error="redis xadd error: EXECABORT Transaction discarded because of previous errors." time="2022-04-20T10:26:02.5863415+08:00" level=info msg="lorawan/backend: finished backend api call" message_type=JoinReq protocol_version=1.0 receiver_id=0000000000000000 result_code=Success sender_id=000000 transaction_id=3712802559 time="2022-04-20T10:26:02.5868529+08:00" level=info msg="sent uplink meta-data to network-controller" ctx_id=17bf367e-0d56-4f94-bb80-924cb3789fdb dev_eui=218bfeacd34a8728 time="2022-04-20T10:26:02.5873701+08:00" level=info msg="device-queue flushed" ctx_id=17bf367e-0d56-4f94-bb80-924cb3789fdb dev_eui=218bfeacd34a8728 time="2022-04-20T10:26:02.6147353+08:00" level=info msg="device-session saved" ctx_id=17bf367e-0d56-4f94-bb80-924cb3789fdb dev_addr=002ee668 dev_eui=218bfeacd34a8728 time="2022-04-20T10:26:02.6172662+08:00" level=info msg="device-activation created" ctx_id=17bf367e-0d56-4f94-bb80-924cb3789fdb dev_eui=218bfeacd34a8728 id=897 time="2022-04-20T10:26:02.6355111+08:00" level=info msg="device updated" ctx_id=17bf367e-0d56-4f94-bb80-924cb3789fdb dev_eui=218bfeacd34a8728 time="2022-04-20T10:26:02.6546841+08:00" level=info msg="gateway/mqtt: publishing gateway command" command=down downlink_id=17bf367e-0d56-4f94-bb80-924cb3789fdb gateway_id=9710a2550134250f qos=0 topic=gateway/9710a2550134250f/command/down time="2022-04-20T10:26:02.6631232+08:00" level=info msg="storage: downlink-frame saved" ctx_id=17bf367e-0d56-4f94-bb80-924cb3789fdb token=39229 time="2022-04-20T10:26:04.3428469+08:00" level=info msg="backend/gateway: downlink tx acknowledgement received" downlink_id=17bf367e-0d56-4f94-bb80-924cb3789fdb gateway_id=9710a2550134250f time="2022-04-20T10:26:04.3435334+08:00" level=info msg="sent downlink meta-data to network-controller" ctx_id=17bf367e-0d56-4f94-bb80-924cb3789fdb time="2022-04-20T10:26:04.3435334+08:00" level=error msg="log downlink frame for gateway error" ctx_id=17bf367e-0d56-4f94-bb80-924cb3789fdb error="redis xadd error: EXECABORT Transaction discarded because of previous errors." time="2022-04-20T10:26:04.379772+08:00" level=error msg="log downlink frame for device error" ctx_id=17bf367e-0d56-4f94-bb80-924cb3789fdb error="redis xadd error: EXECABORT Transaction discarded because of previous errors."

zhgchen avatar Apr 20 '22 02:04 zhgchen

Might be a little late but here's how I got it working:

  1. Configure device in Simulator
  2. Create a device in Chirpstack
  3. Then use Chripstack API Endpoint to first get a JWD-Token via [POST] [/api/internal/login] and then use route [GET][/api/devices/{dev_eui}/activation] to activate your device manually.

Kampftoast avatar Sep 05 '22 11:09 Kampftoast

If anyone is using Europe to testing their devices I got it working by changing device region from EU433 to EU868.

BlackPhoenixr avatar Nov 22 '22 17:11 BlackPhoenixr

The frequency must be the same on the Chirpstack and in the Simulator. The device auth is ABP?

fedyfausto avatar Feb 10 '23 13:02 fedyfausto

Closing the issue, I think the problem was solved

fedyfausto avatar Mar 27 '23 09:03 fedyfausto