Landis+Gyr GridStream Protocol: Difference between revisions
| Line 9: | Line 9: | ||
===Packet Structure=== | ===Packet Structure=== | ||
====Sync | ====Sync and Header==== | ||
----The sync word that the Landis+Gyr smart meters send is shown below, this can be used in GNU Radio or other tools to receive only packets transmitted by the meters. Note that at the start of the header we begin using start and stop bits. These must be stripped off the the data during processing. | |||
{| class="wikitable" | |||
|+Sync and Header | |||
! colspan="6" |Sync | |||
! colspan="3" |Header | |||
|- | |||
!0xAA | |||
!0xAA | |||
10101010 10101010 10101010 10101010 | !0xAA | ||
!0xAA | |||
!0xAA | |||
!0xA | |||
!0x00 | |||
!0xFF | |||
!0x2A | |||
|- | |||
|10101010 | |||
|10101010 | |||
|10101010 | |||
|10101010 | |||
|10101010 | |||
|1010 | |||
|0 '''00000000''' 1 | |||
|0 '''11111111''' 1 | |||
|0 '''00101010''' 1 | |||
|} | |||
Using GNU Radio it was found that shortening the Sync requirements a bit and incorporating part of the header leads to the cleanest data for further downstream processing. The modified sync shown in 8 bit chunks is shown below. | |||
{| class="wikitable" | |||
|+Sync Word used with GNURadio | |||
!0xAA | |||
!0xAA | |||
!0xAA | |||
!0xAA | |||
!0xA0 | |||
!0x05 | |||
!0xFF | |||
|- | |||
|10101010 | |||
|10101010 | |||
|10101010 | |||
|10101010 | |||
|10100000 | |||
|00000101 | |||
|11111111 | |||
|} | |||
The final byte of the sync (0x2A) along with it's start and stop bits are discarded as part of the processing. | |||
----<br /> | |||
====Type, Length and Sub Type==== | ====Type, Length and Sub Type==== | ||
----Add data here | |||
<br /> | |||
----<br /> | |||
====Data==== | ====Data==== | ||
----Add data here | |||
----<br /> | |||
====Checksum==== | ====Checksum==== | ||
<br /> | <br /> | ||
| Line 345: | Line 381: | ||
{| class="wikitable" | {| class="wikitable" | ||
|+0xD5 Captured packet | |+0xD5 Captured packet | ||
! rowspan="3" |Pkt | |||
!1 | |||
!2 | |||
!3 | |||
| | |||
!4 | |||
!5 | |||
!6 | |||
!7 | |||
!8 | |||
!9 | |||
!10 | |||
| | |||
!11 | |||
!12 | |||
|- | |||
! colspan="3" |Not part of CRC calc | |||
| | |||
! colspan="7" |Data | |||
| | |||
! | ! | ||
! | |||
|- | |||
!Header | !Header | ||
!Type | !Type | ||
!Length | !Length | ||
| | |||
!SubType | !SubType | ||
!Meter ID #1 | !Meter ID #1 | ||
| Line 356: | Line 415: | ||
!Unknown | !Unknown | ||
!Unknown | !Unknown | ||
| | |||
!CRC | !CRC | ||
!Trailing | !Trailing | ||
|- | |- | ||
| | |1 | ||
|00FF2A | |00FF2A | ||
|D5 | |D5 | ||
|0016 | |0016 | ||
! | |||
|21 | |21 | ||
|F05FCB84 | |F05FCB84 | ||
| Line 370: | Line 431: | ||
|273205 | |273205 | ||
|00781930 | |00781930 | ||
! | |||
|CB72 | |CB72 | ||
|00 | |00 | ||
| Line 379: | Line 441: | ||
<code>3) Packet Length = 0x0016</code> | <code>3) Packet Length = 0x0016</code> | ||
<code>4) Unknown | <code>4) Unknown = 0x21</code> | ||
<code>5) Meter ID #1 = F05FCB84</code> | <code>5) Meter ID #1 = F05FCB84</code> | ||
| Line 385: | Line 447: | ||
<code>6) Meter ID #2 = F0FC4DB1</code> | <code>6) Meter ID #2 = F0FC4DB1</code> | ||
<code>7) Unknown | <code>7) Unknown = 0xE288</code> | ||
<code>8) Unknown | <code>8) Unknown = 0x0100</code> | ||
<code>9) Unknown | <code>9) Unknown= 0x273205</code> | ||
<code>10) Unknown | <code>10) Unknown = 0x00781930</code> | ||
<code>11) Checksum = 0xCB72</code> | <code>11) Checksum = 0xCB72</code> | ||