I'm trying to understand if (and if so, how) it's possible to dedicate a HID (USB-card reader for NFC cards) to a specific application in macOS.
The card reader acts as a keyboard, sending the number of the card to whatever is open in macOS. I'm trying to get that USB-device locked to a specific application (e.g. firefox, chrome etc).
I really have no idea where to start looking for this. Hence I'm posting here for any help in the right direction.
Googling "Dedicate USB device to app" etc gave nothing useful.
macOS version 10.14.5 (18F132) (Mojave).
The way applications communicate to USB devices is IOKit framework. You could write it as service if you want to lock applications anywhere. And you need to know about launchd (Launch Daemon). It manages all your background service.
I have developed a Qt application that communicates with a specific bluetooth device. The application works on linux, android and mac flawlessly, but the qbluetooth api is not supported on windows. I have selected the serial api as a workaround, and have successfully done the task using a virtual COM port on the bluetooth device. The problem is that I don't want the end-user to create the COM port, and want to create it in setup time programmatically. I have done an extensive search, but have found no clue on it. Can anyone give me a hint on it? Thanks in advance.
I'm looking at tutorials no how to read from the playstation sixaxis controller over usb and it seems the in general you should look for a file object in /dev/input. I'm developing on OSX and this directory doesn't seem to exist and i cant fine any information on an equivalent. Does OSX have a similar mechanism for reading from usb devices?
You are trying to access a Human Interface Device (HID) on macOS. For more details on how to access HID data on macOS, begin here: https://stackoverflow.com/a/28405248/8258079
I am very new to Macintosh Application Development. I have a question that, is it possible to open my application when user connects a USB device to the Macintosh? I am very curious on this. Because I have a device and when I connect it to MAC system I need to open my application installed in the app and get the data from the USB device. Is this possible?
If it's just a storage device with a mountable file system, use NSWorkspace's NSWorkspaceDidMountNotification/NSWorkspaceWillUnmountNotification/NSWorkspaceDidUnmountNotification notifications to listen for it.
If you're looking for any other type of device, you'll have to dive a lot deeper. Check out the USB Device Interface Guide.
I'd like to modify a USB driver to send and receive USB data over a network.
Take for example, an iMac and a PC. I have an iPod plugged in to my PC (in NY). I want my iMac (in LA) to recognize the iPod as plugged in to a local USB port and be able to communicate with the iPod.
Forget my qualifications, or lack thereof (I have background in web, iOS apps, I've toyed with Java and C).
Where can I get source code for a USB driver for Windows that I can modify? Mac OS?
Any tips or pointers towards accomplishing my goal would be appreciated as well.
It looks like folks are coming up with something close to what you want. If you do decide to roll your own, the USB driver source you asked for is libusb.
On the Mac OS X end, drivers are built up in a stack. What you want to do should be relatively simple (nothing is really simple in kernel land). You need to create a driver that can communicate over ethernet with the PC and looks like a USB device to the driver matching software. Then everything else will happen automatically.
The source code is available for Apple's USB stack. You should also read about the IOKit API and IOKit device driver guidelines and IOKit fundamentals.
Oh yes and you say you have toyed with Java and C. To write device drivers on OS X, you'll need to learn some C++.
I suggest you to go see USBIP project. This is available on Linux and Windows, but not clear for MAC. If you can get a VHCI-Controller driver installed for MAC, we can kick start USBIP for MAC.
Sounds quite like this product, a bit unsure if theirs works over wide-area networks though.
I have a general idea of how I'd go about it, but not any specifics. Basically, I'd use the platform's driver development kit to write a USB device emulator on the client machine. I'd then add a virtual device to that system called "Networked USB Host", or something similar that maintains an open port to listen for communication from the server and passes it on to your virtual USB device. IIRC, the Windows DDK comes with a USB simulation framework that might be able to help you with this.
On the server, you'd have to hook into the USB subsystem to send raw USB packets to the client machine. libpcap and wireshark have USB capturing facilities for that, but I'm not sure if this works with winpcap and the Windows version of wireshark as well.
EDIT: Look at this for cross-platform USB capture alternatives.
You can buy OSR USB learning kit: https://www.osronline.com/custom.cfm?name=index_fullframeset.cfm&pageURL=https://www.osronline.com/store/index.cfm
This is actually small USB device with known interface. Windows Driver Kit (WDK) contains sample KMDF driver for this device: http://www.microsoft.com/whdc/driver/wdk/
This is good starting point to learn Windows Drivers development, and USB drivers development specifically. However, it is still far away from your problem solution.
Can't you use some sort of Remote Desktop?