-
Notifications
You must be signed in to change notification settings - Fork 39
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
Could not open port /dev/ttyGSM #1
Comments
Try to reduce or remove |
Hi, I have run into the same issue as damgot. I also tried konstunn's suggestion which failed (I don't think it would help in my case because my modem must be reset in order to leave cmux mode). I have installed the n_gsm kernel module through modprobe. I run the cmux program and it talks with the modem and places it into cmux mode successfully. The program creates all 4 /dev/ttyGSM*'s. When I run lsmod I can see that n_gsm is now being used by one PID, I run "fuser /dev/ttyMFD1" and I can see the PID of the cmux program, but when I run "fuser /dev/ttyGSM1" there is no PID returned. So it appears cmux is doing everything but failing on the connection to the virtual serial port? Any help with this would be appreciated. Also as a side note, I have tried ldattach.c and run into the same issue where I cannot connect to the /dev/gsmtty1 port. |
That seems to be normal cause I've got everything working in absolutely the same situation, except for that I've got
I didn't need to try But, honestly speaking, I don't get why Don't yet have an idea why you also get |
I have tried reducing the delay as you previously stated and that did not fix the error. When you run "fuser /dev/ttyGSM1" does it return a PID number? Also I am running the program as root so I don't think it is a permissions issue. This is very odd because it appears the program succeeds but I just cannot access the virtual ports. |
No, it does not. And I suppose that's normal.
Yes, it seems to be odd. But I had the same symptom with my problem. - Try to dive into your modem's datasheet and have a look at it's characteristics. And then try to tune the part of the code that contains For example, I had another issue of failing pppd pap authentication after I accidentally replaced Make sure that you catch all errors occured running |
same problems... |
I suggest trying to experiment around with the value of that delay. I suppose that even zero value can make sense. |
@konstunn i don't know the right number for delay, i can't find this param in SIM7100C's datesheet.
AND
I found sleep(1) in send_at_command, so the time between chip got AT+CMUX and when APP set line descripline, at least 1second passed. i don't know is it a problem. |
I don't know exactly. Try to alter this one as well and see the result. And let us know, please. |
@konstunn |
Hello,
I try your code for a project where I need to mux my GSM serial line.
When I run cmux, it create 4 tty : ttyGSM1 to 4.
But I can't use them.
With python I do :
import serial
com=serial.Serial('/dev/ttyGSM1',115200)
and I have the following error :
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/site-packages/serial/serialutil.py", line 171, in init
self.open()
File "/usr/lib/python2.7/site-packages/serial/serialposix.py", line 179, in open
raise SerialException("could not open port %s: %s" % (self._port, msg))
serial.serialutil.SerialException: could not open port /dev/ttyGSM1: [Errno 51] Level 2 halted: '/dev/ttyGSM1'
Do you have any idea ?
Many thanks
The text was updated successfully, but these errors were encountered: