0

I have an arduino that talks to my computer through the serial-usb driver ftdi. I want to use my own module instead when I plug my arduino.

I did :

  • sudo rmmod usbserial
  • sudo rmmod ftdi_sio
  • I wrote a driver that does nothing but logs "init/probe/exit"
  • lsmod shows my driver and doesnt show usbserial/ftdi_sio
  • sudo depmod -a
  • I plug my arduino
  • lsmod shows usbserial/ftdi_sio

And instead of seeing my logs in dmesg I see that usbserial and ftdi_sio were instanciated.

What should I do do override that ?

P.S code :

static struct usb_device_id id_table [] = { 
  { USB_DEVICE(VENDOR_ID, PRODUCT_ID) },
  { },
};
MODULE_DEVICE_TABLE (usb, id_table);
...
static struct usb_driver arduino_driver = { 
  .name =   "thomasftdi",
  .probe =  arduino_probe,
  .disconnect = arduino_disconnect,
  .id_table = id_table,
};
init...probe...

I didn't use modalias in the code nor in commands, should I add it somewhere to register the module ?

0

Check the file /lib/modules//modules.alias (and neighbors), and perhaps any relevant udev(8) rules that load the module you don't want. Be extremely careful here, a typo might make your system unbootable.

  • I have deleted manually the lines corresponding to ftdi_sio and added mine instead. And it didn't work... – Thomas Feb 1 '14 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.