Project

General

Profile

USSD failure

Added by lucase over 8 years ago

Dear Support,

I'm writing in order to get USSD codes running.
Error:
Unsupported feature: UssdFeature: Send USSD command to the network (Error in command AT+CUSD=1,"*100#",15 : ERROR )

I'm using code:
UssdRequest ussdRequest = new UssdRequest(tbUSSD.Text);
//mobileGateway.EnableUssdEvent = true;
//ussdRequest.Dcs = UssdDcs.GetByNumeric(dcs);
ussdRequest.Dcs = UssdDcs.GetByNumeric(Int32.Parse(mtbDCS.Text));
UssdResponse ussdResponse = mobileGateway.SendUssd(ussdRequest);
response = ussdResponse.Content;
which is working on qualcomm and is not working on HUAWEI modem E173.
I've found that huawei seems to have USSD 8-bit.

Please provide fix or workaround.

Regards,
Lucas


Replies (16)

RE: USSD failure - Added by lucase over 8 years ago

I'm using version 1.4.2.0

RE: USSD failure - Added by admin over 8 years ago

Hi,

Could you provide the log files for both qualcomm and Huawei modem E173?

Thanks
Regards
admin

RE: USSD failure - Added by admin over 8 years ago

Hi,

Also try to set config.Model = "HuaweiE160"

It will encode the USSD request and response.

Thanks
Regards
admin

RE: USSD failure - Added by lucase over 8 years ago

Hello,

thank you quick response.
In attachment you will find logs.
Will check config.Model.

Regards,
Lucas

RE: USSD failure - Added by lucase over 8 years ago

I've changed model accodingly to suggestion: mobileGateway.Configuration.Model = "HuaweiE160";
Error is occuring:
Unsupported feature: UssdFeature: Send USSD command to the network (Error in command AT+CUSD=1,"*100#",14 : ERROR )

Lucas

RE: USSD failure - Added by lucase over 8 years ago

Curious thing.
I've uploaded another session on e713 with USSD sent from dedicated USSD part of MessagingToolkit.Core.Utilities.exe application and from AT Terminal.
USSD not working: AT+CUSD=1,"*100#",15
USSD sent from terminal encoded (*101#) AT+CUSD=1,"AA182C3602",15

hope it helps...

RE: USSD failure - Added by lucase over 8 years ago

Another test and success:
2011.12.13-02.47.05: Response: <cr><lf>^RSSI:24<cr><lf><cr><lf>^RSSI:24<cr><lf><cr><lf>^RSSI:21<cr><lf><cr><lf>^RSSI:21<cr><lf><cr><lf>^RSSI:26<cr><lf><cr><lf>^RSSI:26<cr><lf><cr><lf>^RSSI:22<cr><lf><cr><lf>^RSSI:22<cr><lf><cr><lf>^RSSI:26<cr><lf><cr><lf>^RSSI:26<cr><lf><cr><lf>^RSSI:22<cr><lf><cr><lf>^RSSI:22<cr><lf><cr><lf>^RSSI:27<cr><lf><cr><lf>^RSSI:27<cr><lf><cr><lf>OK<cr><lf>
2011.12.13-02.47.37: Sending: AT+CUSD=1,"AA180C3602",15
2011.12.13-02.47.37: Response: <cr><lf>^RSSI:27<cr><lf><cr><lf>^RSSI:27<cr><lf><cr><lf>^RSSI:23<cr><lf><cr><lf>^RSSI:23<cr><lf><cr><lf>^RSSI:28<cr><lf><cr><lf>^RSSI:23<cr><lf><cr><lf>OK<cr><lf>
2011.12.13-02.47.38: Unsolicited message: +CUSD: 0,"C135BD1E66BBF3A0393DEC06ADDF6E7A580702E15CB01A0804653A5DA0E5DB4D7F83EE61BDBB0C22BF4164773A0C02C168AF98EC2583C562",15

I've tried to send *100# as a USSD with E173 and after PDU conversion 7bit message was successfully sent and USSD answer received.

Is there a way to fix/configure that in toolkit library?

RE: USSD failure - Added by lucase over 8 years ago

config.Model = "HuaweiE160"
didn't do any good:
2011.12.13-03.37.51: Sending: AT+CUSD=1,"*100#",14
2011.12.13-03.37.52: Error in command AT+CUSD=1,"*100#",14 : ERROR
2011.12.13-03.37.53: Sending: AT+CMGL=4
still command isn't encoded

RE: USSD failure - Added by admin over 8 years ago

Hi,

Can you try with the attached patch?

Set config.Model to be "huaweie160" or "huaweie173"

Thanks
Regards
admin

RE: USSD failure - Added by lucase over 8 years ago

Hello,

I wasn't familiar with setting config.Model needs to be set before gateway is connected. Now it's working but what to do with returned code:
C135BD1E66BBF3A0393DEC06ADDF6E7A580702E15CB01A0804653A5DA0E5DB4D7F83EE61BDBB0C22BF4164773A0C02C168AF98EC2583C562
I've tried Pdu decoder and it give an error:
System.ArgumentException: Source array was not long enough. Check srcIndex and length, and the array's lower bounds.
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at MessagingToolkit.Pdu.PduParser.ReadAddress(Int32 addressLength, Int32 addressType)
at MessagingToolkit.Pdu.PduParser.ParseSmsSubmitMessage(SmsSubmitPdu pdu)
at MessagingToolkit.Pdu.PduParser.ParsePduDetails(Pdu pdu)
at MessagingToolkit.Pdu.PduParser.ParsePdu(String rawPdu)
at MessagingToolkit.Core.Utilities.frmSMS.btnDecodePdu_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
logs:
2011.12.14-08.43.19: Sending: AT+CUSD=1,"AA180C3602",15
2011.12.14-08.43.19: Response: <cr><lf>OK<cr><lf>
2011.12.14-08.43.20: Unsolicited message: +CUSD: 0,"C135BD1E66BBF3A0393DEC06ADDF6E7A580702E15CB01A0804653A5DA0E5DB4D7F83EE61BDBB0C22BF4164773A0C02C168AF98EC2583C562",15
2011.12.14-08.43.20: USSD response received
2011.12.14-08.43.20: Ending Async RawMessageReceivedEventHandler call

RE: USSD failure - Added by lucase over 8 years ago

I can add temporary sms header and concatenate it with answer in order to get outcome user readable data. How to automate that?
What more interesting if config.Model is set what about sending / receiving SMSes? Is it required to translate or library will handle that?

header example:069110090000F111000A9210299232900000AA9C + receive message: C135BD1E66BBF3A0393DEC06ADDF6E7A580702E15CB01A0804653A5DA0E5DB4D7F83EE61BDBB0C22BF4164773A0C02C168AF98EC2583C562
gives proper value...

In the end how to configure to have both
1. SMS sending / receiving properly
2. USSD sending / receiving properly
...

I look forward to hearing from you
Lucas

RE: USSD failure - Added by admin over 8 years ago

Hi,

Please try with the attached patch. It should automatically decode the response for you.

Setting the model should not impact SMS sending/receiving. By setting the model to "huaweie173", it will only have special handling for USSD only.

Thanks
Regards
admin

RE: USSD failure - Added by lucase over 8 years ago

I've tested and it's working great.
How is it going to be released? It's 32 bit and I will be needing also 64 bit.

Do you plan to release plain true / false option for such case?

Kind regards,
Lucas

RE: USSD failure - Added by admin over 8 years ago

Hi,

We will release a patch for you with option to turn it on/off in the config soon.

This patch will be incorporated in future release.

Thanks
Regards
admin

RE: USSD failure - Added by admin over 8 years ago

Hi,

Please try with the attached patch.

You can turn the encoding on/off through config.EncodedUssdCommands

Thanks
Regards
admin

RE: USSD failure - Added by lucase over 8 years ago

Hello,

great news! Everything is working fine. You don't have to even disconnect in order to get encrypted USSD working.
I'll be waiting for release... meantime I'll stick to the attached libraries.

Thank you,
Lucas

    (1-16/16)