Sigfox Setup - Newbie Question

GoingNutzo6 months ago

Hi All,
Expecting a kick in the butt for asking this, but as a newbie can I please get some clarification on the setup for a URL callback in Sigfox to Traccar Demo server? I can't seem to get it to register with the Traccar Demo4 server at all, device name has been confirmed right.

Currently in the Sigfox backend I have the following:

Type: DATA, UPLINK
Channel: URL

Url Pattern: https://demo4.traccar.org:5154/?id={device}&data={data}&seqNumber={seqNumber}&time={time}

Use HTTP Method: POST

Send SNI: Ticked

Headers: Header(blank), Value(blank)

Content type: application/x-www-form-urlencoded

Body:

{
    "device":"{device}",
    "data":"{data}",
    "seqNumber:"{seqNumber}",
    "time":"{time}"
}

Anything in particular in the above that I'm missing that might be causing me this much grief?

I'm sort of suspecting it requires it to be Parsed first.

Any help would be greatly appreciated.

Thank you.

Anton Tananaev6 months ago

One problem I see right away is that you're trying to use HTTPS instead of HTTP.

GoingNutzo6 months ago

Thank you Anton, I'll give that a shot :)

GoingNutzo6 months ago

Didn't get much luck with that little change. May I please confirm that no parsing is required from the Sigfox backend to the Traccar side via the Callback function? Newbie question but just like to make sure, I've got another theory as to what the issue is but will have to try that in the morning.

Anton Tananaev6 months ago

I think we support both.

GoingNutzo6 months ago

Hi All,
Ok, for anyone that hits this and doesn't know how to go about it in the Sigfox Backend the solution in the end was the following:

Setup a group call back:

Type: DATA, UPLINK
Channel: URL

Custom payload config: lat::float:32 lng::float:32

Url Pattern: http://demo4.traccar.org:5055/?id={device}&seqNumber={seqNumber}&time={time}&lat={customData#lat}&lng={customData#lng}

Use HTTP Method: POST

Send SNI: Ticked

Headers: Header(blank), Value(blank)

Content type: application/json

Body:

{
   "id":"{device}",
   "data":"{data}",
   "seqNumber":"{seqNumber}",
   "time":"{time}",
   "lat":"{customData#lat}",
   "lng":"{customData#lng}"
}

Feel free to change around those custom payloads etc, but after a few days this is what ended up working for me and hopefully make it easier for someone else in the future.

Anton Tananaev6 months ago

If you are using OsmAnd protocol, you probably don't need any payload at all.

GoingNutzo6 months ago

Sorry do you mean the custom payload bit?

I found without that field it was sending the hex through to Traccar Sigfox protocol and it was being rejected:

[ERROR]

600 - Connection closed by peer - #4

POST http://demo4.traccar.org:5154/ HTTP/1.1
content-length: 326
accept-language: fr
host: demo4.traccar.org:5154
content-type: application/x-www-form-urlencoded
accept-encoding: gzip,deflate
accept-charset: UTF-8;q=0.9,*;q=0.7
user-agent: SIGFOX

id=82F1BC&data=34300000c73100008024b610&seqNumber=262&time=1636601576&lat=1.6391277E-7&lng=-45312.0&%7B%0D%0A+++%22id%22%3A%2282F1BC%22%2C%0D%0A+++%22data%22%3A%2234300000c73100008024b610%22%2C%0D%0A+++%22seqNumber%22%3A%22262%22%2C%0D%0A+++%22time%22%3A%221636601576%22%2C%0D%0A+++%22lat%22%3A%221.6391277E-7%22%2C+%0D%0A+++%22lng%22%3A%22-45312.0%22%0D%0A%7D=

Then again might be a newbie issue, just happy I got it to talk to each other was dreading a third party software to do the decoding.