To begin with, beginners need to know exactly what the URL frame contains and here is the details:
The first 9 bytes of the frame are just prefix. To check the content of the prefix value, see the picture below:
The 10th and 11th byte is constant having the value "AAFE". And starting on the 12th byte is the actual eddystone frame which is broken down into the following:
Frame Specification
Byte offset | Field | Description |
---|---|---|
0 | Frame Type | Value = 0x10 |
1 | TX Power | Calibrated Tx power at 0 m |
2 | URL Scheme | Encoded Scheme Prefix |
3+ | Encoded URL | Length 1-17 |
The URL prefix have constant designated values:
URL Scheme Prefix
The URL Scheme Prefix byte defines the identifier scheme, an optional prefix and how the remainder of the URL is encoded.
Decimal | Hex | Expansion |
---|---|---|
0 | 0x00 | http://www. |
1 | 0x01 | https://www. |
2 | 0x02 | http:// |
3 | 0x03 | https:// |
The URL Expansion also have constant values:
Decimal | Hex | Expansion |
---|---|---|
0 | 0x00 | .com/ |
1 | 0x01 | .org/ |
2 | 0x02 | .edu/ |
3 | 0x03 | .net/ |
4 | 0x04 | .info/ |
5 | 0x05 | .biz/ |
6 | 0x06 | .gov/ |
7 | 0x07 | .com |
8 | 0x08 | .org |
9 | 0x09 | .edu |
10 | 0x0a | .net |
11 | 0x0b | .info |
12 | 0x0c | .biz |
13 | 0x0d | .gov |
14..32 | 0x0e..0x20 | Reserved for Future Use |
127..255 | 0x7F..0xFF | Reserved for Future Use |
And the remaining strings in url are converted to hex ascii codes. The URL is 17 bytes including the expansion value.
Here is the raw data from nRF Connect App:
To Interpret the data
Byte offset | Field | Value |
---|---|---|
0 | Frame Type | 0x10 |
1 | TX Power | 0x04 |
2 | URL Scheme | 0x00 = "http://www." |
3+ | Encoded URL | 0x06D696E65777465636807 The last 2 digits "07" is the URL extension for ".com" |
http://www.unit-conversion.info/texttools/hexadecimal/#data
Combining the decoded data that we will get "http://www.minewtech.com"
Very good thanks
ReplyDelete