Author Topic: 21 Byte UDP Beacon Packet?  (Read 468 times)

millennial

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
21 Byte UDP Beacon Packet?
« on: January 29, 2017, 04:20:51 pm »
I set up a Node.js UDP server on my LAN and noticed a repetitious 21 byte packet is being sent by the mc-Gateway. Could the mc-Things team throw up a quick table documenting what the bytes mean? I know the User Data bytes are the Gateway's local IP address, but I am curious about the 8 bytes after the IP address.

Share on Facebook Share on Twitter


mc-T2

  • Administrator
  • Sr. Member
  • *****
  • Posts: 252
  • mc-Things! The opportunities are endless!
  • Location: Canada
    • View Profile
Re: 21 Byte UDP Beacon Packet?
« Reply #1 on: February 01, 2017, 04:21:35 pm »
The length of the beacon is 17 bytes (Described in the mcBeacon white paper) and that is the beacon that you want to pay attention to

Beacons start with : 0016010D

The 21 byte packet is a system message and should be ignored, there is no data that can sent in this packet. It is used for internal synchronization if there are multiple gateways.
Need more mc-Modules, mc-Gateways or other mc-Things? Check out our product page: www.mcthings.com/products. mc-Development kits are available too!
Check out a live Dashboard using mcThings and Losant! Click here: https://goo.gl/ST43hB

millennial

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: 21 Byte UDP Beacon Packet?
« Reply #2 on: February 03, 2017, 09:14:46 am »
The length of the beacon is 17 bytes (Described in the mcBeacon white paper) and that is the beacon that you want to pay attention to

Beacons start with : 0016010D

I understand all of this.

Are you saying there is no significance to anything in the "gatewayUID" field (I am using this name only because that is what the mc-Mod beacon uses) and aptly named "extraBytes" field of the following 21 byte mc-Gateway "pseudo-beacon?"

{
  "protocolVersion": 0,
  "messageType": 100,
  "messageVersion": 1,
  "messageSize": 17,
  "uid": 70556, (My mc-Gateway ID: "0x0001139c")
  "beaconBytes": 3232241325, (Found out to be my mc-Gateway LAN IP: "192.168.22.173")
  "RSSI": 107,
  "gatewayUID": 107521, (Since a mc-Gateway does not have a gateway, what does this number - 0x0001a401 - signify?)
  "extraBytes": 2416444928 (These are the last 4 bytes - 0x90080600 - Not sure if they should be interpreted as individual bytes, shorts, or all together. Perhaps a 144.8.6.0 interpretation makes more sense. Please clarify)
}

Please satisfy my curiosity for the gatewayUID and extraBytes field in this 21 byte "pseudo-beacon." Perhaps I may find an unseen use for that data.

millennial

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: 21 Byte UDP Beacon Packet?
« Reply #3 on: February 03, 2017, 09:16:08 am »
The 21 byte packet is a system message and should be ignored, there is no data that can sent in this packet. It is used for internal synchronization if there are multiple gateways.

I do not need to send data in this packet. I am using the 21 byte packet in an automated system that discovers what devices I intend to deploy. Automation is much better than manual entry.