This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

6 bit ASCII representation

0

Hi, Can I display the raw data in content packet in 6 bit ASCII instead of the 8 bit ASCII which presented as default?

Thank you

asked 30 Jun '13, 15:37

morton's gravatar image

morton
11335
accept rate: 0%

edited 02 Jul '13, 18:13

cmaynard's gravatar image

cmaynard ♦♦
9.4k1038142

What do you mean by "6-bit ASCII" and "raw data"? ASCII is a 7-bit character set; Wireshark should, in the hex/ASCII dump pane, be displaying printable characters that have the 8th bit clear as their ASCII values and should be displaying everything else, whether it's non-printable ASCII or is a byte with the 8th bit set, as a ".".

(30 Jun '13, 17:01) Guy Harris ♦♦

In the Hex/ASCII dump pane the values are presented in 8-bit ASCII format. Apparently in the world there is also 6-BIT ASCII format. Can I configure wireshark to display the data in this pane in this format?

Thank you

(01 Jul '13, 08:08) morton

Apparently in the world there is also 6-BIT ASCII format.

Can you please add an example where 6-bit ASCII is needed (maybe a network protocol supported by Wireshark)?

(01 Jul '13, 21:31) Kurt Knochner ♦

4 Answers:

2

Apparently in the world there is also 6-BIT ASCII format.

Yes, there is, if your part of the world is running ancient versions of various DEC operating systems - where "ancient" means "from the 1960's", not "from the 1980's" or "from the 1990's".

Nobody's contributed any dissectors for what network protocols they used, if any (DECNET dates back from a time after DEC started using 7-bit ASCII; the DECNET Data Access Protocol doesn't seem to have any support for 6-bit "half-ASCII"), and nobody's contributed any code to support displaying various encodings of 6-bit "half-ASCII" in whatever way it's put into 8-bit bytes, so, no, there's no way to display "half-ASCII" in the hex/ASCII pane in Wireshark.

The ECMA 6-bit character code has a URL with the word "WITHDRAWN" in it, and dates back to 1963, so it's also ancient.

The only way you'll ever see any support for any such "half-ASCII" encoding in the hex/text pane would be if a specification for the way in which that encoding works with 8-bit bytes were supplied to us and if that encoding mechanism put one 6-bit character into every 8-bit byte; if it tries to, for example, pack 8 6-bit characters into 6 8-bit bytes, that's unlikely ever to be supported.

If a specification for a protocol using a "half-ASCII" of that type were provided, a dissector for it might be implemented; you wouldn't see that in the hex/text pane, but you would see it in the packet details pane.

(Note that a 6-bit version of ASCII wouldn't be ASCII; ASCII has 128 code points, and you can't fit that into 6 bits without some escape scheme, as a 6-bit character can only contain one of 64 possible values, 0 to 63.)

answered 01 Jul '13, 09:13

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%

0

There are 6-bit character codes, however, there is (currently) no support for those character representations in Wireshark.

answered 01 Jul '13, 08:18

SYN-bit's gravatar image

SYN-bit ♦♦
17.1k957245
accept rate: 20%

0

@morton: If you are talking about NMEA AIS messages, then they are indeed '6-bit ASCII' encoded.

6-bit ASCII explanation and samples

http://www.bosunsmate.org/ais/
http://www.it-digin.com/blog/?p=20

NMEA information

http://en.wikipedia.org/wiki/NMEA_0183
http://www.nmea.org/content/nmea_standards/nmea_0183_v_410.asp

However, there is no NMEA support in Wireshark, hence no way to 'translate' the 8-bit ASCII representation to AIS 6-bit ASCII.

Regards
Kurt

answered 01 Jul '13, 21:54

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

edited 02 Jul '13, 03:30

Well, more like "6-bit subset of ASCII"; you can't fit all of ASCII into 6 bits per character. Subtract 48 doesn't work for control characters or for SP through /, as the result is negative.

(02 Jul '13, 00:20) Guy Harris ♦♦

I know, but 'they' reference 'their' encoding as 6 bit ASCII (or at least the guys who wrote about it - as I don't have access to the specs I can't verify it. That's why I mentioned it here, just in case...

(02 Jul '13, 00:33) Kurt Knochner ♦

0

The spec is here: https://www.itu.int/rec/R-REC-M.1371/en or ESR created AIVDM.html

My decoder for AIS is here: https://github.com/schwehr/libais

Or GPSD would also be a decent choice for a decoder.

answered 12 Sep '16, 16:43

schwehr's gravatar image

schwehr
61
accept rate: 0%