IOUSBHost

RSS for tag

Create host-mode user space drivers for USB devices using IOUSBHost.

Posts under IOUSBHost tag

76 Posts

Post

Replies

Boosts

Views

Activity

IOUSBHost framework - IOUSBHostErrorDomain which in turn has IOServiceOpen failed
// main.m // pnp // // Created by Sharath Menon on 22/09/22. // #import <Foundation/Foundation.h> #import <IOUSBHost/IOUSBHost.h> #include <IOKit/IOTypes.h> #include <dispatch/dispatch.h> #include <IOKit/usb/IOUSBLib.h> #ifdef __OBJC__ @class IOUSBHostDevice; typedef IOUSBHostDevice * USBHostDevPtr; #else typedef void * USBHostDevPtr; #endif USBHostDevPtr mUSBDevice; dispatch_queue_t mQueue; //boost::function<void()> mCallback; int captureDevice(io_service_t aService) { NSError* error = nil; IOUSBHostInterestHandler handler = ^void(IOUSBHostObject* hostObject, uint32_t messageType, void* _Nullable messageArgument) { if( messageType == kIOMessageServiceIsTerminated ) { // The callback will eventually take care of cleaning up the object // mCallback(); NSLog(@"if PNP device removed"); } NSLog(@"PNP device removed"); }; // Create the device with IOUSBHostObjectInitOptionsDeviceCapture to get exclusive access to the device IOUSBHostDevice* device = [[IOUSBHostDevice alloc] initWithIOService:aService options:IOUSBHostObjectInitOptionsDeviceCapture queue:mQueue error:&error interestHandler:handler]; if(device == NULL) { return -1; } mUSBDevice = device; // configureDevice(aService); return 0; } int main(int argc, const char * argv[]) { @autoreleasepool { // insert code here... mQueue = dispatch_queue_create("DeviceQueue", DISPATCH_QUEUE_SERIAL); NSLog(@"Hello, World!"); CFMutableDictionaryRef RefMatchingDict = IOServiceMatching( kIOUSBDeviceClassName ); io_iterator_t USBDevices; IOServiceGetMatchingServices( kIOMasterPortDefault, RefMatchingDict, &USBDevices ); // IOServiceGetMatchingServices( kIOMainPortDefault, RefMatchingDict, &USBDevices ); io_object_t USBDevice; while ( ( USBDevice = IOIteratorNext( USBDevices ) ) ) { io_string_t strDevPath; IORegistryEntryGetPath( USBDevice, kIOServicePlane, strDevPath ); captureDevice(USBDevice); IOObjectRelease( USBDevice ); } IOObjectRelease( USBDevices ); // USBDevices = NULL; } return 0; } Hey all, I have been seeing a weird issues while using IOUSBHost framework. Whenever i run the given sample code on M1 machine it works perfectly fine; but the same on an Intel machine is giving the below error. The weirdest part is when i run this on catalina with xcode 11.6 (Intel machine) it works again. My process is running as root and not sandboxed so i would not be requiring any entitlements as mentioned in the doc for using IOUSBHostObjectInitOptionsDeviceCapture. Thoughts??? * @enum IOUSBHostObjectInitOptions * @brief Options for <code>initWithIOService:options:queue:error:interestHandler</code> * @constant IOUSBHostObjectInitOptionsDeviceCapture Callers must have the "com.apple.vm.device-access" entitlement * and the IOUSBHostDevice IOService object needs to have successfully been authorized by IOServiceAuthorize(). * If the caller has root privelages the entitlement and authorization is not needed. Using this option * will terminate all clients and drivers of the IOUSBHostDevice and associated IOUSBHostInterface clients * besides the caller. * Upon <code>destroy</code> of the IOUSBHostDevice, the device will be reset and drivers will be re-registered * for matching. This option is only valid for macOS */ typedef NS_OPTIONS (NSUInteger, IOUSBHostObjectInitOptions) { IOUSBHostObjectInitOptionsNone = 0, IOUSBHostObjectInitOptionsDeviceCapture = (1 << 0) };
1
0
1.5k
Sep ’22
Fallback method for retrieving product name for USB devices
We have retired our old USB kext and reimplemented our new USB stack using the IOUSBHost API and the VM DeviceAccess entitlement in our product. Everything is going fine...except for this one edge case. We have a USB device that does not have a String Descriptor for the Product name. Apparently some USB devices will report an iProduct of 0 in their Device Descriptor, therefore Product String Descriptor failing. If I look at the output from system_profiler SPUSBDataType or ioreg -p IOUSB -l with the device attached, I can see that there is no Product name anywhere. I can combine the output of the two commands to narrow down the device based on its serial number. System profiler snippet: Miscellaneous Device: Product ID: 0x0990 Vendor ID: 0x046d (Logitech Inc.) Version: 0.08 Serial Number: 1345602E Speed: Up to 480 Mb/s Location ID: 0x14110000 / 21 Current Available (mA): 500 Current Required (mA): 500 Extra Operating Current (mA): 0 IOReg snippet: | +-o IOUSBHostDevice@14110000 <class AppleUSBDevice, id 0x100004897, registered, matched, active, busy 0 (4 ms), retain 20> | { | "sessionID" = 62015500304018 | "idProduct" = 2448 | "iManufacturer" = 0 | "bDeviceClass" = 239 | "bMaxPacketSize0" = 64 | "bcdDevice" = 8 | "iProduct" = 0 | "iSerialNumber" = 2 | "bNumConfigurations" = 1 | "Bus Power Available" = 250 | "USB Address" = 21 | "Built-In" = No | "locationID" = 336658432 | "bDeviceSubClass" = 2 | "bcdUSB" = 512 | "kUSBSerialNumberString" = "1345602E" | "PortNum" = 1 | "non-removable" = "no" | "AppleUSBAlternateServiceRegistryID" = 4294985877 | "bDeviceProtocol" = 1 | "IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBHostFamily.kext/Contents/PlugIns/IOUSBLib.bundle"} | "IOPowerManagement" = {"DevicePowerState"=0,"CurrentPowerState"=3,"CapabilityFlags"=65536,"MaxPowerState"=4,"DriverPowerState"=3} | "kUSBCurrentConfiguration" = 1 | "Device Speed" = 2 | "idVendor" = 1133 | "IOGeneralInterest" = "IOCommand is not serializable" | "USB Serial Number" = "1345602E" | "IOClassNameOverride" = "IOUSBDevice" | } The solution I'm looking for is a fallback method to read the product name "QuickCam Pro 9000", as this is the string reported on other operating systems. I know a fallback is possible on at least Linux, using a table in /usr/share/misc/usb.ids. Is there any macOS API or command we can use to get the Product string for such devices?
0
0
1.4k
Aug ’22
IOUSBHostDevice fails and throws error in sandboxed app
I get the following errors when running the code below in a sandboxed app (it works when not sandboxed) and I have the com.apple.security.device.usb entitlement enabled. Error:Unable to open io_service_t object and create user client. with reason: IOServiceOpen failed. Error Domain=IOUSBHostErrorDomain Code=-536870174 "Failed to create IOUSBHostObject." UserInfo={NSLocalizedRecoverySuggestion=, NSLocalizedDescription=Failed to create IOUSBHostObject., NSLocalizedFailureReason=IOServiceOpen failed.} import Foundation import IOKit import IOKit.usb import IOKit.usb.IOUSBLib import IOKit.serial import IOUSBHost import IOUSBHost.IOUSBHostInterface class USBService {     enum UsbError: Error {         case noDeviceMatched         case deviceCriteriaNotUnique     }          init() {              }          func getDevice(idVendor: Int?, idProduct: Int?) throws {         let deviceSearchPattern: [IOUSBHostMatchingPropertyKey : Int] = [                    .vendorID : idVendor!,                    .productID : idProduct!,                ]                let deviceDomain = [ "IOProviderClass": "IOUSBHostDevice" ]                let searchRequest = (deviceSearchPattern as NSDictionary).mutableCopy() as! NSMutableDictionary                searchRequest.addEntries(from: deviceDomain)         let service = IOServiceGetMatchingService(kIOMasterPortDefault, searchRequest)         guard service != 0 else {                    throw UsbError.noDeviceMatched         }                       let device = try IOUSBHostDevice.init(__ioService: service, options: [], queue: nil, interestHandler: nil)                  print(device.deviceDescriptor?.pointee.idProduct)     } }
3
0
2.7k
May ’22
memory leak of API IOCreatePlugInInterfaceForService in IOKit
we are developing USB hid library to interact with HID device, however we're facing on memory lacking when we calling IOCreatePlugInInterfaceForService then calling IODestroyPlugInInterface, the memory is not released and each time of calling it take about 0.3 MB Ram, after long time running, the program crash because runout of memory. what should we do in this case to avoid memory leak? // Create a device interface/HANDLE static BOOL CreateHidDeviceInterface(io_object_t deviceObject, HANDLE* pHandle) { BOOL retVal = FALSE; IOCFPlugInInterface** ppPluginInterface = NULL; SInt32 score = 0; IOReturn pluginResult; HRESULT interfaceResult; // Create a plugin so we can create an interface pluginResult = IOCreatePlugInInterfaceForService(deviceObject, kIOHIDDeviceUserClientTypeID, kIOCFPlugInInterfaceID, &ppPluginInterface, &score); if (pluginResult == kIOReturnSuccess) { // Create the interface (HANDLE) interfaceResult = (*ppPluginInterface)->QueryInterface(ppPluginInterface, CFUUIDGetUUIDBytes(kIOHIDDeviceInterfaceID), (void**)pHandle); if (interfaceResult == S_OK) { retVal = TRUE; } IODestroyPlugInInterface(ppPluginInterface); } return retVal; }
1
0
2.2k
Apr ’22
USB Live Stream not working in osx 12
Dear Apple Expert, Our project uses libUSB library to interact with a USB based camera device. Our application is working fine in macOS Mojave (10.14.6 ). When the new MacOS 12 beta version was made available, we tested our code. But when we try to claim the interface via "CreateInterfaceIterator" API, we are getting "kIOReturnExclusiveAccess" error code and ultimately our application fails. The failure is observed in both libUSB versions 1.0.23 and 1.0.24. Could you help us by explaining if there is change in the new OS with respect to access to USB devices?
1
0
2.4k
Mar ’22
USB Hub
Good day! Why is it my USB Hub is not working since I upgraded to newer OS? I am using MBA M1. And I just used again just now my USB Hub since I purchased my MBA. Please Apple fix this, because my hub is useless. And I need to use it now because I need usb port. Thanks and have a great day ahead!
0
0
1k
Mar ’22
AVCapture with IOKit in macos 12 access fail
I am using AVCatureSession to display the usb camera video. Also using IOUSBInterfaceOpen to open one of the usb interface for access the button interrupt signal. But it return "kIOReturnExclusiveAccess" error in macos 12. I have also tried to use "IOUSBDevice::ReEnumerateDevice" to detach the kernel driver for interface open. But the AVCatureSession will not show the image. Anyway to support both AVCatureSession and IOUSBInterfaceOpen in macos 12?
0
1
1k
Mar ’22
USB Audio Mixer Keeps Disappearing
I have connected a USB audio mixer to my iMac, but the machine keeps losing the connection. Specifically, when I look in Sound Preferences. For a solid week, I could hear and use the mic through the mixer without an issue. The mixer showed up as IOUSBHOST. However, this morning the mixer is now showing up in Sound Preferences as JieLi BR17 and it keeps bugging out, i.e., it will show up on the list and then disappear taking my audio I/O for a ride in the process. A major problem when I'm delivering virtual workshops and classes. How do I get my iMac to recognize the mixer using the IOUSBHOST protocol? Frankly, how do I fix this problem. Thanks for any insight and help on this. Fair warning: not a developer but willing to do the learning to get my set up working.
4
0
2.1k
Feb ’22
Hardware developer shenanigans
Hi there, I develop apps for healthcare devices that operate on USB or Bluetooth. Our use cases involve non-invasive glucose monitoring. Since our goal is to reach a massive audience including iOS, Android and Web, we are trying to use a cross platform framework called Flutter. The problem: iOS. Mac supports both web bluetooth and web usb since Chrome is based on Chromium but on iOS chrome is based on WebKit. iOS is the only platform causing an issue, otherwise we're able to target Windows, Linux, Android and Mac perfectly with our tools. Since we are a small team, we cannot afford to hire separate people for developing and maintaining different apps. Some advice or tips of where to take this would be much appreciated.
0
0
1.2k
Dec ’21
SCSI write(10) command over USB
I'm developing an application in Objective C that works on vendor specific commands of SD cards using IOUSBHostPipe. These vendor SCSI passthrough commands are working fine. But when I try to issue a SCSI write(10) command, it seems to hang. The same implementation when done on Windows seems to be working fine. Is there a limitation to issuing a SCSI write(10) command in macOS? I'm a bit new to the macOS environment and would really appreciate some pointers to references that I can look into or any alternatives to this problem. Thanks in advance. Much appreciated :)
0
0
1.1k
Dec ’21
USB 2.0 disconnections
iMAC 27 - Big Sur latest Beta Using BT600 ( USB bluetooth dongle of Plantronics). to connect Plantronics 5200 and Plantronics or Voyeger 4220 . Connection between BT600 and Bluetooth headset is frequently getting disconnected. This is not happening with my other laptops. This is also not hardware problem of BT600 as I have tested with two different dongles. The disconnection is less call when BT600 is connected with USB 3.0 port of MAC
1
0
1.2k
Nov ’21
Перестали обнаруживаться USB и MicroSD
Добрый день, после перехода на MacOS Montaray, при подключении хаба Canyon, (сам он при этом работает, индикатор подсвечивается, зарядку через него идет) перестали работать USB 2.0 , 3.0 и MicroSD. Ранее на BigSur все было корректно, как теперь работать за ПК? Нужно перекидывать фото с MicroSD, пользоваться флешками и внешними накопителями
0
0
741
Nov ’21
IOUSBHost framework - IOUSBHostErrorDomain which in turn has IOServiceOpen failed
// main.m // pnp // // Created by Sharath Menon on 22/09/22. // #import <Foundation/Foundation.h> #import <IOUSBHost/IOUSBHost.h> #include <IOKit/IOTypes.h> #include <dispatch/dispatch.h> #include <IOKit/usb/IOUSBLib.h> #ifdef __OBJC__ @class IOUSBHostDevice; typedef IOUSBHostDevice * USBHostDevPtr; #else typedef void * USBHostDevPtr; #endif USBHostDevPtr mUSBDevice; dispatch_queue_t mQueue; //boost::function<void()> mCallback; int captureDevice(io_service_t aService) { NSError* error = nil; IOUSBHostInterestHandler handler = ^void(IOUSBHostObject* hostObject, uint32_t messageType, void* _Nullable messageArgument) { if( messageType == kIOMessageServiceIsTerminated ) { // The callback will eventually take care of cleaning up the object // mCallback(); NSLog(@"if PNP device removed"); } NSLog(@"PNP device removed"); }; // Create the device with IOUSBHostObjectInitOptionsDeviceCapture to get exclusive access to the device IOUSBHostDevice* device = [[IOUSBHostDevice alloc] initWithIOService:aService options:IOUSBHostObjectInitOptionsDeviceCapture queue:mQueue error:&error interestHandler:handler]; if(device == NULL) { return -1; } mUSBDevice = device; // configureDevice(aService); return 0; } int main(int argc, const char * argv[]) { @autoreleasepool { // insert code here... mQueue = dispatch_queue_create("DeviceQueue", DISPATCH_QUEUE_SERIAL); NSLog(@"Hello, World!"); CFMutableDictionaryRef RefMatchingDict = IOServiceMatching( kIOUSBDeviceClassName ); io_iterator_t USBDevices; IOServiceGetMatchingServices( kIOMasterPortDefault, RefMatchingDict, &USBDevices ); // IOServiceGetMatchingServices( kIOMainPortDefault, RefMatchingDict, &USBDevices ); io_object_t USBDevice; while ( ( USBDevice = IOIteratorNext( USBDevices ) ) ) { io_string_t strDevPath; IORegistryEntryGetPath( USBDevice, kIOServicePlane, strDevPath ); captureDevice(USBDevice); IOObjectRelease( USBDevice ); } IOObjectRelease( USBDevices ); // USBDevices = NULL; } return 0; } Hey all, I have been seeing a weird issues while using IOUSBHost framework. Whenever i run the given sample code on M1 machine it works perfectly fine; but the same on an Intel machine is giving the below error. The weirdest part is when i run this on catalina with xcode 11.6 (Intel machine) it works again. My process is running as root and not sandboxed so i would not be requiring any entitlements as mentioned in the doc for using IOUSBHostObjectInitOptionsDeviceCapture. Thoughts??? * @enum IOUSBHostObjectInitOptions * @brief Options for <code>initWithIOService:options:queue:error:interestHandler</code> * @constant IOUSBHostObjectInitOptionsDeviceCapture Callers must have the "com.apple.vm.device-access" entitlement * and the IOUSBHostDevice IOService object needs to have successfully been authorized by IOServiceAuthorize(). * If the caller has root privelages the entitlement and authorization is not needed. Using this option * will terminate all clients and drivers of the IOUSBHostDevice and associated IOUSBHostInterface clients * besides the caller. * Upon <code>destroy</code> of the IOUSBHostDevice, the device will be reset and drivers will be re-registered * for matching. This option is only valid for macOS */ typedef NS_OPTIONS (NSUInteger, IOUSBHostObjectInitOptions) { IOUSBHostObjectInitOptionsNone = 0, IOUSBHostObjectInitOptionsDeviceCapture = (1 << 0) };
Replies
1
Boosts
0
Views
1.5k
Activity
Sep ’22
Fallback method for retrieving product name for USB devices
We have retired our old USB kext and reimplemented our new USB stack using the IOUSBHost API and the VM DeviceAccess entitlement in our product. Everything is going fine...except for this one edge case. We have a USB device that does not have a String Descriptor for the Product name. Apparently some USB devices will report an iProduct of 0 in their Device Descriptor, therefore Product String Descriptor failing. If I look at the output from system_profiler SPUSBDataType or ioreg -p IOUSB -l with the device attached, I can see that there is no Product name anywhere. I can combine the output of the two commands to narrow down the device based on its serial number. System profiler snippet: Miscellaneous Device: Product ID: 0x0990 Vendor ID: 0x046d (Logitech Inc.) Version: 0.08 Serial Number: 1345602E Speed: Up to 480 Mb/s Location ID: 0x14110000 / 21 Current Available (mA): 500 Current Required (mA): 500 Extra Operating Current (mA): 0 IOReg snippet: | +-o IOUSBHostDevice@14110000 <class AppleUSBDevice, id 0x100004897, registered, matched, active, busy 0 (4 ms), retain 20> | { | "sessionID" = 62015500304018 | "idProduct" = 2448 | "iManufacturer" = 0 | "bDeviceClass" = 239 | "bMaxPacketSize0" = 64 | "bcdDevice" = 8 | "iProduct" = 0 | "iSerialNumber" = 2 | "bNumConfigurations" = 1 | "Bus Power Available" = 250 | "USB Address" = 21 | "Built-In" = No | "locationID" = 336658432 | "bDeviceSubClass" = 2 | "bcdUSB" = 512 | "kUSBSerialNumberString" = "1345602E" | "PortNum" = 1 | "non-removable" = "no" | "AppleUSBAlternateServiceRegistryID" = 4294985877 | "bDeviceProtocol" = 1 | "IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBHostFamily.kext/Contents/PlugIns/IOUSBLib.bundle"} | "IOPowerManagement" = {"DevicePowerState"=0,"CurrentPowerState"=3,"CapabilityFlags"=65536,"MaxPowerState"=4,"DriverPowerState"=3} | "kUSBCurrentConfiguration" = 1 | "Device Speed" = 2 | "idVendor" = 1133 | "IOGeneralInterest" = "IOCommand is not serializable" | "USB Serial Number" = "1345602E" | "IOClassNameOverride" = "IOUSBDevice" | } The solution I'm looking for is a fallback method to read the product name "QuickCam Pro 9000", as this is the string reported on other operating systems. I know a fallback is possible on at least Linux, using a table in /usr/share/misc/usb.ids. Is there any macOS API or command we can use to get the Product string for such devices?
Replies
0
Boosts
0
Views
1.4k
Activity
Aug ’22
Can iPhone or iPad as the USB audio source?
Hi . All We try to connect the USB UAC1.0 device to computer or andriod phone , is work well . the we try to connect to iphone or ipad use "Lightning to USB adapter “,it can find device then play the audio but the audio stream is not continuous. can you tell my iphone or ipad support usb uac1.0 or uac2.0 device ? Thank you! Isaac
Replies
0
Boosts
0
Views
1.1k
Activity
Jul ’22
IOUSBHostDevice fails and throws error in sandboxed app
I get the following errors when running the code below in a sandboxed app (it works when not sandboxed) and I have the com.apple.security.device.usb entitlement enabled. Error:Unable to open io_service_t object and create user client. with reason: IOServiceOpen failed. Error Domain=IOUSBHostErrorDomain Code=-536870174 "Failed to create IOUSBHostObject." UserInfo={NSLocalizedRecoverySuggestion=, NSLocalizedDescription=Failed to create IOUSBHostObject., NSLocalizedFailureReason=IOServiceOpen failed.} import Foundation import IOKit import IOKit.usb import IOKit.usb.IOUSBLib import IOKit.serial import IOUSBHost import IOUSBHost.IOUSBHostInterface class USBService {     enum UsbError: Error {         case noDeviceMatched         case deviceCriteriaNotUnique     }          init() {              }          func getDevice(idVendor: Int?, idProduct: Int?) throws {         let deviceSearchPattern: [IOUSBHostMatchingPropertyKey : Int] = [                    .vendorID : idVendor!,                    .productID : idProduct!,                ]                let deviceDomain = [ "IOProviderClass": "IOUSBHostDevice" ]                let searchRequest = (deviceSearchPattern as NSDictionary).mutableCopy() as! NSMutableDictionary                searchRequest.addEntries(from: deviceDomain)         let service = IOServiceGetMatchingService(kIOMasterPortDefault, searchRequest)         guard service != 0 else {                    throw UsbError.noDeviceMatched         }                       let device = try IOUSBHostDevice.init(__ioService: service, options: [], queue: nil, interestHandler: nil)                  print(device.deviceDescriptor?.pointee.idProduct)     } }
Replies
3
Boosts
0
Views
2.7k
Activity
May ’22
memory leak of API IOCreatePlugInInterfaceForService in IOKit
we are developing USB hid library to interact with HID device, however we're facing on memory lacking when we calling IOCreatePlugInInterfaceForService then calling IODestroyPlugInInterface, the memory is not released and each time of calling it take about 0.3 MB Ram, after long time running, the program crash because runout of memory. what should we do in this case to avoid memory leak? // Create a device interface/HANDLE static BOOL CreateHidDeviceInterface(io_object_t deviceObject, HANDLE* pHandle) { BOOL retVal = FALSE; IOCFPlugInInterface** ppPluginInterface = NULL; SInt32 score = 0; IOReturn pluginResult; HRESULT interfaceResult; // Create a plugin so we can create an interface pluginResult = IOCreatePlugInInterfaceForService(deviceObject, kIOHIDDeviceUserClientTypeID, kIOCFPlugInInterfaceID, &ppPluginInterface, &score); if (pluginResult == kIOReturnSuccess) { // Create the interface (HANDLE) interfaceResult = (*ppPluginInterface)->QueryInterface(ppPluginInterface, CFUUIDGetUUIDBytes(kIOHIDDeviceInterfaceID), (void**)pHandle); if (interfaceResult == S_OK) { retVal = TRUE; } IODestroyPlugInInterface(ppPluginInterface); } return retVal; }
Replies
1
Boosts
0
Views
2.2k
Activity
Apr ’22
USB Live Stream not working in osx 12
Dear Apple Expert, Our project uses libUSB library to interact with a USB based camera device. Our application is working fine in macOS Mojave (10.14.6 ). When the new MacOS 12 beta version was made available, we tested our code. But when we try to claim the interface via "CreateInterfaceIterator" API, we are getting "kIOReturnExclusiveAccess" error code and ultimately our application fails. The failure is observed in both libUSB versions 1.0.23 and 1.0.24. Could you help us by explaining if there is change in the new OS with respect to access to USB devices?
Replies
1
Boosts
0
Views
2.4k
Activity
Mar ’22
USB Hub
Good day! Why is it my USB Hub is not working since I upgraded to newer OS? I am using MBA M1. And I just used again just now my USB Hub since I purchased my MBA. Please Apple fix this, because my hub is useless. And I need to use it now because I need usb port. Thanks and have a great day ahead!
Replies
0
Boosts
0
Views
1k
Activity
Mar ’22
AVCapture with IOKit in macos 12 access fail
I am using AVCatureSession to display the usb camera video. Also using IOUSBInterfaceOpen to open one of the usb interface for access the button interrupt signal. But it return "kIOReturnExclusiveAccess" error in macos 12. I have also tried to use "IOUSBDevice::ReEnumerateDevice" to detach the kernel driver for interface open. But the AVCatureSession will not show the image. Anyway to support both AVCatureSession and IOUSBInterfaceOpen in macos 12?
Replies
0
Boosts
1
Views
1k
Activity
Mar ’22
USB Audio Mixer Keeps Disappearing
I have connected a USB audio mixer to my iMac, but the machine keeps losing the connection. Specifically, when I look in Sound Preferences. For a solid week, I could hear and use the mic through the mixer without an issue. The mixer showed up as IOUSBHOST. However, this morning the mixer is now showing up in Sound Preferences as JieLi BR17 and it keeps bugging out, i.e., it will show up on the list and then disappear taking my audio I/O for a ride in the process. A major problem when I'm delivering virtual workshops and classes. How do I get my iMac to recognize the mixer using the IOUSBHOST protocol? Frankly, how do I fix this problem. Thanks for any insight and help on this. Fair warning: not a developer but willing to do the learning to get my set up working.
Replies
4
Boosts
0
Views
2.1k
Activity
Feb ’22
Hardware developer shenanigans
Hi there, I develop apps for healthcare devices that operate on USB or Bluetooth. Our use cases involve non-invasive glucose monitoring. Since our goal is to reach a massive audience including iOS, Android and Web, we are trying to use a cross platform framework called Flutter. The problem: iOS. Mac supports both web bluetooth and web usb since Chrome is based on Chromium but on iOS chrome is based on WebKit. iOS is the only platform causing an issue, otherwise we're able to target Windows, Linux, Android and Mac perfectly with our tools. Since we are a small team, we cannot afford to hire separate people for developing and maintaining different apps. Some advice or tips of where to take this would be much appreciated.
Replies
0
Boosts
0
Views
1.2k
Activity
Dec ’21
SCSI write(10) command over USB
I'm developing an application in Objective C that works on vendor specific commands of SD cards using IOUSBHostPipe. These vendor SCSI passthrough commands are working fine. But when I try to issue a SCSI write(10) command, it seems to hang. The same implementation when done on Windows seems to be working fine. Is there a limitation to issuing a SCSI write(10) command in macOS? I'm a bit new to the macOS environment and would really appreciate some pointers to references that I can look into or any alternatives to this problem. Thanks in advance. Much appreciated :)
Replies
0
Boosts
0
Views
1.1k
Activity
Dec ’21
USB 2.0 disconnections
iMAC 27 - Big Sur latest Beta Using BT600 ( USB bluetooth dongle of Plantronics). to connect Plantronics 5200 and Plantronics or Voyeger 4220 . Connection between BT600 and Bluetooth headset is frequently getting disconnected. This is not happening with my other laptops. This is also not hardware problem of BT600 as I have tested with two different dongles. The disconnection is less call when BT600 is connected with USB 3.0 port of MAC
Replies
1
Boosts
0
Views
1.2k
Activity
Nov ’21
Перестали обнаруживаться USB и MicroSD
Добрый день, после перехода на MacOS Montaray, при подключении хаба Canyon, (сам он при этом работает, индикатор подсвечивается, зарядку через него идет) перестали работать USB 2.0 , 3.0 и MicroSD. Ранее на BigSur все было корректно, как теперь работать за ПК? Нужно перекидывать фото с MicroSD, пользоваться флешками и внешними накопителями
Replies
0
Boosts
0
Views
741
Activity
Nov ’21