> That's it. If I change 5 to 6 and load the image the settings tab is
> available and the PTT-ID #1 is displayed as "1f0202" (6 characters
> long).

Okay, but just to be clear, the problem is not that it should be be 6
characters long, but that the 1F hex value is being rendered into the
string as two characters, right? I think you know this, but just making
sure...

Right. 1F is the problem.
 

I'm guessing that 0x1F is a sentinel value, which would be a five-bit
field of all ones (00011111).

> Plus while testing, I just discovered that the Baofeng software also
> allows *, #, A, B, C and D in addition to the 10 digits.

Ah, good to know :)

Will this fix it?

diff -r b6bca3fba0e9 chirp/uv5r.py
--- a/chirp/uv5r.py     Mon Apr 01 17:15:57 2013 -0700
+++ b/chirp/uv5r.py     Mon Apr 01 17:30:29 2013 -0700
@@ -1055,12 +1055,13 @@

         dtmf = RadioSettingGroup("dtmf", "DTMF Settings")
         group.append(dtmf)
+        dtmfchars = "0123456789*#ABCD"

         for i in range(0, 15):
             _codeobj = self._memobj.pttid[i].code
-            _code = "".join(["%x" % x for x in _codeobj if int(x) !=
0xFF])
+            _code = "".join([dtmfchars[x] for x in _codeobj if int(x)
< 0x1F]) val = RadioSettingValueString(0, 5, _code, False)
-            val.set_charset("0123456789")
+            val.set_charset(dtmfchars)
             rs = RadioSetting("pttid/%i.code" % i, "PTT ID Code %i" %
(i + 1), def apply_code(setting, obj):
                 code = []


It allows the characters to be read from the radio. But I get the following error when keying in the extended characters.
Error in setting value: invalid literal for int() with base 10: 'A' 
or '*' or '#' or 'B' or 'C' or 'D'. Clicking the [OK] button clears the error and enters the character in the field. The extended characters do not get uploaded to the radio.

Jim