CN104408015B - The USB mode adaptive approach of communication module - Google Patents
The USB mode adaptive approach of communication module Download PDFInfo
- Publication number
- CN104408015B CN104408015B CN201410621179.2A CN201410621179A CN104408015B CN 104408015 B CN104408015 B CN 104408015B CN 201410621179 A CN201410621179 A CN 201410621179A CN 104408015 B CN104408015 B CN 104408015B
- Authority
- CN
- China
- Prior art keywords
- communication module
- usb mode
- usb
- port
- adaptive approach
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/382—Information transfer, e.g. on bus using universal interface adapter
- G06F13/385—Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
Abstract
The present invention provides a kind of USB mode adaptive approach of communication module.The USB mode adaptive approach of the communication module includes:Detect that the USB mode of the communication module detects the level of port when establishing machine by cable in communication module, wherein USB mode detection port is one of GPIO port of the communication module;The level of port is detected according to the USB mode, the USB mode of the communication module required use on startup is judged;The USB mode for needing to use according to the communication module, sets corresponding start-up parameter inside the communication module.
Description
Technical field
The present invention relates to wireless communication technology, especially, it is related to a kind of USB of communication module (Universal Serial
Bus, USB) mode adaptive method.
Background technology
With the fast development of wireless communication technology, the intelligent mobile terminal such as smart mobile phone and tablet personal computer is very general
And.The operating system of current intelligent mobile terminal mainly has IOS, Android (Andriod) and Windows Phone (to that is to say WP
System, such as WIN8.1 systems) etc., the demand of the intelligent mobile terminal of different operating system for the USB port of communication module
Be it is different, such as, and Android system require communication module USB use 7ACM patterns, and WIN8.1 system requirements communication mould
The USB of block uses MBIM patterns.Existing communication module typically can be respectively different to different operating system burnings firmware, come
The USB demands of destination OS are adapted to, but, such scheme can increase the time cost and management cost of communication module.
The content of the invention
One of purpose of the present invention is that a kind of communication module is provided to improve the drawbacks described above of prior art
USB mode adaptive approach.
The USB mode adaptive approach for the communication module that the present invention is provided, including:Detected when establishing machine by cable in communication module
The USB mode of the communication module detects the level of port, wherein USB mode detection port is its of the communication module
In a GPIO port;The level of port is detected according to the USB mode, judges that the communication module is required on startup and adopts
USB mode:When it is high level that the USB mode, which detects the level of the GPIO pins corresponding to port, judge described logical
Letter module needs the USB mode used for 7ACM patterns on startup;When the level of the GPIO pins is low level, judge
The communication module needs the USB mode used for MBIM patterns on startup;The USB for needing to use according to the communication module
Pattern, sets corresponding start-up parameter inside the communication module.
In a kind of preferred embodiment of the USB mode adaptive approach for the communication module that the present invention is provided, the communication
Module is 3G (Third Generation) Moblie module or forth generation mobile communication module.
In a kind of preferred embodiment of the USB mode adaptive approach for the communication module that the present invention is provided, in addition to:
The USB mode that the communication module is enabled after the communication module start detects the interrupt function of port;Detect the USB moulds
Formula detects the down trigger state of port;The communication module according to the down trigger condition adjudgement needs the USB being switched to
Pattern;USB mode setting is carried out to the communication module, and restarts the communication module.
In a kind of preferred embodiment of the USB mode adaptive approach for the communication module that the present invention is provided, detection is described
The down trigger state of USB mode detection port is specially that the interruption of the detection USB mode detection port is that rising edge sets out
Or trailing edge triggering.
In a kind of preferred embodiment of the USB mode adaptive approach for the communication module that the present invention is provided, according to described
Communication module described in down trigger condition adjudgement needs the USB mode switched to include:If described interrupt is triggered for rising edge, sentence
The USB mode for the communication module of breaking needs to be switched to 7ACM patterns;If described interrupt is triggered for trailing edge, judge described logical
The USB mode of letter module needs to be switched to MBIM patterns.
In a kind of preferred embodiment of the USB mode adaptive approach for the communication module that the present invention is provided, to described logical
Letter module, which carries out USB mode setting, to be included:The USB mode of the communication module is set to the 7ACM patterns or MBIM moulds
Formula, and corresponding mode parameter is write in the communication module, and keep the USB mode detection port institute right in the process
The level for the GPIO pins answered.
In a kind of preferred embodiment of the USB mode adaptive approach for the communication module that the present invention is provided, restart described
Communication module includes:The communication module is restarted using the enable module of software, to realize the USB of the communication module
Pattern switching.
The USB mode adaptive approach of the communication module provided compared to prior art, the present invention is according to the communication mould
The GPIO pins level of block is realized for the adaptive of the required USB mode of different operating system, and can also be utilized
The GPIO pins control to realize the automatic switchover of USB port pattern, so that the demand of different system is met, so as to effectively drop
The time cost and management cost of low communication module.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, embodiment will be described below used in
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for ability
For the those of ordinary skill of domain, on the premise of not paying creative work, it can also be obtained according to these accompanying drawings other attached
Figure, wherein:
Fig. 1 is the USB mode adaptive approach for the communication module that an embodiment of the present invention is provided in starting up
Schematic flow sheet;
Fig. 2 is the schematic flow sheet of the USB mode adaptive approach of the communication module shown in Fig. 1 after power-up.
Embodiment
The technical scheme in the embodiment of the present invention will be clearly and completely described below, it is clear that described implementation
Example is only a part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, this area is common
All other embodiment that technical staff is obtained under the premise of creative work is not made, belongs to the model that the present invention is protected
Enclose.
The USB mode adaptive approach for the communication module that the present invention is provided mainly uses the GPIO of communication module
The adaptive switching of USB mode is realized in (General Purpose Input/Output, universal input/output) port, comes
Communication module is required using the pattern of different operating system automatically.
Specifically, the communication module can be wireless communication module, such as 3G (Third Generation) Moblie (Third
Generation, 3G) module or forth generation mobile communication (Fourth Generation, 4G) module.The communication module can
So that including multiple GPIO ports, one of GPIO port can be predefined port, the USB moulds are detected for USB mode
Formula detection port can be used for detecting the USB mode used required for the communication module.
The USB mode adaptive approach for the communication module that the present invention is provided can be divided into when establishing machine by cable and two after start
The state of kind, is illustrated below in conjunction with Fig. 1 and Fig. 2.
Referring to Fig. 1, its USB mode adaptive approach of communication module for providing for the present invention it is upper establish machine by cable when stream
Journey schematic diagram, the USB mode adaptive approach of the communication module includes:
Step S11, it is upper establish machine by cable when detect the communication module USB mode detection port corresponding to GPIO pins
Level;
Specifically, can be described logical to obtain first by pin level detection when establishing machine by cable in the communication module
Believe that the GPIO pins corresponding to the USB mode pre-defined in module detection port are high level or low level;If it is height
Level, goes to step S12;Otherwise, step S13 is gone to.
Step S12, the level of the GPIO pins is high level, judges that the communication module needs what is used on startup
USB mode is Android pattern, such as the 7ACM patterns of Android system.
Step S13, the GPIO pins are low level, judge that the communication module needs the USB moulds used on startup
Formula is WP patterns, such as the MBIM patterns of Win8.1 systems.
Step S14, sets the start-up parameter of the USB mode inside the communication module;
, can be according to the USB mode to described logical after the USB mode that the communication module needs use is judged
Believe that module carries out corresponding start-up parameter configuration.Specifically, can be by the 7ACM patterns institute when needing to use Android pattern
Corresponding start-up parameter is configured to the specified location of the memory cell (such as flash memory) inside the communication module;And needing to adopt
During with WP patterns, the start-up parameter corresponding to the MBIM patterns is configured to the memory cell (ratio inside the communication module
Such as flash memory) specified location.
Referring to Fig. 2, the flow of the USB mode adaptive approach of its communication module provided for the present invention after power-up
Schematic diagram, specifically, the USB mode adaptive approach of the communication module can also include:
Step S21, is enabled after communication module start corresponding to the USB mode detection port of the communication module
GPIO pins interrupt function;
Step S22, detects the down trigger state of the GPIO pins of the communication module;
Specifically, in this step, the GPIO pins corresponding to port can be detected to the USB mode of the communication module
Triggering state detection is carried out when the interrupt function starts, to judge that the interruption is that rising edge triggering or trailing edge are touched
Hair;If rising edge is triggered, step S23 is gone to, is triggered if trailing edge, goes to step S24.
Step S23, the interruption is rising edge triggering, judges that the USB mode of the communication module needs to be switched to Android
The 7ACM patterns of pattern, such as Android system.
Step S24, the interruption is trailing edge triggering, judges that the USB mode of the communication module needs to be switched to WP moulds
The MBIM patterns of formula, such as Win8.1 systems.
Step S25, USB mode setting is carried out to the communication module, and write corresponding pattern in the communication module
Parameter;
Specifically, after the USB mode that the communication module needs use is judged, the communication module can be entered
Row USB mode is set.Such as, in described interrupt as rising edge triggering, the USB mode of the communication module can be set to
The 7ACM patterns of Android pattern, such as Android system, and the specified location write-in of the memory cell inside the communication module
Parameter corresponding to the 7ACM patterns;And in described interrupt as trailing edge triggering, can be by the USB moulds of the communication module
Formula is set to WP patterns, such as the MBIM patterns of Win8.1 systems, and the memory cell inside the communication module is specified
Position writes the parameter corresponding to the MBIM patterns.
In addition, in the USB mode setting up procedure of this step, the GPIO pins corresponding to the USB mode detection port
Need to be kept.
Step S26, the communication module is restarted using the enable module of software, so as to realize the USB of the communication module
Pattern switching.
The USB mode adaptive approach of the communication module provided compared to prior art, the present invention is according to the communication mould
The GPIO pins level of block is realized for the adaptive of the required USB mode of different operating system, and can also be utilized
The GPIO pins control to realize the automatic switchover of USB port pattern, so that the demand of different system is met, so as to effectively drop
The time cost and management cost of low communication module.
Embodiments of the invention are the foregoing is only, are not intended to limit the scope of the invention, it is every to utilize this hair
Equivalent structure or equivalent flow conversion that bright description is made, or directly or indirectly it is used in other related technology necks
Within domain, the scope of patent protection for being similarly included in the present invention.
Claims (7)
1. a kind of USB mode adaptive approach of communication module, it is characterised in that including
Detect that the USB mode of the communication module detects the level of port when establishing machine by cable in communication module, wherein the USB moulds
Formula detection port is one of GPIO port of the communication module;
The level of port is detected according to the USB mode, the USB moulds of the communication module required use on startup are judged
Formula:When it is high level that the USB mode, which detects the level of the GPIO pins corresponding to port, judge that the communication module is being opened
The USB mode used is needed when dynamic for 7ACM patterns;When the level of the GPIO pins is low level, the communication mould is judged
Block needs the USB mode used for MBIM patterns on startup;
The USB mode for needing to use according to the communication module, sets corresponding start-up parameter inside the communication module.
2. the USB mode adaptive approach of communication module as claimed in claim 1, it is characterised in that the communication module is
3G (Third Generation) Moblie module or forth generation mobile communication module.
3. the USB mode adaptive approach of the communication module as any one of claim 1 to 2, it is characterised in that also wrap
Include:
The USB mode that the communication module is enabled after communication module start detects the interrupt function of port;
Detect that the USB mode detects the down trigger state of port;
The communication module according to the down trigger condition adjudgement needs the USB mode being switched to;
USB mode setting is carried out to the communication module, and restarts the communication module.
4. the USB mode adaptive approach of communication module as claimed in claim 3, it is characterised in that the detection USB mode
The down trigger state of detection port is specially that the interruption of the detection USB mode detection port is that rising edge sets out or declined
Along triggering.
5. the USB mode adaptive approach of communication module as claimed in claim 4, it is characterised in that touched according to described interrupt
Communication module described in hair condition adjudgement needs the USB mode switched to include:
If described interrupt is triggered for rising edge, judge that the USB mode of the communication module needs to be switched to 7ACM patterns;
If described interrupt is triggered for trailing edge, judge that the USB mode of the communication module needs to be switched to MBIM patterns.
6. the USB mode adaptive approach of communication module as claimed in claim 5, it is characterised in that to the communication module
Carrying out USB mode setting includes:The USB mode of the communication module is set to the 7ACM patterns or MBIM patterns, and
The communication module writes corresponding mode parameter, and keeps in the process corresponding to the USB mode detection port
The level of GPIO pins.
7. the USB mode adaptive approach of communication module as claimed in claim 5, it is characterised in that restart the communication mould
Block includes:The communication module is restarted using the enable module of software, cut with the USB mode for realizing the communication module
Change.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410621179.2A CN104408015B (en) | 2014-11-06 | 2014-11-06 | The USB mode adaptive approach of communication module |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410621179.2A CN104408015B (en) | 2014-11-06 | 2014-11-06 | The USB mode adaptive approach of communication module |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104408015A CN104408015A (en) | 2015-03-11 |
CN104408015B true CN104408015B (en) | 2017-11-03 |
Family
ID=52645647
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410621179.2A Active CN104408015B (en) | 2014-11-06 | 2014-11-06 | The USB mode adaptive approach of communication module |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104408015B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107832015B (en) * | 2017-11-10 | 2020-06-30 | 维沃移动通信有限公司 | Data reading method, data reading device and mobile terminal |
CN115328559A (en) * | 2022-08-18 | 2022-11-11 | 西安广和通无线软件有限公司 | Service management method, device, equipment and readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1904829A (en) * | 2005-07-29 | 2007-01-31 | 联想(北京)有限公司 | Method and system for implementing multi-mode controlling mode switching |
CN101674366A (en) * | 2009-09-19 | 2010-03-17 | 惠州Tcl移动通信有限公司 | Mobile terminal USB, or charger inserting identification method and identification device thereof |
CN101702146A (en) * | 2009-11-02 | 2010-05-05 | 北京中星微电子有限公司 | Method and unit for distinguishing charger and data line of universal serial bus |
CN103813231A (en) * | 2014-03-05 | 2014-05-21 | 北京君正集成电路股份有限公司 | Method, intelligent device, system and plug for judging access signals |
-
2014
- 2014-11-06 CN CN201410621179.2A patent/CN104408015B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1904829A (en) * | 2005-07-29 | 2007-01-31 | 联想(北京)有限公司 | Method and system for implementing multi-mode controlling mode switching |
CN101674366A (en) * | 2009-09-19 | 2010-03-17 | 惠州Tcl移动通信有限公司 | Mobile terminal USB, or charger inserting identification method and identification device thereof |
CN101702146A (en) * | 2009-11-02 | 2010-05-05 | 北京中星微电子有限公司 | Method and unit for distinguishing charger and data line of universal serial bus |
CN103813231A (en) * | 2014-03-05 | 2014-05-21 | 北京君正集成电路股份有限公司 | Method, intelligent device, system and plug for judging access signals |
Also Published As
Publication number | Publication date |
---|---|
CN104408015A (en) | 2015-03-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2509368B1 (en) | Power management method and apparatus of a network access module | |
US9258024B2 (en) | SIM card connector and mobile terminal | |
CN103324344B (en) | A kind of method and mobile terminal processing touch-screen sliding process interrupt line | |
CN104216753A (en) | Method for rapidly starting application program for terminal, and terminal | |
US10439412B2 (en) | Method for eliminating interference of charger to touch screen, and mobile terminal | |
US20130346640A1 (en) | Wakeup method, hot swap method, and device based on high speed inter-chip hsic interface | |
CN107247647B (en) | BBU working state detection method and system in memory system | |
CN102299992A (en) | Terminal as well as method and device for controlling same | |
CN104572328A (en) | Control method and device | |
CN104182243B (en) | Sleep state control system, computer system and sleep state detection method thereof | |
CN103747512A (en) | Data traffic processing method, data traffic processing system and terminal | |
CN101470689A (en) | Bidirectional sleep/wake method and device based on USB | |
CN104408015B (en) | The USB mode adaptive approach of communication module | |
CN101350995B (en) | Awakening method between mobile terminal modules and multi-mode terminal using the same | |
CN104750226A (en) | USB (universal serial bus) OTG (on-the-go) pattern recognition system and USB OTG pattern recognition method | |
CN103105920A (en) | Energy-saving system and energy-saving method | |
CN103442134B (en) | Realize the method and system of mobile terminal touch screen switching function | |
CN103475592A (en) | System and method for supporting hot plugging of 3G (3rd Generation) network card | |
CN105376113A (en) | Processing method of network communication function abnormity, modem and mobile terminal | |
CN104423530A (en) | Electricity saving control method and device of mobile device, mobile device and host terminal | |
CN104850512B (en) | No ID pin does the method and device of USB OTG function | |
EP2985673B1 (en) | Method and terminal device for continuous power supply to external carrier | |
WO2019027612A1 (en) | Managing surprise hot plug in low power state | |
CN103197752A (en) | Method and equipment for reducing power consumption of electronic instruments | |
CN104636287A (en) | Data acquisition device and mobile terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |