huawei-modem-python-api-client
huawei-modem-python-api-client copied to clipboard
Error while working with USSD Code
Hello,
Firstly, congrats you created awesome library. FYI: Connection to wingle, sending sms and reboot functions work great but USSD code doesn't work. No matter what I changed in the code so May I ask you?
Lately I found an Error while working with USSD code: Heres the code:
import huaweisms.api.user
import huaweisms.api.wlan
import huaweisms.api.sms
import huaweisms.api.ussd
import huaweisms.api.device
ctx = huaweisms.api.user.quick_login("admin", "admin123")
print(ctx)
#Till this line it works Great
#This ussd code is to check balance: *101#
#This code doesn't work, no matter what I changed:
r = huaweisms.api.ussd.send(ctx, "*101#")
print(r)
print("\n........................\n")
r = huaweisms.api.ussd.get(ctx)
print(r)
#connected devices
device_list = huaweisms.api.wlan.get_connected_hosts(ctx)
When I execute this code it gives following error:
c:\python_codes>py ussd.py
<ApiCtx modem_host=192.168.8.1>
{'type': 'error', 'error': {'code': '1001', 'message': ''}}
........................
{'type': 'error', 'error': {'code': '100002', 'message': ''}}
Perhaps this is your decision. https://github.com/pablo/huawei-modem-python-api-client/issues/15#issuecomment-705694751
I'm getting the same error, It's something about dongle not supporting USSD operation?!
yapp, I was right: https://github.com/MartijnBraam/huawei-3g/blob/master/huawei_3g/huawei_e303.py
Perhaps this is your decision. #15 (comment)
how to edit code for read ussd encod utf-8 (thai language)