I’ve been trying to set up a local network server using the V3 stack, following the instructions at https://github.com/TheThingsNetwork/lorawan-stack/blob/v3.0.4/doc/gettingstarted.md. So far, I’ve tested it with a Kerlink gateway with the Semtech UDP packet forwarder installed, and everything seems to work all right. Uplinks are received and published to the corresponding “up” MQTT topic.
The thing is that I would like to test the network server with many gateways and devices, which I’m not able to obtain physically, so I’ve tried writting a program to emulate the UDP packet forwarder locally on the computer. Looking at the contents of the UDP packets being sent by the Kerlink, along with the protocol description at https://github.com/Lora-net/packet_forwarder/blob/master/PROTOCOL.TXT and a packet generator (https://www.npmjs.com/package/lora-packet), I’m able to create and send packets that look like the real ones.
When I run the emulator (with a single device as a first test), in the V3 stack log I get “INFO Connected” for the gateway, which is good. The problem is that when I start sending packets (with a test payload, periodically) I get the following log message “INFO Finished unary call duration=1.200644658s error=error:pkg/networkserver:device_not_found (device not found) error_cause=error:pkg/networkserver:device_not_found (device not found) error_correlation_id=4c6d339ffee34624a8fc985a1ce885af error_name=device_not_found error_namespace=pkg/networkserver grpc_code=NotFound grpc_method=HandleUplink grpc_service=ttn.lorawan.v3.GsNs namespace=grpc request_id=01DGCHMT52HWDGQWTKSK9YH3Z3” for the first message, and “WARN Packet filtered” for the rest of the messages.
Do you have any idea of what the problem could be?
Maybe some field in the emulated packets is not correct, what criteria does the stack use to filter the Semtech UDP packets?