• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# USB Error Codes
2
3> **NOTE**
4>
5> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](../errorcode-universal.md).
6
7## 14400001 USB Device Connection Denied
8
9**Error Message**
10
11Permission denied. Call requestRight or requestAccessoryRight to get the permission or USBDevicePipe access right first.
12
13**Description**
14
15This error code is reported if a certain API of the USB module is called but the required permission is not granted.
16
17**Possible Causes**
18
19The permission to access the USB device is not granted.
20
21**Procedure**
22
23Call **requestRight** to request for the permission to access the USB device.
24
25## 14400002 HDC Disabled
26
27**Error Message**
28
29Permission denied. The HDC is disabled by the system.
30
31**Description**
32
33This error code is reported if HDC is disabled by the system.
34
35**Possible Causes**
36
37The USB debugging permission is not granted.
38
39**Procedure**
40
41Apply for the USB debugging permission.
42
43## 14400003 Port Role Switching Unsupported
44
45**Error Message**
46
47Unsupported operation. The current device does not support port role switching.
48
49**Description**
50
51This error code is reported if port role switching is not supported. The device does not support port role switching.
52
53**Possible Causes**
54
55The port role is incorrect.
56
57**Procedure**
58
59Use the correct port role.
60
61## 14400004 Service Exception
62
63**Error Message**
64
65Service exception. Possible causes: No accessory is plugged in.
66
67**Description**
68
69This error code is reported if the service is abnormal.
70
71**Possible Causes**
72
73No accessory is inserted.
74
75**Procedure**
76
77Insert the accessory.
78
79## 14400005 Database Operation Exception
80
81**Error Message**
82
83Database operation exception.
84
85**Description**
86
87This error code is reported if the database operation is abnormal.
88
89**Procedure**
90
91Call the API again.
92
93## 14400006 USB Device Function Unsupported
94
95**Error Message**
96
97Unsupported operation. The function is not supported.
98
99**Description**
100
101This error code is reported if the requested USB device function is not supported.
102
103**Possible Causes**
104
105The USB device function is not supported.
106
107**Procedure**
108
109Use the correct USB device function.
110
111## 14401001 Target USB Accessory Unmatched
112
113**Error Message**
114
115The target USBAccessory not matched.
116
117**Description**
118
119This error code is reported if the target USB accessory does not match the device.
120
121**Procedure**
122
123Call **getAccessoryList** to obtain the accessory list and use a matched USB accessory to try again.
124
125## 14401002 Failed to Open the Native Accessory Node
126
127**Error Message**
128
129Failed to open the native accessory node.
130
131**Description**
132
133This error code is reported if the attempt to open the native accessory node fails.
134
135**Procedure**
136
137Call the API again.
138
139## 14401003 Accessory Opened Repeatedly
140
141**Error Message**
142
143Cannot reopen the accessory.
144
145**Description**
146
147This error code is reported if an accessory is opened repeatedly.
148
149**Procedure**
150
151The accessory has been opened. Continue to perform subsequent operations.
152
153## 14400007 Resource Busy
154
155**Error Message**
156
157Resource busy.
158
159**Description**
160
161This error code is reported if the requested resource is in use.
162
163**Procedure**
164
165Check whether [usbManager.claimInterface](js-apis-usbManager.md#usbmanagerclaiminterface) is successfully called.
166
167## 14400008 No Device (Disconnected)
168
169**Error Message**
170
171No such device (it may have been disconnected).
172
173**Description**
174
175This error code is reported if libusb fails to identify the correct device information.
176
177**Procedure**
178
179Check whether the device type is correct and whether the device is successfully connected.
180
181## 14400009 Insufficient Memory
182
183**Error Message**
184
185Insufficient memory.
186
187**Description**
188
189This error code is reported if no memory is available when libusb applies for memory. The maximum size of data transferred by libusb at a time is 1 KB.
190
191**Procedure**
192
193Clear memory in a timely manner.
194
195## 14400010 Unrecognized Error
196
197**Error Message**
198
199Other USB error. Possible causes:Unrecognized discard error code.
200
201**Description**
202
203This error code is reported if an error unrecognized by libusb has occurred.
204
205**Procedure**
206
207Correct the error by referring to the related documentation, and try again.
208
209## 14400011 No Ongoing Transfer Found
210
211**Error Message**
212
213If the transfer is not in progress, already complete, or already cancelled.
214
215**Description**
216
217This error code is reported if the current data transfer has been canceled or completed.
218
219**Procedure**
220
221Initiate a new data transfer request.
222
223## 14400012 I/O Error
224
225**Error Message**
226
227Transmission I/O error.
228
229**Description**
230
231This error code is reported if libusb fails to perform a read/write operation.
232
233**Procedure**
234
235Try again.
236