On 09/07/2019 17.22, Alan Cox wrote:
+       int base;
/* open the serial port connected to the modem */
        fd = open(SERIAL_PORT, O_RDWR | O_NOCTTY | O_NDELAY);
@@ -58,6 +61,11 @@ Major parts of the initialization program :
        c.mtu = 127;
        /* set the new configuration */
        ioctl(fd, GSMIOC_SETCONF, &c);
+       /* get and print base gsmtty device node */
+       ioctl(fd, GSMIOC_GETBASE, &base);
Can we at least use a specific sized type ? uint32_t or whatever is fine.

Sure.

I am also considering whether returning the base (i.e. the unexposed control line) just confuses users. It might be better to use GSMIOC_GETFIRST instead, which would then return 1 for the first mux, and 65 for the second, and so forth.

// Martin

Reply via email to