Hopefully I got it!
My modem has "timeout of five seconds, if the multiplexer protocol is enabled but no multiplexer control channel is
established."
Removing sleep(3) helps.
Thanks
On 27.5.2015 16:21, Jiri Slaby wrote:
On 05/27/2015, 03:27 PM, Jiří Prchal wrote:
On 27.5.2015 14:59, Greg KH wrote:
On Wed, May 27, 2015 at 02:45:47PM +0200, Jiří Prchal wrote:
Hi,
I've tried n_gsm to get up working. Is this in working condition?
Trying kernel 4.1-rc5.
I made program as example in Documentation/serial/n_gsm.txt. Nodes
are made
by mdev (too many 0 - 63). Or if I disable mdev then I made by program 4
nodes. Up to here looks everything OK.
...
Here are functions called in this sequence:
...
/* get n_gsm configuration */
if (ioctl (tty, GSMIOC_GETCONF, &conf)) {
syslog (LOG_ERR, "cannot get configuration!");
exit (-1);
}
/* we are initiator and need encoding 0 (basic) */
conf.initiator = 1;
conf.encapsulation = 0;
/* our modem defaults to a maximum size of 98 bytes */
conf.mru = 96;
conf.mtu = 96;
/* set the new configuration */
if (ioctl (tty, GSMIOC_SETCONF, &conf)) {
syslog (LOG_ERR, "cannot configure line discipline!");
exit (-1);
}
The suspect is here. The modem did not reply to the configuration, so
the device was marked as dead.
int
at_open (char *dev)
{
int tty;
tty = open (dev, O_RDWR | O_NOCTTY);
Every open of the node then ends up with -EL2HLT.
You can check with the debug parameter of n_gsm module. Set it to 1 or
5. You might need to turn on the dynamic_debug due to pr_debug.
if (tty < 0) {
syslog (LOG_ERR, "unable to open %s, code %d (%s)", dev, errno,
strerror (errno));
thanks,
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html