If you use a Windows computer you may be used to plugging in an FTDI breakout and getting "COM#" as a port number - and that port number sticks with the device! If you unplug that breakout and plug in another, it won't ever get the same name. Usually, the rules that udev uses to decide where to put a device node or what application to launch are set by an installer or a configuration tool, but there's no reason you can't just write your own!īut why would you want to? One reason may be that Linux doesn't always put generic USB com devices on the same device node. It also does a few other things, such as launching device-specific applications when a device is present. ![]() Whenever you plug a peripheral device into your Raspberry Pi (or any computer running a current Linux distro) there's a service called "udev" that adds that device to the /dev directory. This works really well but with one significant caveat, and it has everything to do with the Linux device manager udev. I'm currently working on a number of Raspberry Pi projects where USB peripherals - especially USB-to-Serial adapters - make up the majority of the hardware connected to the RPi. Sure, there are some situations where it would be cleaner to use the I2C or SPI interface, but it's hard to beat USB for convenience. It's relatively fast, carries power and data, and it's universal. One of the most convenient ways to connect a lot of peripherals to the Raspberry Pi is over USB.
0 Comments
Leave a Reply. |