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.
But ioctl returns with 0.
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.
Well, what does it mean?
/ # echo 5 >> /sys/module/n_gsm/parameters/debug
[ 1819.440000] Q> 0) R: UIH(F)
[ 1819.440000] C3
[ 1819.780000] Q> 0) R: UIH(F)
[ 1819.780000] C3
[ 1820.120000] Q> 0) R: UIH(F)
[ 1820.120000] C3
[ 1820.470000] --> 0) C: SABM(P)
[ 1820.570000] --> 0) C: SABM(P)
[ 1820.670000] --> 0) C: SABM(P)
[ 1824.570000] Q> 0) C: UIH(F)
[ 1824.570000] C3
[ 1824.910000] Q> 0) C: UIH(F)
[ 1824.910000] C3
[ 1825.250000] Q> 0) C: UIH(F)
[ 1825.250000] C3
--
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