Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: invalid literal for int() with base 10: '250,0' #83

Open
Roundik opened this issue Jan 12, 2020 · 1 comment
Open

ValueError: invalid literal for int() with base 10: '250,0' #83

Roundik opened this issue Jan 12, 2020 · 1 comment

Comments

@Roundik
Copy link

Roundik commented Jan 12, 2020

Hello,

Unfortunately, I can’t tell the modem yet.
One thing I know is chinese on 16 ports.

def main():
    d=0
    p=24
    max_ports=30
    imsin = ''
    path = Path(__file__).parent.absolute()
    while d < max_try:
        while p < max_ports:
            print('try ',p, ' :port; ')
            PORT = 'COM'+str(p)
            logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG)
            modem = GsmModem(PORT, BAUDRATE, smsReceivedCallbackFunc=handleSms)
            modem.connect(PIN)
            modem.rxThread.join(2**8)
            modem.close();
            p += 1
        d += 1
try  24  :port;
INFO: Connecting to modem on port COM24 at 115200bps
DEBUG: write: ATZ
DEBUG: response: ['OK']
DEBUG: write: ATE0
DEBUG: response: ['ATE0\r', 'OK']
DEBUG: write: AT+CFUN?
DEBUG: response: ['+CFUN: 1', 'OK']
DEBUG: write: AT+CMEE=1
DEBUG: response: ['OK']
DEBUG: write: AT+CPIN?
DEBUG: response: ['+CPIN: READY', 'OK']
DEBUG: write: AT+CLAC
DEBUG: response: ['+CME ERROR: 100']
DEBUG: write: AT
DEBUG: response: ['OK']
DEBUG: write: AT^CVOICE=?
DEBUG: response: ['+CME ERROR: 100']
DEBUG: write: AT+VTS=?
DEBUG: response: ['+VTS: (0-9,*,#,A,B,C,D),,(1-255)', 'OK']
DEBUG: write: AT^DTMF=?
DEBUG: response: ['+CME ERROR: 100']
DEBUG: write: AT^USSDMODE=?
DEBUG: response: ['+CME ERROR: 100']
DEBUG: write: AT+WIND=?
DEBUG: response: ['+WIND: (250,257)[,(0,1)]', 'OK']
DEBUG: write: AT+ZPAS=?
DEBUG: response: ['+CME ERROR: 100']
DEBUG: write: AT+CSCS=?
DEBUG: response: ['+CSCS: ("GSM","HEX","IRA","PCCP437","UCS2","8859-1")', 'OK']
DEBUG: write: AT+CNUM=?
DEBUG: response: ['OK']
DEBUG: write: AT+WIND?
DEBUG: response: ['+WIND: 250,0', 'OK']
Traceback (most recent call last):
  File "D:\yandex/sms_receive.py", line 75, in <module>
    main()
  File "D:\yandex/sms_receive.py", line 56, in main
    modem.connect(PIN)
  File "D:\yandex\Python38\lib\site-packages\gsmmodem\modem.py", line 268, in connect
    if int(wind[7:]) != 50:
ValueError: invalid literal for int() with base 10: '250,0'

Thanks

@furryDev1lOwO
Copy link

This is a poor implementation of the WIND protocol for some of the older modems
All you need to do is to remove the block of code related to WIND in the modem.py library
I'll be working on a commit the next few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants