Post

Replies

Boosts

Views

Activity

Reply to KEXT to DEXT:Unable to getInterface of my IOUSBHostDevice
thank you for your replies , Now i am able to get the interface, But stumbled on another issue, I am inheriting IOUserSerial and overriding "TxDataAvailable()" and RxDataAvailable(), I am getting control in TxAvailable, Not getting how to read data from here , tried overriding connectQueues(), which is leading to error "ERROR occurred while attempting to open port,, 100:Access denied" In "CoolTerm" Application On "Connect" Button Click In log stream I can see as below  IOUserSerial::private: ConnectQueues 0x6000028f4058 IOUserSerial::private:DisconnectQueues 0x6000028f4058 getting very similar Error when i just Inherit ioUserUSBSerial "ERROR occurred while attempting to open port,, 100:Access denied" In "CoolTerm" Application On "Connect" Button Click In log stream I can see as below  IOUserSerial::private: 522 0x6000028f4058 IOUserSerial::private:523 0x6000028f4058 IOUserSerial::private:110 0x6000028f4058 Please help me with this,
Mar ’21
Reply to KEXT to DEXT:Unable to getInterface of my IOUSBHostDevice
Hi  Drewbadour As your suggestion i am using IOUserUSBSerial , i am not overriding Connectqueues, DisconnectQueues,(According to apple document "At activation time, IOUserUSBSerial object automatically creates memory buffers for managing data moving to and from the USB device") TxAvailable, RxAvailable, (Since TxAvailable and TxAvailable are Final functions) Here are some logs i am able to see when i try to connect in application(coolterm or Screen commandline tool) .615828+0530 0x216d Activity 0x57a7 731 0 CoolTerm: (AppKit) sendActionFrom: .616360+0530 0x216d Default 0x0 0 0 kernel: (IOUserSerial) IOUserSerial::call0(allocResources) == .616376+0530 0x216d Default 0x0 0 0 kernel: (IOUserSerial) IOUserSerial::call0() locklevel = 1 .616481+0530 0x1fcb Default 0x0 0 0 kernel: (sc.knight.MyUserUSBInterfaceDriver.dext) IOUserSerial::private: 522 0x6000034bc058 .616517+0530 0x216d Default 0x0 0 0 kernel: (IOUserSerial) IOUserSerial::call0() == e00002c7 .616524+0530 0x216d Default 0x0 0 0 kernel: (IOUserSerial) IOUserSerial::call0(freeResources) == .616528+0530 0x216d Default 0x0 0 0 kernel: (IOUserSerial) IOUserSerial::call0() locklevel = 1 .616599+0530 0x1fcb Default 0x0 0 0 kernel: (sc.knight.MyUserUSBInterfaceDriver.dext) IOUserSerial::private: 533 0x6000034bc058 .616606+0530 0x1fcb Default 0x0 0 0 kernel: (sc.knight.MyUserUSBInterfaceDriver.dext) IOUserSerial::private: 110 0x6000034bc058 .616633+0530 0x216d Default 0x0 0 0 kernel: (IOUserSerial) IOUserSerial::call0() == e00002c7
Mar ’21
Reply to KEXT to DEXT:Unable to getInterface of my IOUSBHostDevice
Hi Drewbadour, Parallelly I am trying both ways of inheriting IOUserUSBSerial and IOUserSerial Below is my sequence with IOUserSerial class, In start function I have " opened device SetConfiguration registerService Opened Interface copyPipe ConnectQueues pipe-IO() ,-- IO function returning device "2d8: not ready Error". I have also tried pipe-IO in Tx Available() function , -- IO function returning device "2d8: not ready Error". As suggested by you I have inherited "HwProgramBaudRate" and setting baud rate and etc , which is successfull, All function calls returning Success exept IO function any help is appriciated,
Apr ’21
Reply to KEXT to DEXT:Unable to getInterface of my IOUSBHostDevice
Drewbadour, Happy to see your reply , please give me some light on my doubt please with IOUserUSBSerial , -- i am able to read Firmware versions using device request ,(in start function) On Clicking Connect in USB application(coolterm/screen)" Permission denied " error is coming, i see after UserSerial::connectqueue() , Disconnect sequence is initiated, How Tx and Rx data is managed ? with IOUserSerial , I am able to get TxAvalable function trying to write tx value to device using pip-IO(),--Success but not recieving RxAvailable Function can u give me correct sequence of RxAvailable,TxAvailable, RxfreeSpaceAvailable,TxFreeSpaceAvailable, which function to override which to call , where to read the data from and write data to ,
Apr ’21
Reply to "2d8:Not Ready Error"
hi MrSkute , Thank you for your reply, i am able to progress with your inputs, I am calling connectqueues function In Tx available(also tried calling in start function) and passing txqmd to device using pipe-IO, Is this the correct way ? Or should i override connectqueues(),- i am not receiving what i have sent. i am able to receive some garbage value. parallelly i am trying to make it work with IOUSerUSBSerial class , I am getting "100:Access denied" Error in coolTerm/Screen Application when i click on Connect In logs i am able to see super class functions "ConnectQueues,DIsconnectQueues,Deactivate " being called Any input is appriciated
Apr ’21
Reply to KEXT to DEXT:Unable to getInterface of my IOUSBHostDevice
Hi Drewbadour, We are inheriting "IOUserUSBSerial" and using IOUSBHostDevice as a provider class to match our device, In start function we are getting the device, able to configure the device. below is the Start function kern_return_t IMPL(MyUserUSBInterfaceDriver, Start){     kern_return_t                    ret;     ivars-ioDevice = OSDynamicCast(IOUSBHostDevice, provider);     ret = ivars-ioDevice-Open(this, 0, NULL);     ivars-ioDevice-SetConfiguration(2, false); /* code logic to open the interface and device request is successful, Able to communicate with device Firmware*/     ret = Start(provider, SUPERDISPATCH);     return  RegisterService(); } After DEXT is loaded IOReg is as attached IOReg - https://developer.apple.com/forums/content/attachment/590e1a34-de62-44a6-8e92-cb76925e91fc In Cool Term Or any Serial application when we try to open the serial node its giving "An Error Occured while attempting to open the port, 100:Access denied" And I can see the below logs -- e00002c7 ="unsupported function" kernel: (IOUserSerial) IOUserSerial::call0(allocResources) == kernel: (IOUserSerial) IOUserSerial::call0() locklevel = 1 kernel: (sc.knight.MyUserUSBInterfaceDriver.dext) IOUserSerial::private: 522 0x600002984058 kernel: (IOUserSerial) IOUserSerial::call0() == e00002c7 kernel: (IOUserSerial) IOUserSerial::call0(freeResources) == kernel: (IOUserSerial) IOUserSerial::call0() locklevel = 1 kernel: (sc.knight.MyUserUSBInterfaceDriver.dext) IOUserSerial::private: 533 0x600002984058 kernel: (sc.knight.MyUserUSBInterfaceDriver.dext) IOUserSerial::private: 110 0x600002984058 kernel: (IOUserSerial) IOUserSerial::call0() == e00002c7 Our Device has Bulk in and out pipes, Connectqueues function is not automatically setting up, Please let us know how we can debug this On Another method we have tried is Adding "AppleUSBHostCompositeDevice" as provider, We got the interface But IOHostInterface is not loading to match (init() and start() are not called)
Apr ’21