tgalal / yowsup

The WhatsApp lib
GNU General Public License v3.0
7.06k stars 2.22k forks source link

Registration fails sim-mcc #802

Closed mecifuen40 closed 9 years ago

mecifuen40 commented 9 years ago

I have installed yowsup, but it fails on registration, I have checked MMC y MNC for mobile provider in Chile; parameters are ok.

[root@server-miguel yowsup-master]# yowsup-cli registration --requestcode sms --config yowsup-cli.conf --mcc 730 --mnc 03 -d DEBUG:yowsup.common.http.warequest:{'Accept': 'text/json', 'User-Agent': 'WhatsApp/2.12.53 S40Version/14.26 Device/Nokia302'} DEBUG:yowsup.common.http.warequest:cc=56&in=971111111&lc=US&lg=en&mcc=03&mnc=730&sim_mcc=03&sim_mnc=sms&method=sms&id=730&token=440563c0fbe2bc4296963e1e62707e91 DEBUG:yowsup.common.http.warequest:Opening connection to v.whatsapp.net DEBUG:yowsup.common.http.warequest:Sending GET request to /v2/code?cc=56&in=971111111&lc=US&lg=en&mcc=03&mnc=730&sim_mcc=03&sim_mnc=sms&method=sms&id=730&token=440563c0fbe2bc4296963e1e62707e91 INFO:yowsup.common.http.warequest:{"status":"fail","reason":"bad_param","param":"sim_mcc"}

status: fail param: sim_mcc reason: bad_param

mgp25 commented 9 years ago

@mecifuen40 you are using an outdated code. Current S40 version is 2.12.82. mnc and mcc params not used anymore in code request.

By the way, your error its because sim_mnc=sms you can NOT assign that value to sim_mnc

mecifuen40 commented 9 years ago

Thank you, how can I get installed current S40 version?

tgalal commented 9 years ago

@mecifuen40 you have an outdated yowsup installed somehwere else. Try:

pip install yowsup2 --upgrade

mecifuen40 commented 9 years ago

I had two Python versions, 2.6 and 2.7.9 simultaneously producing problems. Today I installed again with Python 2.7.9 using setup.py and now is working. Dealing now with Zabbix triggers to run AlertScripts. Thanks TGalal !