Talk:Pocket Minecraft Protocol: Difference between revisions

From wiki.vg
Jump to navigation Jump to search
imported>Bobtwinkles
No edit summary
imported>Bobtwinkles
No edit summary
(No difference)

Revision as of 03:32, 27 December 2011

Got 0x1c when I sent 0x02 to a server

I've been playing around with this protocol and acting as a connecting client, I found that the protocol seems to be different than what is listed on this page. I sent these hex values to my iPod running Minecraft PE (full) v0.1.2 alpha: 02 00 00 00 00 00 a1 a2 41 00 ff ff 00 fe fe fe fe fd fd fd fd 12 34 56 78. It replied with 1c 00 00 00 00 00 a1 a2 41 00 00 00 00 79 1b 2d 6d 00 ff ff 00 fe fe fe fe fd fd fd fd 12 34 56 78 00 0b 4d 43 43 50 50 3b 44 65 6d 6f 3b 00 00 00 00 00 00 or 1c 00 00 00 00 00 a1 a2 41 00 00 00 00 79 1b 2d 6d 00 ff ff 00 fe fe fe fe fd fd fd fd 12 34 56 78 00 11 4d 43 43 50 50 3b 44 65 6d 6f 3b 6f 78 67 75 79 33. This is almost exactly like 0x0d, but it's got a different ID - 0x0c.


Here's a more readable way of writing this. I sent:

  • int8 = 0x02 (packet type ID)
  • int64 = ping ID
  • MAGIC


The server replied:

  • int8 = 0x1c (packet type ID)
  • int64 = ping ID from client
  • int64 = unknown (server ID??), 00 00 00 00 79 1b 2d 6d
  • MAGIC
  • int8 = 0x00
  • int8 = 0x11 is server is visible, 0x0b if server is invisible
  • the string "MCCPP;Demo;username" (username is omitted if invisible)

Make of this what you will. I'm hoping to do more protocol analysis with two devices running Minecraft PE soon. -Oxguy3 20:58, 1 December 2011 (MST)

Oh yeah, also, usernames are limited to 24 characters max, a client listening for 0x1c packets should capture a total of 70 bytes to avoid cutting off the username (my capture above was only 52 because I hadn't figured out the username stuff then). -Oxguy3 21:02, 1 December 2011 (MST)
I also received a 0x1C when contacting Minecraft PE 1.3 lite. However, the second to last field (the one that switched between 0x11 and 0x0B) came back as a 15 for me (server was visible). --Bobtwinkles 20:32, 26 December 2011 (MST)
AHA. Figured out the two int8s after the MAGIC in the 0x1C packet. It's the size of the string. The difference you observed was the string getting shorter because the username was omitted. So they are actually on int16--Bobtwinkles 20:32, 26 December 2011 (MST)