We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swagger docs on /swagger/#!/DeviceProfileService/Create show that the API accepts an "id" field
/swagger/#!/DeviceProfileService/Create
"id"
But doing a request with that "id" field set to a specific UUID does not create the device profile under that given UUID, but a new random one.
Device profile is created with "id" sourced from the API request.
Instead, code is hardcoded to ignore the "id" field and create a new UUID for every newly created device profile, see
chirpstack-application-server/internal/api/external/device_profile.go
Lines 98 to 102 in 9cf39fd
and
chirpstack-application-server/internal/storage/device_profile.go
Lines 59 to 76 in 9cf39fd
Steps:
/api/device-profiles
{'deviceProfile': {'adrAlgorithmID': 'default', 'factoryPresetFreqs': [868100000, 868300000, 868500000, 867100000, 867300000, 867500000, 867000000, 867900000], 'id': '19990b47-496e-4d82-a136-c0e6b208c401', 'macVersion': '1.0.2', 'maxEIRP': 12, 'name': 'OTAA', 'networkServerID': '1', 'organizationID': '1', 'regParamsRevision': 'B', 'rxDataRate2': 3, 'rxDelay1': 1, 'rxFreq2': 869525000, 'supportsClassB': False, 'supportsClassC': False, 'supportsJoin': True, 'tags': {}, 'uplinkInterval': '86400s'}}
19990b47-496e-4d82-a136-c0e6b208c401
docker_env_initializer-chirpstack-network-server-1 | time="2022-05-24T11:20:27.018020527Z" level=info msg="finished unary call with code OK" ctx_id=f1e56bfb-4dea-46f4-aa54-21e3ff8f0cec grpc.code=OK grpc.method=CreateDeviceProfile grpc.service=ns.NetworkServerService grpc.start_time="2022-05-24T11:20:27Z" grpc.time_ms=1.138 peer.address="172.23.0.7:50636" span.kind=server system=grpc docker_env_initializer-chirpstack-application-server-1 | time="2022-05-24T11:20:27.018256939Z" level=info msg="finished client unary call" ctx_id=d4489dbf-2ff6-414c-89bd-c50067e09ce9 grpc.code=OK grpc.ctx_id=f1e56bfb-4dea-46f4-aa54-21e3ff8f0cec grpc.duration=1.69279ms grpc.method=CreateDeviceProfile grpc.service=ns.NetworkServerService span.kind=client system=grpc docker_env_initializer-chirpstack-application-server-1 | time="2022-05-24T11:20:27.018306589Z" level=info msg="device-profile created" ctx_id=d4489dbf-2ff6-414c-89bd-c50067e09ce9 id=55832e6d-47a2-4f04-85a3-ce88bb8a3f52 docker_env_initializer-chirpstack-application-server-1 | time="2022-05-24T11:20:27.018822987Z" level=info msg="finished unary call with code OK" ctx_id=d4489dbf-2ff6-414c-89bd-c50067e09ce9 grpc.code=OK grpc.method=Create grpc.service=api.DeviceProfileService grpc.start_time="2022-05-24T11:20:27Z" grpc.time_ms=4.836 peer.address="127.0.0.1:57656" span.kind=server system=grpc
Latest ones you get through https://github.com/brocaar/chirpstack-docker/
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What happened?
Swagger docs on
/swagger/#!/DeviceProfileService/Create
show that the API accepts an"id"
fieldBut doing a request with that "id" field set to a specific UUID does not create the device profile under that given UUID, but a new random one.
What did you expect?
Device profile is created with "id" sourced from the API request.
Instead, code is hardcoded to ignore the "id" field and create a new UUID for every newly created device profile, see
chirpstack-application-server/internal/api/external/device_profile.go
Lines 98 to 102 in 9cf39fd
and
chirpstack-application-server/internal/storage/device_profile.go
Lines 59 to 76 in 9cf39fd
Steps to reproduce this issue
Steps:
/api/device-profiles
using JSON payload{'deviceProfile': {'adrAlgorithmID': 'default', 'factoryPresetFreqs': [868100000, 868300000, 868500000, 867100000, 867300000, 867500000, 867000000, 867900000], 'id': '19990b47-496e-4d82-a136-c0e6b208c401', 'macVersion': '1.0.2', 'maxEIRP': 12, 'name': 'OTAA', 'networkServerID': '1', 'organizationID': '1', 'regParamsRevision': 'B', 'rxDataRate2': 3, 'rxDelay1': 1, 'rxFreq2': 869525000, 'supportsClassB': False, 'supportsClassC': False, 'supportsJoin': True, 'tags': {}, 'uplinkInterval': '86400s'}}
and previously obtained authentication token19990b47-496e-4d82-a136-c0e6b208c401
)Could you share your log output?
Your Environment
Latest ones you get through https://github.com/brocaar/chirpstack-docker/
The text was updated successfully, but these errors were encountered: