CN106598798A - Method of Android intelligent device to detect USB device - Google Patents
Method of Android intelligent device to detect USB device Download PDFInfo
- Publication number
- CN106598798A CN106598798A CN201611176914.9A CN201611176914A CN106598798A CN 106598798 A CN106598798 A CN 106598798A CN 201611176914 A CN201611176914 A CN 201611176914A CN 106598798 A CN106598798 A CN 106598798A
- Authority
- CN
- China
- Prior art keywords
- usb device
- usb
- android
- equipment
- android intelligent
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2205—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
- G06F11/221—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test buses, lines or interfaces, e.g. stuck-at or open line faults
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2273—Test methods
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention relates to an intelligent device technology. The invention provides a method of an Android intelligent device to detect a USB device for solving the problem that whether the state of the USB device is normal is not detected in the Android system of the existing Android intelligent device. The technical scheme can be summarized as follows: firstly, when the USB device is accessed to the Android intelligent device, an application program traverses /sys/bus/usb/device to find a newly accessed USB device path, judges whether a newly added device path exists, if the newly added device path exists and only one newly added device path exists or an ep_ee file exists in a newly added directory, it indicates that the number of the devices accessed to a current USB port has exceeded the supported number, otherwise, the application program checks whether a driver directory exists, if so, it is deemed that the USB device is normally accessed, and otherwise, it indicates that the current USB device is not driven. The method provided by the invention has the beneficial effects of bringing convenience for users, and is suitable for Android intelligent devices.
Description
Technical field
The present invention relates to smart machine technology, more particularly to Android intelligent equipment detect the technology of USB device.
Background technology
Do not detect the whether normal function of USB device state in the Android system of traditional Android intelligent equipment, and by
The restriction of number is accessed in USB device state or smart machine terminal port USB equipment, part USB device can be caused normally to make
With.
The content of the invention
The invention aims to not detect that USB device state is in solving the Android system of current Android intelligent equipment
No normal problem, there is provided a kind of method that Android intelligent equipment detects USB device.
The present invention solves its technical problem, and the technical scheme of employing is, the method that Android intelligent equipment detects USB device,
Characterized in that, comprising the following steps:
Step 1, access or when extracting Android intelligent equipment when USB device, the UsbHostManager of Android intelligent equipment
The plug broadcast of transmission equipment, and additional information is set to access or extracting;
Step 2, background application are received after equipment plug broadcast, are postponed certain hour and are processed, and are taken out wherein
Additional information, determine whether to extract, if then deleting the institute of the USB device in access device hash table in application program
There is information, otherwise into step 3;
Step 3, application program traversal/sys/bus/usb/device, will set in the catalogue under the path and application program
The device path of facility information is compared in standby hash table, finds the USB device path of new access, and determines whether newly added equipment
Path, if having and newly added equipment path only one of which, into step 4, otherwise into step 5;
Step 4, show that the number of devices that current USB port is accessed has exceeded supported number, point out user to set the USB
It is standby to be linked into other USB ports;
Step 5, the newly-increased catalogue of entrance have checked whether ep_ee files, step 4 are entered if having, otherwise into step 6;
Step 6, driver catalogues are checked whether, thought that the USB device is accessed if having normal, otherwise shown current
USB device does not drive, and points out user.
Specifically, in step 1, the Android intelligent equipment is the intelligent television of Android system or the intelligent sliding of Android system
Dynamic terminal.
Further, the intelligent mobile terminal of the Android system is the smart mobile phone of Android system or putting down for Android system
Plate computer.
Specifically, in step 2, the certain hour is 10 seconds.
Further, it is further comprising the steps of:
When step 7, user select to check all USB device informations, USB device letter is read from the hash table of application program
Breath, shows each USB device information in the form of multistage catalogue.
The invention has the beneficial effects as follows, in the present invention program, the side of USB device is detected by above-mentioned Android intelligent equipment
Method, can provide the user with abnormal cause prompting when new access USB device is abnormal, so as to guide user's solve problem, increase
Strong Consumer's Experience, facilitates user.
Specific embodiment
With reference to embodiment, technical scheme is described in detail.
Android intelligent equipment of the present invention detects that the method for USB device is:First when USB device accesses or extract ARIXTRA
During smart machine, the UsbHostManager of Android intelligent equipment sends equipment plug broadcast, and arranges additional information to access
Or extract, background application is received after equipment plug broadcast, is postponed certain hour and is processed, and takes out additional letter therein
Breath, determines whether to extract, if then deleting all information of the USB device in access device hash table in application program,
Otherwise application program traversal/sys/bus/usb/device, by equipment hash table in the catalogue under the path and application program
The device path of facility information is compared, and finds the USB device path of new access, and determines whether newly added equipment path, if having
And newly added equipment path only one of which, then show that the number of devices that current USB port is accessed has exceeded supported number, point out to use
The USB device is linked into other USB ports by family, is otherwise entered newly-increased catalogue and has been checked whether ep_ee files, is shown if having
The number of devices that current USB port is accessed has exceeded supported number, points out user that the USB device is linked into into other USB ends
Mouthful, driver catalogues have otherwise been checked whether, think that the USB device is accessed if having normal, otherwise show that current USB device does not have
There is driving, point out user.
Embodiment
The method that the Android intelligent equipment of the embodiment of the present invention detects USB device, it is comprised the following steps:
Step 1, access or when extracting Android intelligent equipment when USB device, the UsbHostManager of Android intelligent equipment
The plug broadcast of transmission equipment, and additional information is set to access or extracting.
In this step, Android intelligent equipment can be the intelligent television of Android system or the intelligent mobile terminal of Android system
Deng, and panel computer of the smart mobile phone of the intelligent mobile terminal of Android system such as Android system or Android system etc..
Step 2, background application are received after equipment plug broadcast, are postponed certain hour and are processed, and are taken out wherein
Additional information, determine whether to extract, if then deleting the institute of the USB device in access device hash table in application program
There is information, otherwise into step 3.
In this step, certain hour can be 10 seconds.When its object is to avoid start or USB abnormal electrical power supplies and cause frequency
It is numerous to send the inessential process that equipment plug broadcast is caused.
Step 3, application program traversal/sys/bus/usb/device, will set in the catalogue under the path and application program
The device path of facility information is compared in standby hash table, finds the USB device path of new access, and determines whether newly added equipment
Path, if having and newly added equipment path only one of which, into step 4, otherwise into step 5.
Step 4, show that the number of devices that current USB port is accessed has exceeded supported number, point out user to set the USB
It is standby to be linked into other USB ports.
Step 5, the newly-increased catalogue of entrance have checked whether ep_ee files, step 4 are entered if having, otherwise into step 6.
Step 6, driver catalogues are checked whether, thought that the USB device is accessed if having normal, otherwise shown current
USB device does not drive, and points out user.
Can also comprise the following steps:
When step 7, user select to check all USB device informations, USB device letter is read from the hash table of application program
Breath, shows each USB device information in the form of multistage catalogue.
Claims (5)
1. the method that Android intelligent equipment detects USB device, it is characterised in that comprise the following steps:
Step 1, when USB device is accessed or when extracting Android intelligent equipment, the UsbHostManager of Android intelligent equipment sends
Equipment plug broadcast, and additional information is set to access or extracting;
Step 2, background application are received after equipment plug broadcast, are postponed certain hour and are processed, and are taken out therein attached
Plus information, determine whether to extract, if then deleting all letters of the USB device in access device hash table in application program
Breath, otherwise into step 3;
Step 3, application program traversal/sys/bus/usb/device, the catalogue under the path is dissipated with equipment in application program
The device path of facility information is compared in list, finds the USB device path of new access, and determines whether newly added equipment road
Footpath, if having and newly added equipment path only one of which, into step 4, otherwise into step 5;
Step 4, show that the number of devices that current USB port is accessed has exceeded supported number, point out user to connect the USB device
Enter to other USB ports;
Step 5, the newly-increased catalogue of entrance have checked whether ep_ee files, step 4 are entered if having, otherwise into step 6;
Step 6, driver catalogues are checked whether, thought that the USB device is accessed if having normal, otherwise shown that current USB sets
Standby no driving, points out user.
2. the method that Android intelligent equipment as claimed in claim 1 detects USB device, it is characterised in that described in step 1
Android intelligent equipment is the intelligent television of Android system or the intelligent mobile terminal of Android system.
3. the method that Android intelligent equipment as claimed in claim 2 detects USB device, it is characterised in that the Android system
Intelligent mobile terminal for Android system smart mobile phone or Android system panel computer.
4. the method that Android intelligent equipment as claimed in claim 1 detects USB device, it is characterised in that described in step 2
Certain hour is 10 seconds.
5. the method that Android intelligent equipment as claimed in claim 1 or 2 or 3 or 4 detects USB device, it is characterised in that also wrap
Include following steps:
When step 7, user select to check all USB device informations, USB device information is read from the hash table of application program,
Show each USB device information in the form of multistage catalogue.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611176914.9A CN106598798B (en) | 2016-12-19 | 2016-12-19 | The method of Android intelligent equipment detection USB device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611176914.9A CN106598798B (en) | 2016-12-19 | 2016-12-19 | The method of Android intelligent equipment detection USB device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106598798A true CN106598798A (en) | 2017-04-26 |
CN106598798B CN106598798B (en) | 2019-11-19 |
Family
ID=58599473
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611176914.9A Active CN106598798B (en) | 2016-12-19 | 2016-12-19 | The method of Android intelligent equipment detection USB device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106598798B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107357719A (en) * | 2017-06-14 | 2017-11-17 | 上海斐讯数据通信技术有限公司 | A kind of operating function method of testing for storing shared file, apparatus and system |
CN109254935A (en) * | 2018-08-17 | 2019-01-22 | 青岛海信电器股份有限公司 | The recognition methods of smart television external storage equipment type and device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050097247A1 (en) * | 1999-12-30 | 2005-05-05 | James Morrow | Meta-message set with real-time and database aspects |
CN1877550A (en) * | 2006-01-13 | 2006-12-13 | 深圳创维-Rgb电子有限公司 | Method for implementing real-time hot-plug of USB memory under TV embedded Linux system |
US20110249306A1 (en) * | 2010-02-09 | 2011-10-13 | I.R.I.S. | Autonomous sheet-fed scanner |
CN102404603A (en) * | 2011-11-17 | 2012-04-04 | 康佳集团股份有限公司 | Method and system for detecting inserting and extracting states of USB device on set top box |
CN103186487A (en) * | 2011-12-31 | 2013-07-03 | 青岛海尔软件有限公司 | Method for real-time recognition of USB device hot plugging |
CN103186486A (en) * | 2011-12-30 | 2013-07-03 | 青岛海尔软件有限公司 | Method for identifying, plugging and unplugging USB (universal serial bus) devices under Linux system in real time |
CN103440214A (en) * | 2013-09-03 | 2013-12-11 | 深圳雷柏科技股份有限公司 | Method and device for rapidly identifying plugged USB (Universal Serial Bus) equipment |
CN103546704A (en) * | 2013-07-02 | 2014-01-29 | Tcl集团股份有限公司 | Method and television for recognizing USB (universal serial bus) devices plugged in television |
-
2016
- 2016-12-19 CN CN201611176914.9A patent/CN106598798B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050097247A1 (en) * | 1999-12-30 | 2005-05-05 | James Morrow | Meta-message set with real-time and database aspects |
US7721006B2 (en) * | 1999-12-30 | 2010-05-18 | Bally Gaming, Inc. | Meta-message set with real-time and database aspects |
CN1877550A (en) * | 2006-01-13 | 2006-12-13 | 深圳创维-Rgb电子有限公司 | Method for implementing real-time hot-plug of USB memory under TV embedded Linux system |
US20110249306A1 (en) * | 2010-02-09 | 2011-10-13 | I.R.I.S. | Autonomous sheet-fed scanner |
CN102404603A (en) * | 2011-11-17 | 2012-04-04 | 康佳集团股份有限公司 | Method and system for detecting inserting and extracting states of USB device on set top box |
CN103186486A (en) * | 2011-12-30 | 2013-07-03 | 青岛海尔软件有限公司 | Method for identifying, plugging and unplugging USB (universal serial bus) devices under Linux system in real time |
CN103186487A (en) * | 2011-12-31 | 2013-07-03 | 青岛海尔软件有限公司 | Method for real-time recognition of USB device hot plugging |
CN103546704A (en) * | 2013-07-02 | 2014-01-29 | Tcl集团股份有限公司 | Method and television for recognizing USB (universal serial bus) devices plugged in television |
CN103440214A (en) * | 2013-09-03 | 2013-12-11 | 深圳雷柏科技股份有限公司 | Method and device for rapidly identifying plugged USB (Universal Serial Bus) equipment |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107357719A (en) * | 2017-06-14 | 2017-11-17 | 上海斐讯数据通信技术有限公司 | A kind of operating function method of testing for storing shared file, apparatus and system |
CN109254935A (en) * | 2018-08-17 | 2019-01-22 | 青岛海信电器股份有限公司 | The recognition methods of smart television external storage equipment type and device |
Also Published As
Publication number | Publication date |
---|---|
CN106598798B (en) | 2019-11-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2985695B1 (en) | Method and device for setting application program state | |
CN103326149A (en) | Sim card connector and mobile terminal | |
CN102890666B (en) | A kind of devices and methods therefor of shared interface, communication terminal | |
CN106454498B (en) | The method of Android platform management USB device | |
CN103177206A (en) | Information privacy method and electronic terminal | |
WO2010112368A3 (en) | Method for reading attributes from an id token via a mobile radio connection | |
CN106598798A (en) | Method of Android intelligent device to detect USB device | |
CN104519405A (en) | Control method and electronic equipment | |
CN105554756A (en) | Method for preventing from stealing wireless network by utilizing home gateway | |
CN105975855A (en) | Method and system for malicious code detection based on apk certificate similarity | |
CN106934277A (en) | Application program detection method and device and terminal | |
CN104318139B (en) | Intelligent terminal and the method processing data message thereof | |
CN105635852A (en) | Method and apparatus for matching of smart television with dynamic link library | |
CN105101259A (en) | WIFI identification method and intelligent terminal | |
CN105898526A (en) | Method and device for processing television program data | |
CN104202666A (en) | Smart television/set-top box application software based control method | |
CN105227414A (en) | Multi-user's binding method of smart machine under privately owned cloud environment | |
CN104834553A (en) | Service concurrent processing method for user terminal and user terminal | |
CN206441175U (en) | A kind of isolator of movable storage device | |
CN103294542B (en) | The method and its device of Process Protection | |
CN103809879B (en) | Information processing method and electronic equipment | |
CN204259162U (en) | A kind of equipment preventing wireless invasive | |
EP3048858A1 (en) | Wireless customer premise equipment and accessing method therefor | |
CN105100344A (en) | Hot plug processing method for user recognition module card, and mobile terminal | |
CN103778371A (en) | Plug-in installation monitoring method and terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |