CN104408015A - USB (universal serial bus) mode adaptive method of communication module - Google Patents

USB (universal serial bus) mode adaptive method of communication module Download PDF

Info

Publication number
CN104408015A
CN104408015A CN201410621179.2A CN201410621179A CN104408015A CN 104408015 A CN104408015 A CN 104408015A CN 201410621179 A CN201410621179 A CN 201410621179A CN 104408015 A CN104408015 A CN 104408015A
Authority
CN
China
Prior art keywords
communication module
usb
pattern
described communication
usb mode
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
Application number
CN201410621179.2A
Other languages
Chinese (zh)
Other versions
CN104408015B (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.)
Shenzhen Guanghetong Wireless Communication Software Co ltd
Original Assignee
Shenzhen Guanghetong Wireless Communication Software 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 Shenzhen Guanghetong Wireless Communication Software Co ltd filed Critical Shenzhen Guanghetong Wireless Communication Software Co ltd
Priority to CN201410621179.2A priority Critical patent/CN104408015B/en
Publication of CN104408015A publication Critical patent/CN104408015A/en
Application granted granted Critical
Publication of CN104408015B publication Critical patent/CN104408015B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)

Abstract

The invention provides a USB (universal serial bus) mode adaptive method of a communication module. The method comprises the following steps that when the communication module is energized and started, detecting the level at a USB mode detecting port of the communication module, wherein the USB mode detecting port is one of the GPIO (General Purpose Input/Output) ports of the communication module; according to the level at the USB mode detecting port, judging the USB mode required when the communication module is started; according to the USB mode required by the communication module, setting corresponding start parameters in the communication module.

Description

The USB mode adaptive method of communication module
Technical field
The present invention relates to wireless communication technology, especially, relate to a kind of USB (Universal Serial Bus, USB (universal serial bus)) mode adaptive method of communication module.
Background technology
Along with the fast development of wireless communication technology, the intelligent mobile terminal such as smart mobile phone and panel computer is very universal.The operating system of current intelligent mobile terminal mainly contains IOS, Android (Andriod) and Windows Phone and (that is to say WP system, such as WIN8.1 system) etc., the intelligent mobile terminal of different operating system is different for the demand of the USB port of communication module, such as, Android system requires that the USB of communication module adopts 7ACM pattern, and the USB of WIN8.1 system requirements communication module adopts MBIM pattern.Existing communication module generally can distinguish different firmwares to different operating system burnings, and adapt to the USB demand of destination OS, but, such scheme can increase time cost and the handling cost of communication module.
Summary of the invention
One of them object of the present invention is above-mentioned defect in order to improve prior art and provides a kind of USB mode adaptive method of communication module.
The USB mode adaptive method of communication module provided by the invention, comprise: the level detecting the USB mode detection port of described communication module when communication module powers on start, wherein said USB mode detection port is one of them GPIO port of described communication module; According to the level of described USB mode detection port, judge the USB pattern of described communication module required employing when starting; Need the USB pattern adopted according to described communication module, corresponding start-up parameter is set in described communication module inside.
In a kind of preferred embodiment of the USB mode adaptive method of communication module provided by the invention, described 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 method of communication module provided by the invention, according to the level of described USB mode detection port, judging that the USB pattern of described communication module required employing when starting comprises: when the level of the GPIO pin corresponding to described USB mode detection port is high level, judging that described communication module needs when starting the USB pattern adopted to be 7ACM pattern; When the level of described GPIO pin is low level, judge that described communication module needs the USB pattern adopted to be MBIM pattern when starting.
In a kind of preferred embodiment of the USB mode adaptive method of communication module provided by the invention, also comprise: the interrupt function of enabling the USB mode detection port of described communication module after described communication module start; Detect the down trigger state of described USB mode detection port; According to described down trigger condition adjudgement, communication module needs the USB pattern be switched to; The setting of USB pattern is carried out to described communication module, and restarts described communication module.
In a kind of preferred embodiment of the USB mode adaptive method of communication module provided by the invention, it is that rising edge sets out or negative edge triggers that the down trigger state detecting described USB mode detection port is specially the interruption detecting described USB mode detection port.
In a kind of preferred embodiment of the USB mode adaptive method of communication module provided by the invention, according to described down trigger condition adjudgement, communication module needs the USB pattern switched to comprise: trigger if described interruption is rising edge, judge that the USB pattern of described communication module needs to be switched to 7ACM pattern; Trigger if described interruption is negative edge, judge that the USB pattern of described communication module needs to be switched to MBIM pattern.
In a kind of preferred embodiment of the USB mode adaptive method of communication module provided by the invention, carry out the setting of USB pattern to described communication module to comprise: the USB pattern of described communication module is set to described 7ACM pattern or MBIM pattern, and write corresponding mode parameter in described communication module, and keep the level of the GPIO pin corresponding to described USB mode detection port in the process.
In a kind of preferred embodiment of the USB mode adaptive method of communication module provided by the invention, restart described communication module and comprise: utilize the enable module of software to restart described communication module, switch with the USB pattern realizing described communication module.
Compared to prior art, the USB mode adaptive method of communication module provided by the invention realizes the self-adaptation for the required USB pattern of different operating system according to the GPIO pin level of described communication module, and described GPIO pin can be utilized to control to realize the automatic switchover of USB port pattern, thus meet the demand of different system, thus effectively reduce time cost and the handling cost of communication module.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings, wherein:
Fig. 1 is the schematic flow sheet of USB mode adaptive method when starting up of the communication module that an embodiment of the present invention provides;
Fig. 2 is the USB mode adaptive method schematic flow sheet after power-up of the communication module shown in Fig. 1.
Embodiment
Be clearly and completely described to the technical scheme in the embodiment of the present invention below, obviously, described embodiment is only a part of embodiment of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making other embodiments all obtained under creative work prerequisite, belong to the scope of protection of the invention.
The USB mode adaptive method of communication module provided by the invention mainly utilizes GPIO (the General Purpose Input/Output of communication module, universal input/output) port realize USB pattern self-adaptation switch, make communication module automatically can use the pattern requirements of different operating system.
Particularly, described 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.Described communication module can comprise multiple GPIO port, and one of them GPIO port can be predefined as USB mode detection port, and described USB mode detection port can be used for detecting the required USB pattern adopted of described communication module.
The USB mode adaptive method of communication module provided by the invention can be divided into power on start time and start after two states, be described below in conjunction with Fig. 1 and Fig. 2.
Refer to Fig. 1, it is the schematic flow sheet of USB mode adaptive method when powering on start of communication module provided by the invention, and the USB mode adaptive method of described communication module comprises:
Step S11, detects the level of the GPIO pin corresponding to USB mode detection port of described communication module when powering on start;
Particularly, when described communication module powers on start, first can pass through pin level detection, the GPIO pin obtained in described communication module corresponding to predefined USB mode detection port is high level or low level; If it is high level, go to step S12; Otherwise, go to step S13.
Step S12, the level of described GPIO pin is high level, judges that described communication module needs the USB pattern adopted to be Android pattern when starting, the 7ACM pattern of such as Android system.
Step S13, described GPIO pin is low level, judges that described communication module needs the USB pattern adopted to be WP pattern when starting, the MBIM pattern of such as Win8.1 system.
Step S14, arranges the start-up parameter of described USB pattern in described communication module inside;
After judging that described communication module needs the USB pattern adopted, corresponding start-up parameter configuration can be carried out according to described USB pattern to described communication module.Particularly, when needs adopt Android pattern, the start-up parameter corresponding to described 7ACM pattern can be configured to the assigned address of the storage unit (such as flash memory) of described communication module inside; And when needs adopt WP pattern, the start-up parameter corresponding to described MBIM pattern is configured to the assigned address of the storage unit (such as flash memory) of described communication module inside.
Refer to Fig. 2, it is the USB mode adaptive method schematic flow sheet after power-up of communication module provided by the invention, and particularly, the USB mode adaptive method of described communication module can also comprise:
Step S21, enables the interrupt function of the GPIO pin corresponding to USB mode detection port of described communication module after described communication module start;
Step S22, detects the down trigger state of the GPIO pin of described communication module;
Particularly, in this step, trigger state detection can be carried out to the GPIO pin corresponding to the USB mode detection port of described communication module when described interrupt function starts, judge that described interruption is that rising edge triggers or negative edge triggers; If rising edge triggers, go to step S23, if be negative edge triggering, go to step S24.
Step S23, described interruption is that rising edge triggers, and judges that the USB pattern of described communication module needs to be switched to Android pattern, the 7ACM pattern of such as Android system.
Step S24, described interruption is that negative edge triggers, and judges that the USB pattern of described communication module needs to be switched to WP pattern, the MBIM pattern of such as Win8.1 system.
Step S25, carries out the setting of USB pattern to described communication module, and writes corresponding mode parameter in described communication module;
Particularly, after judging that described communication module needs the USB pattern adopted, the setting of USB pattern can be carried out to described communication module.Such as, when described interruption is rising edge triggering, the USB pattern of described communication module can be set to Android pattern, the 7ACM pattern of such as Android system, and write the parameter corresponding to described 7ACM pattern at the assigned address of the storage unit of described communication module inside; And when described interruption is negative edge triggering, the USB pattern of described communication module can be set to WP pattern, the MBIM pattern of such as Win8.1 system, and write the parameter corresponding to described MBIM pattern at the assigned address of the storage unit of described communication module inside.
In addition, in the USB mode setting procedure of this step, the GPIO pin corresponding to described USB mode detection port needs to be kept.
Step S26, utilizes the enable module of software to restart described communication module, thus the USB pattern realizing described communication module switches.
Compared to prior art, the USB mode adaptive method of communication module provided by the invention realizes the self-adaptation for the required USB pattern of different operating system according to the GPIO pin level of described communication module, and described GPIO pin can be utilized to control to realize the automatic switchover of USB port pattern, thus meet the demand of different system, thus effectively reduce time cost and the handling cost of communication module.
The foregoing is only embodiments of the invention; not thereby the scope of the claims of the present invention is limited; every utilize description of the present invention to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical field, be all in like manner included within scope of patent protection of the present invention.

Claims (8)

1. a USB mode adaptive method for communication module, is characterized in that, comprise
Detect the level of the USB mode detection port of described communication module when communication module powers on start, wherein said USB mode detection port is one of them GPIO port of described communication module;
According to the level of described USB mode detection port, judge the USB pattern of described communication module required employing when starting;
Need the USB pattern adopted according to described communication module, corresponding start-up parameter is set in described communication module inside.
2. the USB mode adaptive method of communication module as claimed in claim 1, it is characterized in that, described communication module is 3G (Third Generation) Moblie module or forth generation mobile communication module.
3. the USB mode adaptive method of communication module as claimed in claim 1, is characterized in that, according to the level of described USB mode detection port, judges that the USB pattern of described communication module required employing when starting comprises:
When the level of the GPIO pin corresponding to described USB mode detection port is high level, judge that described communication module needs the USB pattern adopted to be 7ACM pattern when starting;
When the level of described GPIO pin is low level, judge that described communication module needs the USB pattern adopted to be MBIM pattern when starting.
4. the USB mode adaptive method of communication module as claimed any one in claims 1 to 3, is characterized in that, also comprise:
The interrupt function of the USB mode detection port of described communication module is enabled after described communication module start;
Detect the down trigger state of described USB mode detection port;
According to described down trigger condition adjudgement, communication module needs the USB pattern be switched to;
The setting of USB pattern is carried out to described communication module, and restarts described communication module.
5. the USB mode adaptive method of communication module as claimed in claim 4, is characterized in that, it is that rising edge sets out or negative edge triggering that the down trigger state detecting described USB mode detection port is specially the interruption detecting described USB mode detection port.
6. the USB mode adaptive method of communication module as claimed in claim 5, is characterized in that, according to described down trigger condition adjudgement, communication module needs the USB pattern switched to comprise:
Trigger if described interruption is rising edge, judge that the USB pattern of described communication module needs to be switched to 7ACM pattern;
Trigger if described interruption is negative edge, judge that the USB pattern of described communication module needs to be switched to MBIM pattern.
7. the USB mode adaptive method of communication module as claimed in claim 6, it is characterized in that, carry out the setting of USB pattern to described communication module to comprise: the USB pattern of described communication module is set to described 7ACM pattern or MBIM pattern, and write corresponding mode parameter in described communication module, and keep the level of the GPIO pin corresponding to described USB mode detection port in the process.
8. the USB mode adaptive method of communication module as claimed in claim 6, is characterized in that, restart described communication module and comprise: utilize the enable module of software to restart described communication module, switches with the USB pattern realizing described communication module.
CN201410621179.2A 2014-11-06 2014-11-06 The USB mode adaptive approach of communication module Active CN104408015B (en)

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 true CN104408015A (en) 2015-03-11
CN104408015B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107832015A (en) * 2017-11-10 2018-03-23 维沃移动通信有限公司 A kind of method for reading data, digital independent device and mobile terminal
WO2024037376A1 (en) * 2022-08-18 2024-02-22 西安广和通无线软件有限公司 Service management method and apparatus, device and readable storage medium

Citations (4)

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

Patent Citations (4)

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

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107832015A (en) * 2017-11-10 2018-03-23 维沃移动通信有限公司 A kind of method for reading data, digital independent device and mobile terminal
WO2024037376A1 (en) * 2022-08-18 2024-02-22 西安广和通无线软件有限公司 Service management method and apparatus, device and readable storage medium

Also Published As

Publication number Publication date
CN104408015B (en) 2017-11-03

Similar Documents

Publication Publication Date Title
US9268381B2 (en) Terminal device and power supply method for terminal device
CN102413246B (en) Method for switching sharing application between multiple systems and mobile terminal
JP5635628B2 (en) Power management method and apparatus for network access module
US10194397B2 (en) Power supply control method and wireless terminal
US10439412B2 (en) Method for eliminating interference of charger to touch screen, and mobile terminal
CN105117060A (en) Screen brightness adjustment method and user terminal
US8719611B2 (en) Checking functional module ID in connected extension device to power instead of existing corresponding functional module
CN105430702A (en) Network switching method and device, and communication terminal
EP2866325A1 (en) Battery, method, device and system for battery protection
CN102299992A (en) Terminal as well as method and device for controlling same
WO2010002118A3 (en) Usb device and method for recognizing usb mode of the same
CN105446916B (en) USB bus state switching method and device
KR20170020536A (en) Fast charging method, power source adapter and mobile terminal
CN104123208B (en) The restorative procedure of a kind of system exception, device and mobile terminal
CN104133730A (en) Method and device for repairing system abnormality and mobile terminal
CN105744604B (en) WIFI module power consumption control device and method based on android system
CN103067543A (en) User identity recognition card changing-over processing method and terminal equipment
CN104836869A (en) Mobile communication terminal and mobile communication terminal power-on method
CN105743602A (en) Method and system for preventing radio frequency signal from interfering USB (Universal Serial Bus) data transmission
CN104408015A (en) USB (universal serial bus) mode adaptive method of communication module
CN105808409A (en) Information processing method and electronic equipment
CN105657800A (en) Power saving method and device of mobile terminal
CN103235750A (en) Unattended control system and method for computer
CN105373422A (en) Method for controlling terminal device to enter downloading mode, terminal device and computer device
CN105988848A (en) Application installation method of multi-system terminal, application installation apparatus of multi-system terminal and 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