Мне интересно, есть ли способ использовать USB-модем (из видов Huawei E1550) на OS X в общем виде, например, универсальный USB-модем. Проблема в том, что ОС не признает это как законное устройство ACC CDC (оно есть, но оно не рекламируется как таковое).Codeless kext для принудительного использования конкретного драйвера (CDC-ACM)
В Linux ключ-ключ автоматически распознается как последовательное USB-устройство.
Есть причины, по которым я не хочу ни драйверов ZTE, ни Huawei на каких-либо из моих компьютеров: эти люди пишут вещи, которые едва работают (мой последний опыт работы с драйверами ZTE включал рассылку моих журналов, hogging RAM и меня неспособность отключить это), их драйверы не совместимы с первыми, они не хотят синхронизировать их с более новой версией ОС, и обычно они намерены распространять эти драйверы с носителем-носителем.
Документация разработчика Apple нечетко описывает, что без кодового kext может быть записано принудительное использование определенного драйвера на соответствующем устройстве или предотвращение загрузки универсального драйвера для соответствующего устройства. На самом деле, большинство поисков на кодовом kexts дают вопросы типа «как я могу запретить мой серийный ключ быть признанным как модем?», В то время как то, что я хочу, абсолютно противоположно!
Мои попытки написать такой кодовый kext пока закончились фиаско - kextutil сообщает, что kext загружен успешно, однако его нет, и AppleCDCACM.kext (который имеет IOClass, который я хочу использовать).
JFYI, то lsusb информация, собрана из Linux:
Bus 004 Device 005: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x12d1 Huawei Technologies Co., Ltd. idProduct 0x1001 E169/E620/E800 HSDPA Modem bcdDevice 0.00 iManufacturer 2 HUAWEI Technology iProduct 1 HUAWEI Mobile iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 85 bNumInterfaces 3 bConfigurationValue 1 iConfiguration 3 Qualcomm Configuration bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 32 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 32 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 32 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 32 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 32 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 32 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 bNumConfigurations 1 can't get debug descriptor: Resource temporarily unavailable Device Status: 0x0001 Self Powered
Интерфейс Я хочу подключить это интерфейс 0 (модем).
Вот как ioreg
видит:
| | | | | +-o HUAWEI [email protected] | | | | | +-o AppleUSBHostLegacyClient | | | | | +-o AppleUSBHostCompositeDevice | | | | | +-o [email protected] | | | | | | { | | | | | | "USBPortType" = 0 | | | | | | "IOCFPlugInTypes" = {"2d9786c6-9ef3-11d4-ad51-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"} | | | | | | "bcdDevice" = 0 | | | | | | "USBSpeed" = 3 | | | | | | "idProduct" = 4097 | | | | | | "bConfigurationValue" = 1 | | | | | | "bInterfaceSubClass" = 255 | | | | | | "locationID" = 487653376 | | | | | | "IOGeneralInterest" = "IOCommand is not serializable" | | | | | | "IOClassNameOverride" = "IOUSBInterface" | | | | | | "AppleUSBAlternateServiceRegistryID" = 4294969542 | | | | | | "idVendor" = 4817 | | | | | | "bInterfaceProtocol" = 255 | | | | | | "bAlternateSetting" = 0 | | | | | | "bInterfaceNumber" = 0 | | | | | | "bInterfaceClass" = 255 | | | | | | } | | | | | | | | | | | +-o [email protected] | | | | | | { | | | | | | "USBPortType" = 0 | | | | | | "IOCFPlugInTypes" = {"2d9786c6-9ef3-11d4-ad51-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"} | | | | | | "bcdDevice" = 0 | | | | | | "USBSpeed" = 3 | | | | | | "idProduct" = 4097 | | | | | | "bConfigurationValue" = 1 | | | | | | "bInterfaceSubClass" = 255 | | | | | | "locationID" = 487653376 | | | | | | "IOGeneralInterest" = "IOCommand is not serializable" | | | | | | "IOClassNameOverride" = "IOUSBInterface" | | | | | | "AppleUSBAlternateServiceRegistryID" = 4294969544 | | | | | | "idVendor" = 4817 | | | | | | "bInterfaceProtocol" = 255 | | | | | | "bAlternateSetting" = 0 | | | | | | "bInterfaceNumber" = 1 | | | | | | "bInterfaceClass" = 255 | | | | | | } | | | | | | | | | | | +-o [email protected] | | | | | { | | | | | "USBPortType" = 0 | | | | | "IOCFPlugInTypes" = {"2d9786c6-9ef3-11d4-ad51-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"} | | | | | "bcdDevice" = 0 | | | | | "USBSpeed" = 3 | | | | | "idProduct" = 4097 | | | | | "bConfigurationValue" = 1 | | | | | "bInterfaceSubClass" = 255 | | | | | "locationID" = 487653376 | | | | | "IOGeneralInterest" = "IOCommand is not serializable" | | | | | "IOClassNameOverride" = "IOUSBInterface" | | | | | "AppleUSBAlternateServiceRegistryID" = 4294969546 | | | | | "idVendor" = 4817 | | | | | "bInterfaceProtocol" = 255 | | | | | "bAlternateSetting" = 0 | | | | | "bInterfaceNumber" = 2 | | | | | "bInterfaceClass" = 255 | | | | | } | | | | |
До сих пор Info.plist выглядит следующим образом:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>15C27b</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>name.fedevych.GenericWWAN</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>GenericWWAN</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>99.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>99.0.0</string>
<key>IOKitPersonalities</key>
<dict>
<key>HUAWEI_0x12d11001_Control</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.driver.usb.cdc.acm</string>
<key>IOClass</key>
<string>AppleUSBACMControl</string>
<key>IOProviderClass</key>
<string>IOUSBHostInterface</string>
<key>idVendor</key>
<integer>4817</integer>
<key>idProduct</key>
<integer>4097</integer>
<key>bcdDevice</key>
<integer>0</integer>
<key>bInterfaceNumber</key>
<integer>0</integer>
<key>bConfigurationValue</key>
<integer>1</integer>
<key>IOMatchCategory</key>
<string>com.apple.driver.AppleUSBACMControl</string>
</dict>
<key>HUAWEI_0x12d11001_Data</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.driver.usb.cdc.acm</string>
<key>IOClass</key>
<string>AppleUSBACMData</string>
<key>IOProviderClass</key>
<string>IOUSBHostInterface</string>
<key>idVendor</key>
<integer>4817</integer>
<key>idProduct</key>
<integer>4097</integer>
<key>bcdDevice</key>
<integer>0</integer>
<key>bInterfaceNumber</key>
<integer>0</integer>
<key>bConfigurationValue</key>
<integer>1</integer>
</dict>
</dict>
<key>OSBundleLibraries</key>
<dict/>
</dict>
</plist>
Любые указатели?
Одна вещь ... В 10.11 я вижу /S/L/E/AppleUSBCDC.kext, /S/L/E/AppleUSBACM.kext и другие для ECM, EEM и даже NCM и WCM (!! !). Кроме того, я не знаю, могут ли драйверы Apple делиться между контролем и данными, поскольку источники еще не созданы для 10.11. Кроме того, теперь интересно, почему QMI или MBIM пока нет, и где первоначально планируются ECM/NCM/WCM. –
К сожалению, моя ошибка. Еще два класса для управления и данных, только в одном исполняемом файле. –
Ах, извините, я все еще на 10.10.5 на моем основном MBP, я не понимал, что они изменили ситуацию в 10.11. Но похоже, что все остальное все еще стоит. Удачи, получив 2 драйвера для работы только с одним интерфейсом! – pmdj