Re: [lwip-users] Encoding problem for received packet?

2014-06-18 Thread Sergio R. Caprile
Mike:
What you say is a bit confusing, I suggest you see bytes and check bytes
instead of who knows what.
I mean, \365 looks like octal, so maybe you are taking something from
somewhere and displaying in someotherwhere by doing someotherthing in
between, and maybe you are scrambling something in between and don't
realize.
There si no encoding nor the concept of that, either on lwip or on
TCP/IP today. You send bytes, you get bytes, so try to use a debugger
and watch memory first. (Words may have endianness issues, but lets
leave it on bytes for now since this is ASCII text).
If Wireshark shows the packet is correct (at the byte level), then you
should get your TCP payload out of the tcp_recv receiving function,
inside a pbuf p, at p-payload.


___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


[lwip-users] Encoding problem for received packet?

2014-06-17 Thread Mike He

I have a small Websocket server running on lwip on an embedded system.

In this example, I send a simple Websocket text frame to the server, 
containing only the word test. When I inspect the payload on the 
server, however, I get something like the following: 
\201\204\331\271\206\201\255\334\365\365


Looking at the packet with Wireshark, it appears that the packet is 
correctly formed and simply contains the payload test as expected. Am 
I missing something with the encoding?


Thanks,
Mike

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users