Skip to content
New issue

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

CS Integration: Gateway Instances #24

Open
lthiery opened this issue Jul 28, 2021 · 0 comments
Open

CS Integration: Gateway Instances #24

lthiery opened this issue Jul 28, 2021 · 0 comments

Comments

@lthiery
Copy link
Contributor

lthiery commented Jul 28, 2021

On start, Packet Purchaser should get the list of gateways

GET /api/gateways

{
  "result": [
    {
      "createdAt": "2021-07-28T14:42:01.250Z",
      "description": "string",
      "firstSeenAt": "2021-07-28T14:42:01.250Z",
      "id": "string",
      "lastSeenAt": "2021-07-28T14:42:01.250Z",
      "location": {
        "accuracy": 0,
        "altitude": 0,
        "latitude": 0,
        "longitude": 0,
        "source": "UNKNOWN"
      },
      "name": "string",
      "networkServerID": "string",
      "organizationID": "string",
      "updatedAt": "2021-07-28T14:42:01.250Z"
    }
  ],
  "totalCount": "string"
}

We will just need track the "name" that it knows about already; this should be the hotspot pubkey.

When we buy a packet on behalf of Chirpstack, we will want to make sure that the "name"/pubkey is known to CS already. If it not known already, we want to add it before forwarding the frame:

POST /api/gateways

{
  "gateway": {
    "boards": [
      {
        "fineTimestampKey": "string",
        "fpgaID": "string"
      }
    ],
    "description": "string",
    "discoveryEnabled": true,
    "gatewayProfileID": "string",
    "id": "string",
    "location": {
      "accuracy": 0,
      "altitude": 0,
      "latitude": 0,
      "longitude": 0,
      "source": "UNKNOWN"
    },
    "name": "string",
    "networkServerID": "string",
    "organizationID": "string"
  }
}

The network server id and organization id must be known from #23 (ie: REGION_CONFIG = #{ "IN865" => {"networkServerID", "organizationID"}).

The location information may be given from the ledger "if it's easy". If it's extra work, I would skip it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant