USSD command not working

Added by admin over 1 year ago

I attach the modify file (btnBalance_Click). It not work and I think there are some difference parameter must to set in case of this. Pls Help me!

(The code USSD in project Utilities work well)

Now i create a function to send USSD request and get response but when i add this code :

// Here you can control the DCS
UssdRequest ussdRequest = new UssdRequest(txtUssdCommand.Text);
ussdRequest.Dcs = UssdDcs.GetByNumeric(dcs);
UssdResponse ussdResponse = mobileGateway.SendUssd(ussdRequest);
response = ussdResponse.Content;

To frmGatewayDetails,

It always show error: Unsupported feature: UssdFeature: Send USSD command to the network (Unable to get a USSD response for AT+CUSD=1,"*101#",15

(Try demo on frmSMS and it run well)

So can you pls help me on this
Thanks


Replies (9)

RE: USSD command not working - Added by taka over 1 year ago

Here is my log file. I this missing MessageReceived Handler ?

RE: USSD command not working - Added by admin over 1 year ago

Hi,

Could you try processing the USSD response asynchronously using the event?

See below and the sample for more details.

mobileGateway.EnableUssdEvent = true;
mobileGateway.UssdResponseReceived += OnUssdResponseReceived;

Thanks
Regards
admin

RE: USSD command not working - Added by taka over 1 year ago

Hi admin,
I've try it and enable EnableUssdEvent but it not come into OnUssdResponseReceived.

( I try both way in Ultilities (Event and not) example but not work)

RE: USSD command not working - Added by admin over 1 year ago

Hi,

When you said not working is it there is no response at all in the log files, or the response is in the log file but it is not received by the event?

Thanks
Regards
admin

RE: USSD command not working - Added by taka over 1 year ago

Hi admin,
I uncomment following code:

// Uncomment this part to enable message receiving
mobileGateway.MessageReceived += new MessageReceivedEventHandler(OnMessageReceived);
And it work well!

RE: USSD command not working - Added by admin over 1 year ago

Hi,

This looks like a bug. You shouldn't need to enable this to receive USSD response.

Could you test with the attached patch again, without enabling MessageReceived event?

1 dll is for .NET 3.5, another for .NET 4.0

Thanks
Regards
admin

RE: USSD command not working - Added by taka over 1 year ago

Whow it works like a charm! Thanks for your support!
No need to enable this to receive USSD response :)

RE: USSD command not working - Added by taka over 1 year ago

Hi admin,
Can you pls send me dll for NET20?
Thanks!

RE: USSD command not working - Added by admin over 1 year ago

Hi,

Please download the latest library, version 1.4.2.0

Thanks
Regards
admin

(1-9/9)