From: Stephen W. <sa...@us...> - 2003-10-30 04:17:46
|
I have the following packet description: PACKET {'readwrite': 0x0d} sanyoheader: 1 UINT readwrite 1 UINT command 1 UINT packettype PACKET phonebookentry: 2 UINT slot 2 UINT slotdup 16 STRING name * LIST {'length': 7} numbers: 1 UINT number_len 49 STRING number 1 UINT email_len 49 STRING email 1 UINT url_len 49 STRING url 1 UINT secret 1 UINT name_len PACKET phonebookslotresponse: * sanyoheader header * phonebookentry entry 30 UNKNOWN pad When I try to read a packet with names less than 16 characters, it works (the phone pads fields with nulls). But on the following packet, with a 16 character name, I get an error. Are there some attributes to STRING that I can add that will help? The length of the string is available in the packet, but is not located adjacent to the string itself. Steve |