<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.webtv.zone/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Metering_protocol</id>
	<title>Metering protocol - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.webtv.zone/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Metering_protocol"/>
	<link rel="alternate" type="text/html" href="https://wiki.webtv.zone/mediawiki/index.php?title=Metering_protocol&amp;action=history"/>
	<updated>2026-05-04T16:15:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.webtv.zone/mediawiki/index.php?title=Metering_protocol&amp;diff=537&amp;oldid=prev</id>
		<title>Wtv-411: Created page with &quot;By the Summer 2000 upgrade, WebTV introduced a new protocol into their firmware that was used to track how long clients were online for. The protocol runs on top of UDP, and does not have an official name. It will be referred to as the &#039;&#039;&#039;Metering protocol&#039;&#039;&#039; on this page.  Metering was introduced in WebTV by client version 2.5 for all box models. This protocol and Mail Notify do not work on a hacked WebTV Viewer.  == Connecting ==  Once a WebTV/MSN TV client receives th...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.webtv.zone/mediawiki/index.php?title=Metering_protocol&amp;diff=537&amp;oldid=prev"/>
		<updated>2023-06-30T16:03:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;By the Summer 2000 upgrade, WebTV introduced a new protocol into their firmware that was used to track how long clients were online for. The protocol runs on top of UDP, and does not have an official name. It will be referred to as the &amp;#039;&amp;#039;&amp;#039;Metering protocol&amp;#039;&amp;#039;&amp;#039; on this page.  Metering was introduced in WebTV by client version 2.5 for all box models. This protocol and Mail Notify do not work on a hacked WebTV Viewer.  == Connecting ==  Once a WebTV/MSN TV client receives th...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;By the Summer 2000 upgrade, WebTV introduced a new protocol into their firmware that was used to track how long clients were online for. The protocol runs on top of UDP, and does not have an official name. It will be referred to as the &amp;#039;&amp;#039;&amp;#039;Metering protocol&amp;#039;&amp;#039;&amp;#039; on this page.&lt;br /&gt;
&lt;br /&gt;
Metering was introduced in WebTV by client version 2.5 for all box models. This protocol and Mail Notify do not work on a hacked WebTV Viewer.&lt;br /&gt;
&lt;br /&gt;
== Connecting ==&lt;br /&gt;
&lt;br /&gt;
Once a WebTV/MSN TV client receives the [[WTVP/Processes/Headwaiter/Final_Responses|final headwaiter response]], it will check for the presence of a few headers from it to decide if it can connect to the Metering server. The following headers have to be in the headwaiter response in order for the client to connect to Metering:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;wtv-metering-pricing: true&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;wtv-metering-pricing-interval: [number of seconds]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;wtv-metering-pricing-sessionID: [30-byte ID string]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;wtv-metering-pricing-track-as-free: [true/false]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These headers tell the client to enable metering, set the interval in seconds to wait in between sending packets, a 30-byte session ID to use to identify itself to the Metering server, and a &amp;quot;track-as-free&amp;quot; header which serves an as of yet unknown purpose. A wtv-service with the name &amp;lt;code&amp;gt;wtv-census-udp&amp;lt;/code&amp;gt; also has to be present, which is a UDP server running on port 1657 that the client will connect to for Metering. The client will then connect to the Metering server and start sending packets to it.&lt;br /&gt;
&lt;br /&gt;
== Packet structure ==&lt;br /&gt;
&lt;br /&gt;
The packets sent to the Metering server are in a binary format. All packets sent to the Metering server are 58 bytes long. All integer values sent in these packets are packed in big endian.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 2 bytes&lt;br /&gt;
| Type of packet. This is &amp;lt;code&amp;gt;0x0002&amp;lt;/code&amp;gt; for reporting metering data, and &amp;lt;code&amp;gt;0x0003&amp;lt;/code&amp;gt; for an unclear purpose (restarting the metering session?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 2 bytes&lt;br /&gt;
| Likely a 16-bit sequence ID. Increments by 1 for every unique packet sent to Metering&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 4 bytes&lt;br /&gt;
| Integer. Seconds elapsed since logged into WebTV/MSN TV. Increases by the number specified in the &amp;lt;code&amp;gt;wtv-metering-pricing-interval&amp;lt;/code&amp;gt; header for every new packet&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 4 bytes&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x0c&lt;br /&gt;
| 30 bytes&lt;br /&gt;
| The session ID specified in &amp;lt;code&amp;gt;wtv-metering-pricing-sessionID&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x2a&lt;br /&gt;
| 16 bytes&lt;br /&gt;
| MD5 hash of the first WTVP session key sent to the client in the [[WTVP/Processes/Headwaiter#Challenge/Response|challenge response]] and the first 0x2A bytes of the packet&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Official clients (at least build 2.6) will send a single packet 3 times to the UDP server, possibly to ensure that the packet actually goes through. The server also does not appear to have to send any responses back to the client, as official clients do not respond to any packets sent from the server, and a decompilation of the firmware reveals that the callback for receiving data does not do anything for Metering.&lt;/div&gt;</summary>
		<author><name>Wtv-411</name></author>
	</entry>
</feed>