Right, that's my change. Does the USSD path in the plugin know the length of the text, or does it have to derive the text length from the length of the hex string? If it doesn't know the length, it's going to have the same problem I was seeing with SMS messages prior to this change, where gsm_unpack() couldn't tell if a trailing 7-byte block had 7 or 8 GSM7 characters in it.
- Nathan On Wed, Nov 9, 2011 at 5:48 AM, Graham Inggs <graham.in...@uct.ac.za> wrote: > I've found that prior to the following commit: > > http://cgit.freedesktop.org/ModemManager/ModemManager/commit/src/mm-charsets.c?id=d05c87e4c80f1a56a613241d14de4faeb0a8304a > > ...gsm_unpack() in src/mm-charsets.c took the number of encoded characters > as input, now it takes the number of decoded characters as input. > > > On 07/11/2011 21:50, Graham Inggs wrote: >> >> I believe the cause of this problem is that the output string of >> gsm_unpack() needs to be larger than the input string. We get 8 >> characters out for every 7 input characters. >> >> I have attached a simple patch to /plugins/mm-modem-huawei-gsm.c which >> results in the full USSD response being returned. >> >> I am not sure that this patch is the correct fix. It may be that >> gsm_unpack() in src/mm-charsets.c needs take the 8/7 growth into >> account when sizing the output array and returning the unpacked size. >> Would someone more familiar with src/mm-charsets.c offer some guidance >> please? >> >> >> On Fri, Nov 4, 2011 at 8:44 AM, Graham Inggs<graham.in...@uct.ac.za> >> wrote: >>> >>> Tested with Huawei E1820. >>> >>> ussdresult = gsmussd.Initiate("*101#") >>> print "ussd response: %s" % ussdresult >>> >>> ussd response: Balance = R 9.50 Expiry date:02/05/2031.On-Net Minutes >>> = 01:16:00.Free SMS's = 51.Free Data = 100.00 MB.Free Da >>> >>> The full response should have been: >>> >>> Balance = R 9.50 Expiry date:02/05/2031.On-Net Minutes = >>> 01:16:00.Free SMS's = 51.Free Data = 100.00 MB.Free Data = 2007.44 MB. >>> >>> Partial ModemManager log: >>> >>> modem-manager[3316]:<debug> [1320384816.466178] >>> [mm-at-serial-port.c:298] debug_log(): (ttyUSB0): --> >>> 'AT+CUSD=1,"AA182C3602",15<CR>' >>> modem-manager[3316]:<debug> [1320384816.504610] >>> [mm-at-serial-port.c:298] debug_log(): (ttyUSB0):<-- >>> '<CR><LF>OK<CR><LF>' >>> modem-manager[3316]:<debug> [1320384816.818950] >>> [mm-at-serial-port.c:298] debug_log(): (ttyUSB2):<-- >>> '<CR><LF>^RSSI:16<CR><LF>' >>> modem-manager[3316]:<debug> [1320384816.819316] >>> [mm-at-serial-port.c:298] debug_log(): (ttyUSB2):<-- >>> '<CR><LF>^CSNR:-77,-7<CR><LF>' >>> modem-manager[3316]:<debug> [1320384818.431324] >>> [mm-at-serial-port.c:298] debug_log(): (ttyUSB2):<-- '<CR><LF>+CUSD: >>> >>> 0,"C2303BEC1E97413D90149473D5602050110F4FCBF32072985ED6C1642F58ED2583CD62AEA7BBE52CD341CDB4BB4E2FCF413D102CA68BD9743098CB282F9741D3E6F43407F540B598CB282F9741C4303D0CEA816230980B060335852EA3BC5C0611C3F430A80792C16037178D066A0A5D",15<CR><LF>' >>> > > _______________________________________________ > networkmanager-list mailing list > networkmanager-list@gnome.org > http://mail.gnome.org/mailman/listinfo/networkmanager-list > _______________________________________________ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list