CN106598798B - The method of Android intelligent equipment detection USB device - Google Patents

The method of Android intelligent equipment detection USB device Download PDF

Info

Publication number
CN106598798B
CN106598798B CN201611176914.9A CN201611176914A CN106598798B CN 106598798 B CN106598798 B CN 106598798B CN 201611176914 A CN201611176914 A CN 201611176914A CN 106598798 B CN106598798 B CN 106598798B
Authority
CN
China
Prior art keywords
usb device
usb
android
intelligent equipment
equipment
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.)
Active
Application number
CN201611176914.9A
Other languages
Chinese (zh)
Other versions
CN106598798A (en
Inventor
李平
周建波
杨恩泽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201611176914.9A priority Critical patent/CN106598798B/en
Publication of CN106598798A publication Critical patent/CN106598798A/en
Application granted granted Critical
Publication of CN106598798B publication Critical patent/CN106598798B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection 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/221Detection 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test 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 present invention relates to smart machine technologies.The present invention is to solve do not have to detect the whether normal problem of USB device state in the Android system of existing Android intelligent equipment, provide a kind of method of Android intelligent equipment detection USB device, its technical solution can be summarized as: first when USB device accesses Android intelligent equipment, application program traversal/sys/bus/usb/device, find the USB device path newly accessed, judge whether there is newly added equipment path, if having and having ep_ee file in only one or newly-increased catalogue, the number of devices for then showing current USB port access has been more than supported number, otherwise driver catalogue has been checked whether, think that USB device access is normal if having, otherwise show that current USB device does not drive.The invention has the advantages that facilitating user, it is suitable for Android intelligent equipment.

Description

The method of Android intelligent equipment detection USB device
Technical field
The present invention relates to smart machine technologies, the in particular to technology of Android intelligent equipment detection USB device.
Background technique
Without the detection whether normal function of USB device state in the Android system of traditional Android intelligent equipment, and by In the limitation of USB device state or smart machine terminal port USB equipment access number, will lead to part USB device can not normally make With.
Summary of the invention
The invention aims to solve to be without detection USB device state in the Android system of current Android intelligent equipment No normal problem provides a kind of method of Android intelligent equipment detection USB device.
The present invention solves its technical problem, the technical solution adopted is that, the method that Android intelligent equipment detects USB device, Characterized by comprising the following steps:
Step 1, when USB device access or extract Android intelligent equipment when, the UsbHostManager of Android intelligent equipment Sending device plug broadcast, and additional information is set for access or is extracted;
After step 2, background application receive equipment plug broadcast, delay certain time is handled, and is taken out wherein Additional information, extraction is judged whether it is, if then deleting the institute of the USB device in access device hash table in application program There is information, otherwise enters step 3;
Step 3, application program traversal/sys/bus/usb/device will be set in the catalogue and application program under the path The device path of facility information compares in standby hash table, finds the USB device path newly accessed, and judge whether there is newly added equipment Path, if having and newly added equipment path only one, enter step 4, enter if having newly added equipment path and more than one Step 5;
Step 4, the number of devices for showing current USB port access have been more than supported number, and user is prompted to set the USB It is standby to be linked into other USB ports;
Step 5 has checked whether ep_ee file into newly-increased catalogue, and 4 are entered step if having, otherwise enters step 6;
Step 6 has checked whether driver catalogue, thinks that USB device access is normal if having, otherwise shows current USB device does not drive, and prompts user.
Specifically, the Android intelligent equipment is the smart television of Android system or the intelligent sliding of Android system in step 1 Dynamic terminal.
Further, the intelligent mobile terminal of the Android system is the smart phone of Android system or putting down for Android system Plate computer.
Specifically, the certain time is 10 seconds in step 2.
Further, further comprising the steps of:
When all USB device informations are checked in step 7, user's selection, 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 advantages that detecting the side of USB device by above-mentioned Android intelligent equipment in the present invention program Method can provide the user with abnormal cause prompt when newly access USB device exception, so that user be guided to solve the problems, such as, increase Strong user experience, facilitates user.
Specific embodiment
Below with reference to embodiment, the technical schemes of the invention are described in detail.
The method of Android intelligent equipment detection USB device of the present invention are as follows: first when USB device accesses or extracts Android When smart machine, the UsbHostManager sending device of Android intelligent equipment plugs broadcast, and additional information is arranged as access Or extract, after background application receives equipment plug broadcast, delay certain time is handled, and takes out additional letter therein Breath, judges whether it is extraction, 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, will be in the catalogue and application program under the path in equipment hash table The device path of facility information compares, and the USB device path newly accessed is found, and judge whether there is newly added equipment path, if having And newly added equipment path only one, then show that the number of devices of current USB port access has been more than supported number, prompt to use The USB device is linked into other USB ports by family, and entering to increase catalogue newly and check if having newly added equipment path and more than one is It is no to have ep_ee file, show that the number of devices of current USB port access has been more than supported number if having, prompts user will The USB device is linked into other USB ports, has otherwise checked whether driver catalogue, and USB device access is being thought if having just Often, otherwise show that current USB device does not drive, prompt user.
Embodiment
The method of the Android intelligent equipment detection USB device of the embodiment of the present invention comprising following steps:
Step 1, when USB device access or extract Android intelligent equipment when, the UsbHostManager of Android intelligent equipment Sending device plug broadcast, and additional information is set for access or is extracted.
In this step, Android intelligent equipment can be the smart television of Android system or the intelligent mobile terminal of Android system Deng, and smart phone or the tablet computer of Android system of the intelligent mobile terminal of Android system such as Android system etc..
After step 2, background application receive equipment plug broadcast, delay certain time is handled, and is taken out wherein Additional information, extraction is judged whether it is, if then deleting the institute of the USB device in access device hash table in application program There is information, otherwise enters step 3.
In this step, certain time can be 10 seconds.Its object is to avoid booting when or USB abnormal electrical power supply and cause frequency Inessential processing caused by numerous sending equipment plug broadcast.
Step 3, application program traversal/sys/bus/usb/device will be set in the catalogue and application program under the path The device path of facility information compares in standby hash table, finds the USB device path newly accessed, and judge whether there is newly added equipment Path, if having and newly added equipment path only one, enter step 4, enter if having newly added equipment path and more than one Step 5.
Step 4, the number of devices for showing current USB port access have been more than supported number, and user is prompted to set the USB It is standby to be linked into other USB ports.
Step 5 has checked whether ep_ee file into newly-increased catalogue, and 4 are entered step if having, otherwise enters step 6.
Step 6 has checked whether driver catalogue, thinks that USB device access is normal if having, otherwise shows current USB device does not drive, and prompts user.
Can with the following steps are included:
When all USB device informations are checked in step 7, user's selection, 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 for Android intelligent equipment detection USB device, which comprises the following steps:
Step 1, when USB device accesses or extracts Android intelligent equipment, the UsbHostManager of Android intelligent equipment is sent Equipment plug broadcast, and additional information is set for access or is extracted;
After step 2, application program receive equipment plug broadcast, delay certain time is handled, and takes out additional letter therein Breath, judges whether it is extraction, if then deleting all information of the USB device in access device hash table in application program, Otherwise 3 are entered step;
Step 3, application program traversal/sys/bus/usb/device dissipate equipment in the catalogue and application program under the path The device path of facility information compares in list, finds the USB device path newly accessed, and judge whether there is newly added equipment road Diameter, if having and newly added equipment path only one, enter step 4, if having newly added equipment path and more than one enter step Rapid 5;
Step 4, the number of devices for showing current USB port access have been more than supported number, and user is prompted to connect the USB device Enter to other USB ports;
Step 5 has checked whether ep_ee file into newly-increased catalogue, and 4 are entered step if having, otherwise enters step 6;
Step 6 has checked whether driver catalogue, thinks that USB device access is normal if having, otherwise shows that current USB is set It is standby not drive, prompt user.
2. the method for Android intelligent equipment detection USB device as described in claim 1, which is characterized in that described in step 1 Android intelligent equipment is the smart television of Android system or the intelligent mobile terminal of Android system.
3. the method for Android intelligent equipment detection USB device as claimed in claim 2, which is characterized in that the Android system Intelligent mobile terminal be Android system smart phone or Android system tablet computer.
4. the method for Android intelligent equipment detection USB device as described in claim 1, which is characterized in that described in step 2 Certain time is 10 seconds.
5. the method for Android intelligent equipment detection USB device as claimed in claim 1 or 2 or 3 or 4, which is characterized in that also wrap Include following steps:
When all USB device informations are checked in step 7, user's selection, USB device information is read from the hash table of application program, Each USB device information is shown in the form of multistage catalogue.
CN201611176914.9A 2016-12-19 2016-12-19 The method of Android intelligent equipment detection USB device Active CN106598798B (en)

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 CN106598798A (en) 2017-04-26
CN106598798B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
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 (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1877550A (en) * 2006-01-13 2006-12-13 深圳创维-Rgb电子有限公司 Method for implementing real-time hot-plug of USB memory under TV embedded Linux system
US7721006B2 (en) * 1999-12-30 2010-05-18 Bally Gaming, Inc. Meta-message set with real-time and database aspects
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BE1018642A3 (en) * 2010-02-09 2011-05-03 Iris Sa SCANNER WITH AUTONOMOUS SCROLL.

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Also Published As

Publication number Publication date
CN106598798A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
US20170140137A1 (en) Multi-System Entering Method, Apparatus and Terminal
EP2985695B1 (en) Method and device for setting application program state
CN106454498B (en) The method of Android platform management USB device
CN103326149B (en) Sim card connector and mobile terminal
CN106598798B (en) The method of Android intelligent equipment detection USB device
US20150171647A1 (en) Method and apparatus for high current charging of smart terminals
CN103401845B (en) A kind of detection method of website safety, device
CN104796839A (en) Apparatus and method for detecting insertion anomaly of an audio jack
WO2013119469A8 (en) System, method, and interfaces for work product management
CN106095413B (en) A kind of configuration method and device of bluetooth driver
CN104020960A (en) Method and device for conducting partition formatting and mounting on hard disk
CN107305406A (en) Electronic installation and water inlet guard method
CN105975855A (en) Method and system for malicious code detection based on apk certificate similarity
CN104795864B (en) A kind of mobile terminal and charged state detection method of accurate detection charged state
CN108054541A (en) Switching device, more device detection systems and its detection method
CN111157813A (en) Method and device for determining charging current
CN105101259A (en) WIFI identification method and intelligent terminal
WO2019052464A1 (en) Rogue base station recognition method and device, and computer readable storage medium
CN103905470B (en) A kind of resource downloading method, device and mobile terminal
CN206258859U (en) A kind of PCIE channel shared structure
CN105024989A (en) Malicious URL heuristic detection method and system based on abnormal port
WO2020007250A1 (en) Pseudo base station identification on-off control method and device, mobile terminal, and storage medium
CN104881909A (en) Intelligent access control system and method thereof
CN206441175U (en) A kind of isolator of movable storage device
CN105205395A (en) Automatic detection method for malicious software

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