node.js usb InEndpoint Error under Ubuntu 12.04 Arm 7 Cortex -
I have trouble on your current target hardware (using standard) which intrinsically Aarmvi 7 node with the USB module. When using JS it works well under my PC, where I developed it, but now there are problems while ports for the target while reading the device while using the USB modules transmit method.
Here are some details of the system:
Linux utility -ubntu desktop 3k0k35 semi-FX 6-4 # 123 SMP master L2 Sitnbr 10:41: 30 ISAC 2013 armv7l armv7l armv7l gnu / linux libsb version: 1.0-9 or 1.0-18 (both test) node.js version: 0.10.22 (Maximum 0.10.x version to run on target) USB version: latest, ( But
The mistakes I'm getting (in this order) are the following:
{[error: ** unknown **] Errno: 6}
or
{[error: ** unknown **] errno: 2}
I have seen error numbers come directly from libusb (errno.h):
#define ENOFILE 2 / * No such file or directory / # define ENOENT 2 # define ENXIO 6 / * No such device or I do not know * /
My application source code:
var usb = require ( 'usb'); Var Panl_on_ USB = usb.findByIds (conf. USB_VID, conf.USB_PID); panel_on_USB.open (); Console.log ("Interface:"); Console.log (panel_on_USB.interface (0)); Console.log ("timeout:" + panel_on_USB.timeout); Var panel_interface = panel_on_USB.in.infaceface (0); Panel_interface.claim (); Console.log ("isKernelDriverActive:" + panel_interface.isKernelDriverActive ()); Console.log ("Descriptor:" + Panel_Interface Displaceer); Console.log ("panel_interface:" + panel_interface.endpoints); Console.log ("LIBUSB_ENDPOINT_IN =" + usb.LIBUSB_ENDPOINT_IN); Console.log ("LIBUSB_ENDPOINT_OUT =" + usb.LIBUSB_ENDPOINT_OUT); Console.log (panel_interface.endpoint (1) .direction); Console.log (panel_interface.endpoint (2) .direction); Console.log (panel_interface.endpoint (131) .direction); Console.log (panel_interface.endpoint (132) .direction);
Output to the console:
Interface: {Device: {busNumber: 2, deviceAddress: 3, deviceDescriptor: {bLength: 18, bDescriptorType: 1 , BCDUSB: 512, BDICE Class: 0, BDESSESS Class: 0, BMXPrintocol: 0, BMXPacket SEJE 0: 8, IDWander: 1240, IDPPT: 62765, BCDDiveWice: 0, IMNitier: 1, IPRDect: 2, ISERRAL NUMBER: 0, BNI configuration : 1} Interface: [[Circular]]}, ID: 0, altSetting: 0, Descriptor: {bLength: 9, bDescriptorType: 4, bInterfaceNumber: 0, bAlternateSetting: 0, bNumEndp Oints: 4, bInterfaceClass: 255, bInterfaceSubClass: 255, bInterfaceProtocol: 255, iInterface: 0, Extra: & lt; Buffer & gt; endpoint: [[object], [object], [object], [object]]}, interface number: 0, endpoint: [{device: [object], descriptor: [object], address: 1 , Transfer type: 2}, {device: [object] descriptor: [object], address: 2 Transfer type: 2}, {device: [object] descriptor: [object], address: 131, transfer type: 2}, {device [object], descriptor: [object], address: 132, transferType: 2}]} timeout: 1000 isKernelDriverActive: true narrator: [commodity] panel_i Nterface: The error of the transfer call exited out in [commodity object], [commodity object], [commodity object], [commodity object] LIBUSB_ENDPOINT_IN = 128 LIBUSB_ENDPOINT_OUT =
in out
:
panel_interface.endpoint (131) .transfer (Length_Total_Bytes, function (error, data) {if (error) {// if (conf.Debug_Console_Output) {console.log ("USB_receive_Error:"); Console.log (error); //}} //. Data handling done here ...}};
Any ideas about this?
In the form of a missile match and the transfer method Set the length. As always, a complete buffer will return to the host (which is wMaxPacketSize) in my case by following the following code problem: In_Transfer_Length = 1 * panel_interface.endpoint (131) on the following code:
Descriptor.wMaxPacketSize; panel_interface.endpoint (131) .transfer (In_Transfer_Length, function (error data) {
For more information about this not solve the problem on GitHub:
Comments
Post a Comment