Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UsbDeviceInterface's Device endoints are not always in the default addresses #86

Open
ttu opened this issue May 8, 2018 · 1 comment

Comments

@ttu
Copy link

ttu commented May 8, 2018

Current implementation https://github.com/noble/node-bluetooth-hci-socket/blob/master/lib/usb.js#L94:

  this._aclDataOutEndpoint = this._usbDeviceInterface.endpoint(0x02);
  
  this._hciEventEndpoint = this._usbDeviceInterface.endpoint(0x81);
  this._aclDataInEndpoint = this._usbDeviceInterface.endpoint(0x82);

Marvell AVASTAR adapter has endpoints in the different address then default addresses are

  this._aclDataOutEndpoint = this._usbDeviceInterface.endpoint(0x04);

  this._hciEventEndpoint = this._usbDeviceInterface.endpoint(0x83);
  this._aclDataInEndpoint = this._usbDeviceInterface.endpoint(0x84);

this._usbDeviceInterface:

 Interface {                  
   device:                    
    Device {                  
      busNumber: 1,           
      deviceAddress: 4,       
      deviceDescriptor:       
       { bLength: 18,         
         bDescriptorType: 1,  
         bcdUSB: 512,         
         bDeviceClass: 224,   
         bDeviceSubClass: 1,  
         bDeviceProtocol: 1,  
         bMaxPacketSize0: 64, 
         idVendor: 4742,      
         idProduct: 8268,     
         bcdDevice: 12801,    
         iManufacturer: 1,    
         iProduct: 2,         
         iSerialNumber: 3,    
         bNumConfigurations: 1
      portNumbers: [ 6 ],     
      interfaces: [ [Circular]
      _configDescriptor:      
       { bLength: 9,          
         bDescriptorType: 2,  
         wTotalLength: 177,   
         bNumInterfaces: 2,   
         bConfigurationValue: 
         iConfiguration: 0,   
         bmAttributes: 224,   
         bMaxPower: 250,      
         extra: <Buffer >,    
         interfaces: [Array] }
   id: 0,                     
   altSetting: 0,             
   descriptor:                
    { bLength: 9,             
      bDescriptorType: 4,     
      bInterfaceNumber: 0,    
      bAlternateSetting: 0,   
      bNumEndpoints: 3,       
      bInterfaceClass: 224,   
      bInterfaceSubClass: 1,  
      bInterfaceProtocol: 1,  
      iInterface: 0,          
      extra: <Buffer >,       
      endpoints: [ [Object], [
   interfaceNumber: 0,        
   endpoints:                 
    [ InEndpoint {            
        device: [Device],     
        descriptor: [Object], 
        address: 131,         
        transferType: 3 },    
      InEndpoint {            
        device: [Device],     
        descriptor: [Object], 
        address: 132,         
        transferType: 2 },    
      OutEndpoint {           
        device: [Device],     
        descriptor: [Object], 
        address: 4,           
        transferType: 2 } ] } 
@rzr
Copy link

rzr commented Jan 26, 2021

Please compare to @abandonware fork and comment

#123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants