-
Notifications
You must be signed in to change notification settings - Fork 107
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
Question: support for windows? #93
Comments
Without having tried: From a |
It seems to have issues, but I am not sure if it is Windows related. For my test, I am using a USB GSM modem with a SIM800C chip. The device shows up in Windows as a standard serial device on a COM port that I have assigned to COM10. A serial connection to the device using PuTTY works just fine, I am able to issue AT commands with appropriate responses. No PIN is required to connect. I have also been able to talk to the device using PySerial commands (simple class code below): GsmBasic class definitionimport serial import serial.tools.list_ports as port_list class GsmBasic:
The following sequence times out, not sure why: gsmModem = GsmModem("COM10",115200) Here is the timeout exception: Traceback (most recent call last): Incidentally, running "python identify-modem.py -b 115200 COM10" yields the same timeout result. |
Hi @rtrahms ! I still cannot figure out, what is the difference between sending Do you have some tools to check for differences (like USB-UART converters)? |
Can you run |
@rtrahms I'm having the same issue running on ubuntu so not a windows problem. As far as I can tell the script isn't writing the initial ATZ command until after the timeout exception is raised. Its possibly an issue with the version of python, pyserial we are both using as with this noted behavior the program would never have worked, which seems contrary as people have obviously been using it successfully. |
I am running 5c816ba ( |
I remember that I had problems when installing from PyPI - but I do not recall if it was this timeout behavior, or rather something else. Can you try installing from GitHub (as per my previous comment) and report back if there was a change in behavior? |
I've just pip3 uninstalled the PyPi install and reinstalled the branch from git as you suggested.
Unfortunately the same timeout exception is happening, I've tried on both a laptop running ubuntu and a RPI running raspbian both are having the same issue. |
Could you dump the list of downloaded packages ( Maybe this is something completely irrelevant, but there is a |
interesting suggestion I do have both pyserial==3.4 & serial==0.0.97 showing up on the Ubuntu 18.04.5 laptop with PIP3 freeze, but as a bit of a sanity check earlier on I downloaded python-gsmmodem on a RPI and was getting the same error, the PI only has pyserial 3.4 on it, so possibly not the issue. I'm a bit hesitant to remove the serial package (not sure what i downloaded it for or if it's likely to break something else) based on the fact its not on the PI and I'm having the same complications. |
I found a problem that could be causing this. Line 50, serial_comms.py. The modem is opened with dstcts=true and dsrdtr=true. As I didn't connect dts and rts, the messages were not flowing to the device. Removing this initialization solved it for me. |
This worked for me too but the parameters at line 50 are self.serial = serial.Serial(dsrdtr=True, rtscts=True, port=self.port, baudrate=self.baudrate,
timeout=self.timeout,*self.com_args,**self.com_kwargs) After: self.serial = serial.Serial(dsrdtr=False, rtscts=False, port=self.port, baudrate=self.baudrate,
timeout=self.timeout,*self.com_args,**self.com_kwargs) |
New to using GSM modems, and have used them in raspbian/linux contexts, but unclear on whether this would work in windows (and how to modify the '/dev/ttyS0' identifier to a windows equivalent). Any suggestions/advice would be appreciated - thanks.
The text was updated successfully, but these errors were encountered: