[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bluetooth-dev] Error setting serial_struct with TIOCSSERIAL



Hi,

I commented out the ioctl to TIOCSSERIAL. This works fine for me.

Matthias


Peter Kjellerstedt wrote:
> 
> TIOCGSERIAL and TIOCSSERIAL are use to get and set a struct called
> serial_struct in the serial driver. It provides the means to set baud
> rates other than the standard ones.
> 
> If you build your kernel yourself, you could try and instrument the
> code in drivers/char/serial.c (assuming that is the serial driver you
> use) around where it returns -EADDRINUSE. Something like:
> 
>         /* Make sure address is not already in use */
>         if (new_serial.type) {
>                 for (i = 0 ; i < NR_PORTS; i++)
>                         if ((state != &rs_table[i]) &&
>                             (rs_table[i].port == new_port) &&
>                             rs_table[i].type) {
>                                 printk("i:                    %u", i);
>                                 printk("state:                0x%p", state);
>                                 printk("&rs_table[i]:         0x%p", &rs_table[i]);
>                                 printk("new_port:             %lu", new_port);
>                                 printk("rs_table[i].port:     %lu", rs_table[i].port);
>                                 printk("rs_table[i].type:     %d", rs_table[i].type);
>                                 printk("new_serial.port:      %u", new_serial.port);
>                                 printk("new_serial.port_high: %u", new_serial.port_high);
>                                 return -EADDRINUSE;
>                             }
> 
> You could also try and see if it makes any difference if you change
> the order in fd_setup() so that the call to tcsetattr() is done after
> the TIOCSSERIAL ioctl is called.
> 
> > Matthias
> 
> //Peter
> -
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com