Closed lukeeey closed 7 years ago
I'm also not sure how to decode the unconnected ping packet then send the unconnected pong packet :/
the unconnected ping response is done natively by RakNet
Server.cpp : PeerInterface->SetOfflinePingResponse(message.c_str(), message.size());
Well clearly not, since the client sends a 0x01, which i need to read a long from and then send a 0x1c with that long. Apparently.
0x01 is the only packet sent from the client and the client goes to an outdated server screen after 10 seconds.
I know 0x01 is also the LogjnPacket ID, but MCPE packets are wrapped in a batch packet (0xFE), and i dont receive one of those.
0x01: http://wiki.vg/Pocket_Edition_Protocol_Documentation#Unconnected_Ping
The wiki does not list 0x1c, but i was told by someone the pong is that
Well tbh i have no idea what im talking about. https://github.com/ProjectKatana/Katana.
My other problem is i dont know how to read or write bytes using RakNet :/
@StormxBlur I also get an outdated server message when my mcpe version protocol is 137
are you launching your server and minecraft on the same device ?
Yes but that is never a problem with PMMP and it shouldnt be saying outdated server.
Change your protocol number to 107 it will work
MCPE tells you that the server is outdated if your protocol number is not the same as the server protocol number
You aren't looking at my screenshots. The client tells me the protocol is 137, so i set it to 137 on the server.
I have the same protocol number (137) in my game and i still use 107 and it works. Protocol 137 that MCPE gives you is Internal raknet protocol Number.
I was told i need to change the Unconnected Pong ID from 0x02 to 0x1c in the RakNet source.
Raknet manage natively Offlinepingresponse you have nothing to change at all.
I'm aware but still. I can't find where the ID_UNCONNECTED_PONG id is actually defined.
There is something you dont understand, ID_UNCCONECTED_PONG is not handled like the other Raknet native packets. You are searching the problem not in the correct place. Your packet is sent successfully the only thing that is wrong is you MCPE_PROTOCOL that should be equal to 107.
Nope.
haha mybad i thought u were having trouble to get the server displayed in the server list.
The unconnected ping / pong packets are for lan discovery not for the server connection. it changes nothing the connection system.
If MCPE tells you that server is outdated its simply because you havent added the client connection handling.
But the only packet i receive is the 0x01 ping packet wtf do i do to receive more packets
For me when i just read packets, if i connect to my server i get 0x13 & 0xFE
Will you continue to work on this by adding packet handling?