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

Fix/15/abp config #16

Merged
merged 3 commits into from
Apr 24, 2020
Merged

Fix/15/abp config #16

merged 3 commits into from
Apr 24, 2020

Conversation

starsky35
Copy link

Hi,

I propose to change the parameter name as packet.TMMS , as it specified in the spec for gps time and leave it in ms as it was. Indeed the fix still fails on TMST because of the precision (uint32 is expected).

I noticed also a build issue in go.mod, because of the slash :
github.com/brocaar/chirpstack-api/go/ , typo error I think.

That's it !

@scartill
Copy link
Collaborator

@starsky35 , I don't perfectly catch the idea of uint32 data type. Whatever inside, packet metadata is sent via JSON, which now is set to proper precision. My aim was to match the sample in the spec:

{"rxpk":[
	{
		"time":"2013-03-31T16:21:17.528002Z",
		"tmst":3512348611,
		"chan":2,
		"rfch":0,
		"freq":866.349812,
		"stat":1,
		"modu":"LORA",
		"datr":"SF7BW125",
		"codr":"4/6",
		"rssi":-35,
		"lsnr":5.1,
		"size":32,
		"data":"-DS4CGaDCdG+48eJNM3Vai-zDpsR71Pn9CPA9uCON84"
	}
```...

@starsky35
Copy link
Author

@starsky35 , I don't perfectly catch the idea of uint32 data type. Whatever inside, packet metadata is sent via JSON, which now is set to proper precision. My aim was to match the sample in the spec:

{"rxpk":[
	{
		"time":"2013-03-31T16:21:17.528002Z",
		"tmst":3512348611,
		"chan":2,
		"rfch":0,
		"freq":866.349812,
		"stat":1,
		"modu":"LORA",
		"datr":"SF7BW125",
		"codr":"4/6",
		"rssi":-35,
		"lsnr":5.1,
		"size":32,
		"data":"-DS4CGaDCdG+48eJNM3Vai-zDpsR71Pn9CPA9uCON84"
	}
```...

Yep, I agree with your aim. As far as I understand the variable tmst should fit with 32 unsigned bits otherwise server may discard the uplink frames (like chirpstack does) because variable precision is checked. In the fix, tmst variables seems still to be in 64 bits and I got error from chirpstack.

Name Type Function
time string UTC time of pkt RX, us precision, ISO 8601 'compact' format
tmms number GPS time of pkt RX, number of milliseconds since 06.Jan.1980
tmst number Internal timestamp of "RX finished" event (32b unsigned)

@scartill
Copy link
Collaborator

I believe I got it.

  1. Moved milliseconds fot tmms
  2. Used seconds for tmst

Works with lorawan-server, please check with Chirpstack. Many thanks!

@scartill
Copy link
Collaborator

@starsky35 does Chirpstack accept?

@starsky35
Copy link
Author

@scartill , yes I did not get error so far ;-)

@scartill scartill merged commit 28e7c00 into master Apr 24, 2020
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

Successfully merging this pull request may close these issues.

2 participants