https://github.com/eshikafe/paws
Protocol to Access White Space database
https://github.com/eshikafe/paws
https ietf json rpc tvws
Last synced: 2 months ago
JSON representation
Protocol to Access White Space database
- Host: GitHub
- URL: https://github.com/eshikafe/paws
- Owner: eshikafe
- Created: 2021-05-15T02:38:05.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-02T22:06:13.000Z (over 2 years ago)
- Last Synced: 2025-03-06T05:11:31.147Z (about 1 year ago)
- Topics: https, ietf, json, rpc, tvws
- Language: Rust
- Homepage:
- Size: 149 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PAWS
**PAWS** - Protocol to Access White Space database. It is based on [RFC 7545](https://datatracker.ietf.org/doc/rfc7545/).
## Setup
- Install [Rust](https://www.rust-lang.org/tools/install).
- Clone the repo: `git clone https://github.com/eshikafe/paws.git`
- Change directory: `cd paws`
- Development mode: Start the PAWS server with `cargo run --bin paws-server`
- Production mode: Run: `cargo build --release --bin paws-server` and `.\target\release\paws-server.exe`
- Access the API via URL `http://localhost:3030/v1beta/`
## How to create a binary
- `cd paws`
- `cargo build --release --bin paws-server`
## PAWS API Documentation
API version: `v1beta`.
This is the API documentation for the PAWS protocol.
## Endpoints
### Version
This endpoint returns the PAWS protocol version.
| Method | Path |
| :----- | :------------------- |
| `GET` | `/paws/version` |
Sample Request
```
curl --request GET localhost:3030/v1beta/paws/version
```
Sample Response:
```
{
"pawsVersion": "1.0"
}
```
### Initialization
This endpoint starts the PAWS `Initialization` request procedure. It allows you to send the PAWS `INIT_REQ` message. It returns a PAWS `INIT_RESP` message.
| Method | Path |
| :----- | :------------------- |
| `POST` | `/paws/init` |
Sample Request
```
curl --request POST localhost:3030/v1beta/paws/init \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "spectrum.paws.init",
"params": {
"type": "INIT_REQ",
"version": "1.0",
"deviceDesc": {
"serialNumber": "XXX",
"fccId": "YYY",
"rulesetIds": ["NccTvBandWhiteSpace-2019"]
},
"location": {
"point": {
"center": {"latitude": 37.0, "longitude": -101.3}
}
}
},
"id": "idString"
}'
```
Sample Response:
```
{
"jsonrpc": "2.0",
"result": {
"type": "INIT_RESP",
"version": "1.0",
"rulesetInfos": [
{
"authority": "ng",
"rulesetId": "NccTvBandWhiteSpace-2010",
"maxLocationChange": 100,
"maxPollingSecs": 86400
}
]
},
"id": "xxxxxx"
}
```