What is the OSX version of Linux / dev / usb / lp0?
I am writing to a centronics cable and flashing some LEDs through a simple "buffer" circuit.
I can write the bits through the C code referencing the device location at / dev / usb / lp 0 on the Ubuntu machine.
However, I would like to do this on OSX Mavericks. I don't see a file of the same type as on Linux.
i.e. is there an OSX counterpart for / dev / usb / lp 0 on Linux?
Many thanks.
source to share
In terms of all files, lp0 is simply a special file that provides raw access to a device, in this case a symbol special file for the first parallel device. It would be the same on OSX if there was a driver that matched the device or something like that /dev/parport0
. However, OSX has a fairly limited collection of concurrent drivers. You can try to clean it up - create a device file "symbol" by pointing it to some kind of generic parallel driver with mknod
.
eg. mknod lp0 c x y
where x an y are major and minor numbers for the device type. You usually find these numbers in a file documentation/devices.txt
on linux, but don't know where that information is on OSX.
I've seen devices handle this with generic printer drivers like "gadget printer": https://www.kernel.org/doc/Documentation/usb/gadget_printer.txt
(my initial guess)
In this case, the device will appear in the system as a printer. You can find a list of printers and their locations using CUPS utilities such as lpstat:
There are also LPDEST and PRINTER environment variables that should display the default print location:
echo $LDPEST
source to share