A kind of method and apparatus of module product software automatic identification hardware
Technical field
The present invention relates to a kind of method and apparatus of module product software automatic identification hardware.
Background technique
Different country and area are often sold to a module product, but the communication of every country, area distribution
Frequency range may be different, this just needs to issue the version of different communication frequency range, to adapt to local network.It is answered in traditional module
In, for the hardware of different frequency range, there is corresponding software version, as shown in Figure 1.From schematic diagram it can be seen that, this mould
Formula have the shortcomings that two it is main:
1. a hardware and software version more than, in production and software upgrade process, their corresponding relationship is easy to mistake.
2. software version is more, the workload of software programming and maintenance is increased.
Summary of the invention
The present invention provides a kind of method and apparatus of module product software automatic identification hardware, it is intended to solve the prior art
In, same module product is easy to happen the problem of corresponding mistake there are multiple software versions and hardware in escalation process, and needs
Software version write respectively to different hardware, the problem of the heavy workload of software programming and maintenance.
In order to solve the above problem, the present invention provides a kind of method of module product software automatic identification hardware, includes:
The logic level for reading the frequency range detection pin of all hardware, inquires frequency range map real table, it is corresponding to obtain hardware
Band information;
According to band information obtained, the corresponding QCN of each frequency range is set and is saved.
Further, the frequency range detection pin of different hardware is provided with different frequency range configuration resistance.
Further, resistance also is configured comprising detection frequency range, when mistake occurs for frequency range configuration resistance, starting configuration resistance
More positive order;
Further, in the case where configuring resistance corrigendum, software is instructed by AT deletes former band information file, reads
Frequency range detects the new logic level of pin, inquires frequency range map real table, obtains the corresponding new band information of hardware, setting
The corresponding QCN of the frequency range is simultaneously saved.
Further, the band information file can be checked in file system, or be inquired by AT instruction.
And in order to solve the above problem, the present invention provides a kind of device of module product software automatic identification hardware, packet
Contain:
Band information obtains module, and the frequency range for reading all hardware detects the logic level of pin, and inquiry frequency range is reflected
Truth table is penetrated, the corresponding band information of hardware is obtained;
QCN setup module, for the corresponding QCN of the frequency range being arranged and saves according to band information obtained.
Further, the frequency range detection pin of different hardware is provided with different frequency range configuration resistance.
Further, also comprising configuration resistance detection module, whether the frequency range configuration resistance for detecting hardware is correct, and
When mistake occurs for frequency range configuration resistance, the instruction of starting change frequency range configuration resistance.
It further, also include QCN correction module, for being referred to after being set as correct frequency range configuration resistance by AT
It enables and deletes former band information file, read the new logic level of frequency range detection pin, inquire frequency range map real table, obtain hard
The corresponding new band information of part is arranged the corresponding QCN of the frequency range and saves according to new band information obtained.
Further, the band information file can be checked in file system, or be inquired by AT instruction.
The method and apparatus for the module product software automatic identification hardware that the present invention realizes, using same set of software code,
The hardware of automatic identification different radio frequency frequency range, is arranged corresponding QCN, so that the production of module, upgrading, the maintenance of software code becomes
It obtains simply, reliably.
Detailed description of the invention
Fig. 1 is module product software existing in the prior art and hardware correspondence diagram;
Fig. 2 is a kind of method flow signal for module product software automatic identification hardware that the embodiment of the present invention one provides
Figure;
Fig. 3 is a kind of method flow signal of module product software automatic identification hardware provided by Embodiment 2 of the present invention
Figure;
Fig. 4 is a kind of apparatus structure signal for module product software automatic identification hardware that the embodiment of the present invention three provides
Figure;
Fig. 5 is a kind of apparatus structure schematic diagram for module product software automatic identification hardware that inventive embodiments four provide;
Fig. 6 is invention software schematic diagram corresponding with hardware relationship.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element
Be conducive to explanation of the invention, itself there is no specific meanings.Therefore, " module " can mixedly make with " component "
With.
Embodiment one
A kind of method that the embodiment of the present invention one provides module product software automatic identification hardware includes with reference to Fig. 2:
S101 reads the logic level of the frequency range detection pin of all hardware, inquires frequency range map real table, obtain hardware
Corresponding band information.
As shown in fig. 6, each hardware is both provided with a configuration resistance, due to the difference of the configuration resistance of different hardware,
The frequency range detection pin voltage of each hardware is different, so each frequency range detection pin voltage can represent the hardware version.It reads
The logic level of frequency range detection pin is taken, if having 4 kinds of combinations using 2 pins, the range of value is 0b00-0b11, if
Using 3 pins, then share 8 kinds of combinations, the range of value is 0b000-0b111, according to band support number choose frequency range
Detect the number of pin.Frequency range map real table, for the corresponding band information of different frequency range detection pin voltage and QCN to be arranged
The one-to-one relationship of file detects the logical value of pin according to the frequency range of reading, corresponding frequency range is found in truth table
Information, so inquiry frequency range map real table, can get the corresponding band information of hardware.
S102 is arranged the corresponding QCN of the frequency range and saves according to the corresponding band information of hardware obtained.
Specifically, corresponding QCN is arranged for each band information obtained, then the band information that QCN is arranged is saved
In band information file.Same software reads different Q CN, that is, can recognize the corresponding hardware version of different Q CN, and described in generation
The corresponding upgrade software code of hardware version smoothly carries out software upgrading for the corresponding hardware.
When carrying out software upgrading to hardware every time, first detect whether there are QCN message file, when there are QCN texts for confirmation
When part, then detect whether that there are the corresponding band information files of QCN file, as the QCN and corresponding band information file
In the presence of all, software upgrading can be directly carried out, to be every according to this method if QCN or band information file are not present
The corresponding QCN file of a hardware setting.
The method of the software automatic identification hardware of implementation above uses same set of software generation when upgrading to hardware
Code, software, which passes through, identifies QCN, the hardware of automatic identification different radio frequency frequency range, so that the production of module, upgrading, software code
Maintenance becomes simple, reliable.The process for eliminating artificial corresponding identification software and hardware is avoided and some is produced due to wrong version
Raw staging error problem.
Embodiment two
A kind of method that the present embodiment two provides module product software automatic identification hardware includes with reference to Fig. 3:
S201 checks that frequency range configures resistance;
Specifically, the frequency range detection pin of each hardware is provided with corresponding frequency range configuration resistance, the frequency between hardware
Section configuration resistance is different, so keep the frequency range pin voltage of different hardware different, institute's pin voltage generation in different frequency bands
The different hardware of table.Resistance is configured by detection frequency range, would know that the communication frequency band information of the hardware, and judge the band information
Whether configured QCN file configures correctly.
S202 judges whether frequency range configuration resistance is correct, if configuration is correct, executes S205, if incorrect, holds
Row S203;
S203, the instruction of starting change frequency range configuration resistance;
S204 is instructed by AT and is deleted band information file;
Specifically, by AT instruction delete be configured mistake QCN band information file.
S205 reads the logic level of frequency range detection pin, inquires frequency range map real table, obtains the corresponding communication of hardware
Band information;
Specifically, software reading is the frequency range detection pin logic level for correcting frequency range configuration resistance, then inquire frequently
Section map real table obtains the corresponding correct band information of hardware.
S206 is arranged the corresponding QCN of the frequency range and saves according to band information obtained.
Specifically, corresponding QCN is arranged for the hardware band information, then protects according to the correct band information of acquisition
The band information is deposited in band information file.
The method of the software automatic identification hardware of implementation above is possible to the frequency range provided with mistake in hardware and configures resistance
When, resistance is configured by corrigendum frequency range, the corresponding QCN of band information is reset, realizes error correction, and to hard after corrigendum
Part carries out automatic identification.
Embodiment three
The device that the present embodiment three provides a kind of module product software automatic identification hardware includes with reference to Fig. 4: frequency range letter
Breath obtains module 10, QCN setup module 20.
Band information obtains module 10, and the logic level of pin is detected for reading frequency range, inquires frequency range map real table,
Obtain the corresponding band information of hardware.
Specifically, each hardware is both provided with a configuration resistance, due to configuring the difference of resistance, the frequency range of each hardware
It is all different to detect pin voltage.Frequency range map real table, for the frequency range detection pin voltage and QCN file to be arranged one by one
Corresponding relationship.Band information obtains the logic level that module 10 reads frequency range detection pin, inquires frequency range map real table, can obtain
Obtain the corresponding band information of hardware.
QCN setup module 20, for the corresponding QCN of the frequency range being arranged and saves according to band information obtained.
Specifically, QCN setup module 20 is that band information obtains each band information setting of the acquisition of module 10 accordingly
Then the band information that QCN is arranged is stored in band information file by QCN.Software reads QCN, can obtain described QCN pairs
The hardware answered, and smoothly software upgrading is carried out for the corresponding hardware.
When carrying out software upgrading to hardware every time, first detect whether there are QCN message file, when there are QCN texts for confirmation
When part, then detect whether that there are the corresponding band information files of QCN file, as the QCN and corresponding band information file
In the presence of all, software upgrading can be directly carried out, to be every according to this method if QCN or band information file are not present
Corresponding QCN file is arranged in the band information of a hardware.
The device of the software automatic identification hardware of implementation above uses same set of software generation when upgrading to hardware
Code, software, which passes through, identifies QCN, the hardware of automatic identification different radio frequency frequency range, so that the production of module, upgrading, software code
Maintenance becomes simple, reliable.The process for eliminating artificial corresponding identification software and hardware is avoided and some is produced due to wrong version
Raw staging error problem.
Example IV
The device that the present embodiment four provides a kind of module product software automatic identification hardware includes with reference to Fig. 5: frequency range letter
Breath obtains module 10, QCN setup module 20, and configuration resistance detection module 30 and QCN correction module 40.
Since band information acquisition module 10, QCN setup module 20 are identical as embodiment three, resistance inspection is described in this emphasis
Survey module 30 and QCN correction module 40.
Resistance detection module 30 is configured, it is whether correct that the frequency range for detecting hardware configures resistance, and configures electricity in frequency range
When mistake occurs for resistance, the instruction of starting change frequency range configuration resistance.
QCN correction module 40, for being instructed by AT and deleting former frequency range letter after being set as correct frequency range configuration resistance
File is ceased, the new logic level of frequency range detection pin is read, inquires frequency range map real table, obtains the corresponding new frequency of hardware
Segment information is arranged the corresponding QCN of the frequency range and saves according to new band information obtained.
Specifically, the frequency range detection pin of each hardware is provided with corresponding frequency range configuration resistance, so detection hardware
The pin voltage of frequency range, different frequency range pin voltages represent different hardware.Configuration resistance detection module 30 detects frequency range and matches
Resistance is set, judges whether configured QCN file configures correctly.If it is incorrect that frequency range configures resistance, start change frequency range
Configure the instruction of resistance.After configuring correct frequency range configuration resistance for the hardware frequency range, QCN correction module 40 is deleted by AT instruction
Except former band information file, the new logic level of frequency range detection pin is read, frequency range map real table is inquired, obtains hardware pair
The new band information answered is arranged the corresponding QCN of the frequency range and saves according to new band information obtained.Then software
Hardware is identified again through QCN and generates the software update code of corresponding hardware.
The device of the software automatic identification hardware of implementation above is possible to the frequency range provided with mistake in hardware and configures resistance
When, resistance is configured by corrigendum frequency range, QCN is reset, realizes error correction, and known automatically to the hardware after corrigendum
Not, software upgrading then is carried out to correct hardware.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes
Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.