CN114297104A - Debugging data transmission method, device, equipment and storage medium - Google Patents

Debugging data transmission method, device, equipment and storage medium Download PDF

Info

Publication number
CN114297104A
CN114297104A CN202111659264.4A CN202111659264A CN114297104A CN 114297104 A CN114297104 A CN 114297104A CN 202111659264 A CN202111659264 A CN 202111659264A CN 114297104 A CN114297104 A CN 114297104A
Authority
CN
China
Prior art keywords
data
pin
host
usim
clock
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
CN202111659264.4A
Other languages
Chinese (zh)
Other versions
CN114297104B (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.)
Gaoxing Wulian Technology Co ltd
Original Assignee
Gaoxing Wulian Technology 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 Gaoxing Wulian Technology Co ltd filed Critical Gaoxing Wulian Technology Co ltd
Priority to CN202111659264.4A priority Critical patent/CN114297104B/en
Publication of CN114297104A publication Critical patent/CN114297104A/en
Application granted granted Critical
Publication of CN114297104B publication Critical patent/CN114297104B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a debugging data transmission method, equipment and a computer readable storage medium, wherein the method comprises the following steps: when an external USIM connector is inserted into a USIM card seat of the host and the host is in a power-down mode of a USIM card, pulling down a reset pin of the USIM card seat and configuring a data pin of the USIM card seat into an output state; and after the preset time of pulling down the reset pin, starting a clock signal of a clock pin of the USIM card seat, and storing output data to the data pin when the falling edge of each clock signal is interrupted until all the output data are stored. The efficient and convenient debugging data transmission scheme is realized, the communication module provider or maintainer is effectively prevented from recovering and disassembling various communication devices, the subsequent maintenance cost of the communication module is greatly reduced, and the maintenance execution efficiency is improved.

Description

Debugging data transmission method, device, equipment and storage medium
Technical Field
The present invention relates to the field of mobile communications, and in particular, to a method and an apparatus for transmitting debug data, and a computer-readable storage medium.
Background
In the prior art, a communication module is packaged as part of a module into a structural member of various types of equipment. The upper computer used for debugging the communication module usually has limited resources, and cannot capture the log of the communication module, so that the functions of version upgrading, data transmission, maintenance debugging and the like of the communication module cannot be realized.
In order to solve the above technical problems, solutions based on FOTA air upgrade are proposed in the prior art, but the above air upgrade methods do not have the safety and controllability of directly using an upgrade tool for upgrade, and at present, there is still a certain risk of introducing quality problems in the air upgrade methods.
Therefore, in order to solve the problem of maintainability of the communication module, the provider of the communication module needs to recover and disassemble various devices, thereby greatly increasing the subsequent maintenance cost and maintenance execution efficiency of the communication module.
Disclosure of Invention
In order to solve the technical defects in the prior art, the present invention provides a debug data transmission method, which is applied to a host including a USIM (Universal Subscriber Identity Module) socket, and is characterized in that the method includes:
when an external USIM connector is inserted into a USIM card seat of the host and the host is in a power-down mode of a USIM card, pulling down a reset pin of the USIM card seat and configuring a data pin of the USIM card seat into an output state.
And after the preset time of pulling down the reset pin, starting a clock signal of a clock pin of the USIM card seat, and storing output data to the data pin when the falling edge of each clock signal is interrupted until all the output data are stored.
Pulling up the reset pin and configuring the data pin to an input state when the host is in the power down mode.
And after the preset time of pulling down the reset pin, starting the clock signal, and receiving input data stored to the data pin by the peripheral equipment when the rising edge of each clock signal is interrupted until all the input data are received.
Optionally, the pulling down a reset pin of the USIM card socket and configuring a data pin of the USIM card socket to an output state when the peripheral USIM connector is inserted into the USIM card socket of the host and the host is in a power-down mode of the USIM card includes:
and when the host is in the power-down mode, configuring the clock pin as a general purpose input/output (GPIO) pin.
A timer (x) and a counter TimerCnt are started, and the counter TimerCnt is set to 0.
Optionally, after the preset time of pulling down the reset pin, starting a clock signal of a clock pin of the USIM socket, and when a falling edge of each clock signal is interrupted, storing output data received by an external device to the data pin until all the output data are stored completely includes:
wait for an interrupt of the timer (x).
When the timer (x) is interrupted, the counter TimerCnt is left over, when the counter TimerCnt% 2 is equal to 1, the clock pin is pulled down, when the output data is 0, the data pin is pulled down, when the output data is 1, the data pin is pulled up, and the counter TimerCnt is added with 1, when the counter TimerCnt% 2 is equal to 0, the clock pin is pulled up, and the counter TimerCnt is added with 1.
Optionally, after the preset time of pulling down the reset pin, starting a clock signal of a clock pin of the USIM socket, and when a falling edge of each of the clock signals is interrupted, storing output data received by an external device to the data pin until all the output data are stored, further comprising:
and when the output data is stored completely or the preset timing Time of n timers (x) is reached, closing the timers (x) and the counter TimerCnt.
And pulling up the clock pin to configure the data pin into an input state.
Optionally, the pulling up the reset pin and configuring the data pin to an input state when the host is in the power-down mode includes:
the timer (timer) (x) and the counter TimerCnt are started again.
Set the counter TimerCnt to 0 and pull down the clock pin.
Optionally, the starting the clock signal after the preset time of pulling down the reset pin, and receiving the input data stored to the data pin by the peripheral device when a rising edge of each clock signal is interrupted until all the input data are received, includes:
when the interrupt of the timer (x) comes, the counter TimerCnt is left over.
When the counter TimerCnt% 2 is equal to 0, the input data is received, the clock pin is pulled up, and 1 is added to the counter TimerCnt, and when the counter TimerCnt% 2 is equal to 1, the clock pin is pulled down, and 1 is added to the counter TimerCnt.
Optionally, after the preset time for pulling down the reset pin, starting the clock signal, and receiving the input data stored to the data pin by the peripheral device when a rising edge of each of the clock signals is interrupted until all the input data are received, the method further includes:
and when the received input data does not exceed the preset maximum data volume of single transmission, continuously waiting for the interruption of the timer (x).
When the received input data exceeds the maximum data volume of the single transmission, waiting for the interruption of the timer (x) again until all the input data are received.
The invention also provides a debugging data transmission method, which is applied to the peripheral equipment comprising the USIM connector of the subscriber identity module card and is characterized by comprising the following steps:
and when the USIM connector is inserted into a USIM card holder of the host and the host is in a power-down mode of the USIM card, configuring the host into a data receiving state.
When receiving an interrupt signal of a reset pin of the host, if the reset pin is at a high level, configuring the reset pin to be in an output data state, setting the data pin of the host to be in the output state, and receiving transmission data stored by the host in the last state.
When receiving an interrupt signal of a reset pin of the host, if the reset pin is at a low level, configuring the reset pin to receive a data state, and setting the data pin of the host to an input state.
The invention also proposes a debug data transfer device comprising a memory, a processor and a computer program stored on said memory and executable on said processor, said computer program, when executed by said processor, implementing the steps of the debug data transfer method as defined in any one of the above.
The present invention also proposes a computer-readable storage medium having stored thereon a debug data transfer program, which when executed by a processor implements the steps of the debug data transfer method as described in any one of the above.
By implementing the debugging data transmission method, the equipment and the computer readable storage medium, when an external USIM connector is inserted into a USIM card seat of the host and the host is in a power-off mode of the USIM card, a reset pin of the USIM card seat is pulled down, and a data pin of the USIM card seat is configured into an output state; after the reset pin is pulled down for a preset time, starting a clock signal of a clock pin of the USIM card seat, and storing output data to the data pin when the falling edge of each clock signal is interrupted until all the output data are stored; when the host is in the power-down mode, pulling up the reset pin and configuring the data pin to be in an input state; and after the preset time of pulling down the reset pin, starting the clock signal, and receiving input data stored to the data pin by the peripheral equipment when the rising edge of each clock signal is interrupted until all the input data are received. The efficient and convenient debugging data transmission scheme is realized, the communication module provider or maintainer is effectively prevented from recovering and disassembling various communication devices, the subsequent maintenance cost of the communication module is greatly reduced, and the maintenance execution efficiency is improved.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a flow chart of a first embodiment of a debug data transfer method of the present invention;
FIG. 2 is a flow chart of a second embodiment of a debug data transfer method of the present invention;
FIG. 3 is a flowchart of a third embodiment of a debug data transfer method of the present invention;
FIG. 4 is a flowchart of a fourth embodiment of a debug data transfer method of the present invention;
FIG. 5 is a flowchart of a fifth embodiment of a debug data transfer method of the present invention;
FIG. 6 is a flowchart of a sixth embodiment of a debug data transfer method of the present invention;
FIG. 7 is a flowchart of a debug data transfer method according to a seventh embodiment of the present invention;
FIG. 8 is a flowchart of an eighth embodiment of a debug data transfer method of the present invention;
FIG. 9 is a schematic pin diagram illustrating a first embodiment of a debug data transfer method according to the present invention;
FIG. 10 is a diagram of a peripheral connector according to a first embodiment of the debug data transmission method of the present invention;
FIG. 11 is a timing diagram of host output peripheral reception according to the first embodiment of the debug data transfer method of the present invention;
fig. 12 is a timing chart of the peripheral output host receiving according to the first embodiment of the debug data transfer method of the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
Example one
Fig. 1 is a flowchart of a debug data transfer method according to a first embodiment of the present invention. A debugging data transmission method is applied to a host containing a USIM card seat of a subscriber identity module (USIM), and is characterized by comprising the following steps:
s1, when the external USIM connector is inserted into the USIM card holder of the host and the host is in the power-down mode of the USIM card, pulling down the reset pin of the USIM card holder and configuring the data pin of the USIM card holder into an output state.
And S2, after the reset pin is pulled down for a preset time, starting a clock signal of a clock pin of the USIM card socket, and storing output data to the data pin when the falling edge of each clock signal is interrupted until all the output data are stored.
S3, when the host is in the power-down mode, pulling up the reset pin and configuring the data pin to be in an input state.
S4, after the preset time of pulling down the reset pin, starting the clock signal, and receiving the input data stored to the data pin by the peripheral device when the rising edge of each clock signal is interrupted until all the input data are received.
In this embodiment, in order to solve the problem of maintainability of the communication module in the prior art, a provider or a maintenance party of the communication module generally needs to recover and disassemble various types of communication equipment, and subsequent maintenance cost and maintenance execution efficiency of the communication module are greatly increased.
In this embodiment, the communication DEVICE serves as HOST and the commissioning or maintenance DEVICE serves as peripheral DEVICE. Specifically, please refer to fig. 9, which shows a pin connection diagram, wherein the left side of the diagram is the socket of HOST, and the right side of the diagram is the connector of peripheral DEVICE. In this embodiment, the HOST device has three GPIO (General-purpose input/output) pins. When the HOST has a USIM card socket, the USIM card socket is taken as an example, wherein the USIM card socket has a VCC power supply pin, a CLK clock pin, a DATA pin, a RESET pin, and the like, when the USIM card is in a power-on state, the USIM card is in a normal working state, and when the USIM card socket is in a power-on state and the USIM card socket is not inserted, the VCC power supply pin is 0, and the CLK clock pin, the DATA pin, and the RESET pin can be configured as a common GPIO, that is, a DATA channel is simulated between the HOST and the peripheral.
Optionally, in this embodiment, when the HOST is not in the normal operating mode, the HOST may connect with the peripheral DEVICE, and then perform corresponding data transceiving transmission, for example, the peripheral DEVICE transmits version software to the HOST, or the HOST transmits debug data to the peripheral DEVICE.
In this embodiment, please refer to a schematic diagram of the peripheral connector shown in fig. 10. The peripheral DEVICE connector is a card-shaped patch similar to a USIM card, and specifically, a GND ground pin, a CLK clock pin, a DATA pin, and a RESET pin are used therein.
In this embodiment, please refer to the timing diagram of HOST output peripheral reception shown in fig. 11, wherein for a scenario where the HOST outputs DATA and the peripheral DEVICE receives DATA, first, the HOST pulls the RESET pin low, and the peripheral DEVICE receives an interrupt to configure the DATA pin to an input state; then, after waiting for a preset time, the HOST starts the CLOCK signal, stores DATA to the DATA pin along the falling edge of the CLOCK signal each time, and reads the DATA stored on the DATA line after the DEVICE receives the interruption of the rising edge of the CLOCK signal. If the data transmission is finished, the HOST HOST closes the CLOCK signal; and switching to the working state of the normal mode or continuously keeping the working state of the peripheral data transmission mode of the host.
In this embodiment, please refer to the timing diagram of peripheral output HOST reception shown in fig. 12, wherein for the scenario where the peripheral DEVICE outputs DATA and the HOST receives DATA, first, the HOST still pulls the RESET pin high, at this time, the HOST configures the DATA pin as input, and after the peripheral DEVICE receives the RESET interrupt, configures the DATA pin as output; then, after waiting for a preset time, the HOST starts the CLOCK signal, and at each falling edge of CLOCK, the HOST stores DATA to the DATA pin by the peripheral DEVICE, and reads the DATA on the DATA line after receiving the interruption of the rising edge of CLOCK. If the data transmission is finished, the HOST HOST closes the CLOCK signal; and switching to the working state of the normal mode or continuously keeping the working state of the peripheral data transmission mode of the host.
Optionally, in this embodiment, the above operations of outputting data by the HOST and receiving data by the peripheral DEVICE, or outputting data by the peripheral DEVICE and receiving data by the HOST are performed at the time of booting the HOST or at the BOOT (BOOT) stage.
The embodiment has the advantages that when an external USIM connector is inserted into a USIM card seat of the host and the host is in a power-down mode of the USIM card, the reset pin of the USIM card seat is pulled down, and the data pin of the USIM card seat is configured to be in an output state; after the reset pin is pulled down for a preset time, starting a clock signal of a clock pin of the USIM card seat, and storing output data to the data pin when the falling edge of each clock signal is interrupted until all the output data are stored; when the host is in the power-down mode, pulling up the reset pin and configuring the data pin to be in an input state; and after the preset time of pulling down the reset pin, starting the clock signal, and receiving input data stored to the data pin by the peripheral equipment when the rising edge of each clock signal is interrupted until all the input data are received. The efficient and convenient debugging data transmission scheme is realized, the communication module provider or maintainer is effectively prevented from recovering and disassembling various communication devices, the subsequent maintenance cost of the communication module is greatly reduced, and the maintenance execution efficiency is improved.
Example two
Fig. 2 is a flowchart of a second embodiment of a debug data transmission method according to the present invention, where based on the above embodiments, when an external USIM connector is inserted into a USIM socket of the host and the host is in a power-down mode of a USIM card, a reset pin of the USIM socket is pulled down, and a data pin of the USIM socket is configured to be in an output state, including:
and S11, when the host is in the power-down mode, configuring the clock pin as a general purpose input/output (GPIO) pin.
S12, start timer (x) and counter TimerCnt, and set the counter TimerCnt to 0.
Optionally, in this embodiment, when the host is in the abnormal operating mode, the clock pin is configured as a general purpose input/output GPIO pin.
Optionally, in this embodiment, when the host has not completed all data uploading or has not completed all data downloading, the clock pin is configured as a general purpose input/output GPIO pin.
Optionally, in this embodiment, the clock pin is configured as a general purpose input/output GPIO pin when a data transmission instruction is received in the interactive interface of the host and the USIM socket of the host is empty.
The embodiment has the advantages that when the host is in the power-down mode, the clock pin is configured to be a general purpose input/output GPIO pin; a timer (x) and a counter TimerCnt are started, and the counter TimerCnt is set to 0. The mode determining mode of the host is provided for realizing an efficient and convenient debugging data transmission scheme, the communication module provider or maintainer is effectively prevented from recovering and disassembling various communication devices, the subsequent maintenance cost of the communication module is greatly reduced, and the maintenance execution efficiency is improved.
EXAMPLE III
Fig. 3 is a flowchart of a third embodiment of a debug data transmission method according to the present invention, where based on the above embodiments, after pulling down the preset time of the reset pin, the method starts a clock signal of a clock pin of the USIM socket, and when a falling edge of each clock signal is interrupted, stores output data received by an external device to the data pin until all the output data are stored completely, and includes:
s21, waiting for the timer (x) to be interrupted.
S22, when the timer (x) is interrupted, the counter TimerCnt is left over, when the counter TimerCnt% 2 is 1, the clock pin is pulled down, when the output data is 0, the data pin is pulled down, when the output data is 1, the data pin is pulled up, and the counter TimerCnt is incremented by 1, when the counter TimerCnt% 2 is 0, the clock pin is pulled up, and the counter TimerCnt is incremented by 1.
The beneficial effects of this embodiment are that, by waiting for the interrupt of the timer (x), when the timer (x) is interrupted, the counter TimerCnt is left over, when the counter TimerCnt% 2 is 1, the clock pin is pulled down, when the output data is 0, the data pin is pulled down, when the output data is 1, the data pin is pulled up, and 1 is added to the counter TimerCnt, when the counter TimerCnt% 2 is 0, the clock pin is pulled up, and 1 is added to the counter TimerCnt. The method provides a control mode of data segmented transmission for realizing an efficient and convenient debugging data transmission scheme, effectively avoids a communication module provider or a maintainer from recovering and disassembling various communication devices, greatly reduces the subsequent maintenance cost of the communication module, and improves the maintenance execution efficiency.
Example four
Fig. 4 is a flowchart of a fourth embodiment of the debug data transmission method according to the present invention, where based on the above embodiments, after pulling down the preset time of the reset pin, the method starts the clock signal of the clock pin of the USIM socket, and when a falling edge of each clock signal is interrupted, stores the output data received by the peripheral device to the data pin until all the output data are stored completely, and further includes:
s23, when the storage of the output data is completed, or the preset timing Time of n timers (x) has arrived, closing the timers (x) and the counter TimerCnt.
S24, pulling up the clock pin and configuring the data pin into an input state.
The embodiment has the beneficial effects that the timer (x) and the counter TimerCnt are closed when the output data is stored or the preset timing Time (Time) of n timer (x) is reached; and pulling up the clock pin to configure the data pin into an input state. The switching mode of data input and data output is provided for realizing an efficient and convenient debugging data transmission scheme, the communication module provider or maintainer is effectively prevented from recovering and disassembling various communication devices, the subsequent maintenance cost of the communication module is greatly reduced, and the maintenance execution efficiency is improved.
EXAMPLE five
Fig. 5 is a flowchart of a fifth embodiment of the debug data transmission method according to the present invention, where based on the above embodiments, the pulling up the reset pin and configuring the data pin to be in an input state when the host is in the power-down mode includes:
s31, the timer (x) and the counter TimerCnt are started again.
S32, setting the counter TimerCnt to 0, and pulling down the clock pin.
Optionally, in this embodiment, the initialization of the timing value of the timer and the count value of the counter is determined according to a debugging or maintenance type of the peripheral to the host, a data amount of the transmission data, and a data type.
The beneficial effect of this embodiment is that, by starting the timer (x) and the counter TimerCnt again; set the counter TimerCnt to 0 and pull down the clock pin. The setting basis of the timer and the counter is provided for realizing an efficient and convenient debugging data transmission scheme, the communication module provider or maintainer is effectively prevented from recovering and disassembling various communication devices, the subsequent maintenance cost of the communication module is greatly reduced, and the maintenance execution efficiency is improved.
EXAMPLE six
Fig. 6 is a flowchart of a sixth embodiment of a debug data transmission method according to the present invention, where based on the above embodiments, the starting of the clock signal after the preset time of pulling down the reset pin and receiving the input data stored in the data pin by the peripheral device when the rising edge of each clock signal is interrupted until all the input data are received includes:
s41, when the interrupt of the timer (x) comes, the counter TimerCnt is left over.
S42, when the counter TimerCnt% 2 is equal to 0, receiving the input data, pulling up the clock pin, and adding 1 to the counter TimerCnt, and when the counter TimerCnt% 2 is equal to 1, pulling down the clock pin, and adding 1 to the counter TimerCnt.
The beneficial effect of this embodiment is that, when the interrupt of the timer (x) comes, the counter TimerCnt is left; when the counter TimerCnt% 2 is equal to 0, the input data is received, the clock pin is pulled up, and 1 is added to the counter TimerCnt, and when the counter TimerCnt% 2 is equal to 1, the clock pin is pulled down, and 1 is added to the counter TimerCnt. The method provides a control mode of data segmented transmission for realizing an efficient and convenient debugging data transmission scheme, effectively avoids a communication module provider or a maintainer from recovering and disassembling various communication devices, greatly reduces the subsequent maintenance cost of the communication module, and improves the maintenance execution efficiency.
EXAMPLE seven
Fig. 7 is a flowchart of a seventh embodiment of a debug data transmission method according to the present invention, where based on the above embodiments, after pulling down the preset time of the reset pin, the clock signal is started, and when a rising edge of each clock signal is interrupted, the method receives input data stored to the data pin by the peripheral until all the input data are received, and the method further includes:
s43, when the received input data does not exceed the preset maximum data amount for single transmission, continuing to wait for the interruption of the timer (x).
S44, when the received input data exceeds the maximum data amount of the single transmission, waiting for the interrupt of the timer (x) again until all the input data are received.
Optionally, in this embodiment, when a scenario that has both data input and data output is required, an implementation is to complete data input or data output according to the above embodiment, and then perform data output or data input; in another embodiment, data output is performed after an odd number of times of interruption of the rising edge of the CLOCK signal, and data input is performed after an even number of times of interruption of the rising edge of the CLOCK signal, so that data input or data output can be synchronously performed.
The embodiment has the advantages that when the received input data does not exceed the preset maximum data volume of single transmission, the interruption of the timer (x) is continuously waited; when the received input data exceeds the maximum data volume of the single transmission, waiting for the interruption of the timer (x) again until all the input data are received. The method provides diversified transmission control modes for realizing an efficient and convenient debugging data transmission scheme, effectively avoids the communication module provider or maintainer from recovering and disassembling various communication devices, greatly reduces the subsequent maintenance cost of the communication module and improves the maintenance execution efficiency.
Example eight
Fig. 8 is a flowchart of an eighth embodiment of a debug data transmission method according to the present invention, and based on the above embodiments, the present invention further provides a debug data transmission method applied to an external device including a USIM connector of a subscriber identity card, where the method includes:
and S10, when the USIM connector is inserted into a USIM card socket of the host and the host is in a power-down mode of the USIM card, configuring the host to receive data.
S20, when receiving the interrupt signal of the reset pin of the host, if the reset pin is at a high level, configuring the host to output a data state, setting the data pin of the host to an output state, and receiving the transmission data stored by the host in a previous state.
S30, when receiving the interrupt signal of the reset pin of the host, if the reset pin is at low level, configuring itself to receive data state, and setting the data pin of the host to input state.
In this embodiment, in order to solve the problem of maintainability of the communication module in the prior art, a provider or a maintenance party of the communication module generally needs to recover and disassemble various types of communication equipment, and subsequent maintenance cost and maintenance execution efficiency of the communication module are greatly increased.
In this embodiment, the communication DEVICE serves as HOST and the commissioning or maintenance DEVICE serves as peripheral DEVICE. Specifically, please refer to fig. 9, which shows a pin connection diagram, wherein the left side of the diagram is the socket of HOST, and the right side of the diagram is the connector of peripheral DEVICE. In this embodiment, the HOST device has three GPIO (General-purpose input/output) pins. When the HOST has a USIM card socket, the USIM card socket is taken as an example, wherein the USIM card socket has a VCC power supply pin, a CLK clock pin, a DATA pin, a RESET pin, and the like, when the USIM card is in a power-on state, the USIM card is in a normal working state, and when the USIM card socket is in a power-on state and the USIM card socket is not inserted, the VCC power supply pin is 0, and the CLK clock pin, the DATA pin, and the RESET pin can be configured as a common GPIO, that is, a DATA channel is simulated between the HOST and the peripheral.
Optionally, in this embodiment, when the HOST is not in the normal operating mode, the HOST may connect with the peripheral DEVICE, and then perform corresponding data transceiving transmission, for example, the peripheral DEVICE transmits version software to the HOST, or the HOST transmits debug data to the peripheral DEVICE.
In this embodiment, please refer to a schematic diagram of the peripheral connector shown in fig. 10. The peripheral DEVICE connector is a card-shaped patch similar to a USIM card, and specifically, a GND ground pin, a CLK clock pin, a DATA pin, and a RESET pin are used therein.
In this embodiment, please refer to the timing diagram of HOST output peripheral reception shown in fig. 11, wherein for a scenario where the HOST outputs DATA and the peripheral DEVICE receives DATA, first, the HOST pulls the RESET pin low, and the peripheral DEVICE receives an interrupt to configure the DATA pin to an input state; then, after waiting for a preset time, the HOST starts the CLOCK signal, stores DATA to the DATA pin along the falling edge of the CLOCK signal each time, and reads the DATA stored on the DATA line after the DEVICE receives the interruption of the rising edge of the CLOCK signal. If the data transmission is finished, the HOST HOST closes the CLOCK signal; and switching to the working state of the normal mode or continuously keeping the working state of the peripheral data transmission mode of the host.
In this embodiment, please refer to the timing diagram of peripheral output HOST reception shown in fig. 12, wherein for the scenario where the peripheral DEVICE outputs DATA and the HOST receives DATA, first, the HOST still pulls the RESET pin high, at this time, the HOST configures the DATA pin as input, and after the peripheral DEVICE receives the RESET interrupt, configures the DATA pin as output; then, after waiting for a preset time, the HOST starts the CLOCK signal, and at each falling edge of CLOCK, the HOST stores DATA to the DATA pin by the peripheral DEVICE, and reads the DATA on the DATA line after receiving the interruption of the rising edge of CLOCK. If the data transmission is finished, the HOST HOST closes the CLOCK signal; and switching to the working state of the normal mode or continuously keeping the working state of the peripheral data transmission mode of the host.
Optionally, in this embodiment, the above operations of outputting data by the HOST and receiving data by the peripheral DEVICE, or outputting data by the peripheral DEVICE and receiving data by the HOST are performed at the time of booting the HOST or at the BOOT (BOOT) stage.
The embodiment has the advantages that when the USIM connector is inserted into the USIM card seat of the host and the host is in a power-down mode of the USIM card, the host is configured to receive data; when an interrupt signal of a reset pin of the host is received, if the reset pin is in a high level, the reset pin is configured to be in an output data state, the data pin of the host is set to be in the output state, and transmission data stored by the host in the last state is received; when receiving an interrupt signal of a reset pin of the host, if the reset pin is at a low level, configuring the reset pin to receive a data state, and setting the data pin of the host to an input state. The efficient and convenient debugging data transmission scheme is provided, the communication module provider or maintainer is effectively prevented from recovering and disassembling various communication devices, the subsequent maintenance cost of the communication module is greatly reduced, and the maintenance execution efficiency is improved.
Example nine
Based on the foregoing embodiments, the present invention further provides a debug data transmission apparatus, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the debug data transmission method described in any one of the above are implemented.
It should be noted that the device embodiment and the method embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment, and technical features in the method embodiment are correspondingly applicable in the device embodiment, which is not described herein again.
Example ten
Based on the foregoing embodiments, the present invention further provides a computer-readable storage medium, where a debug data transmission program is stored, and when executed by a processor, the debug data transmission program implements the steps of the debug data transmission method according to any one of the foregoing embodiments.
It should be noted that the media embodiment and the method embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment, and technical features in the method embodiment are correspondingly applicable in the media embodiment, which is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A debugging data transmission method is applied to a host containing a USIM card seat of a subscriber identity module (USIM), and is characterized by comprising the following steps:
when an external USIM connector is inserted into a USIM card seat of the host and the host is in a power-down mode of a USIM card, pulling down a reset pin of the USIM card seat and configuring a data pin of the USIM card seat into an output state;
after the reset pin is pulled down for a preset time, starting a clock signal of a clock pin of the USIM card seat, and storing output data to the data pin when the falling edge of each clock signal is interrupted until all the output data are stored;
when the host is in the power-down mode, pulling up the reset pin and configuring the data pin to be in an input state;
and after the preset time of pulling down the reset pin, starting the clock signal, and receiving input data stored to the data pin by the peripheral equipment when the rising edge of each clock signal is interrupted until all the input data are received.
2. The debugging data transmission method according to claim 1, wherein said pulling down a reset pin of the USIM socket and configuring a data pin of the USIM socket to an output state when the external USIM connector is inserted into the USIM socket of the host and the host is in a power-down mode of the USIM card comprises:
when the host is in the power-down mode, the clock pin is configured to be a general purpose input/output GPIO pin;
a timer (x) and a counter TimerCnt are started, and the counter TimerCnt is set to 0.
3. The debug data transmission method according to claim 2, wherein said starting a clock signal of a clock pin of said USIM socket after a preset time of pulling down said reset pin, and storing output data received by an external device to said data pin when a falling edge of each of said clock signals is interrupted until all of said output data storing is completed comprises:
waiting for an interrupt of the timer (x);
when the timer (x) is interrupted, the counter TimerCnt is left over, when the counter TimerCnt% 2 is equal to 1, the clock pin is pulled down, when the output data is 0, the data pin is pulled down, when the output data is 1, the data pin is pulled up, and the counter TimerCnt is added with 1, when the counter TimerCnt% 2 is equal to 0, the clock pin is pulled up, and the counter TimerCnt is added with 1.
4. The debug data transfer method of claim 3, wherein said starting a clock signal of a clock pin of said USIM socket after a preset time of pulling down said reset pin, and storing output data received by an external device to said data pin when a falling edge of each of said clock signals is interrupted until all of said output data storing is completed, further comprises:
when the storage of the output data is completed, or the preset timing Time of n timers (x) is reached, closing the timers (x) and the counter TimerCnt;
and pulling up the clock pin to configure the data pin into an input state.
5. The debug data transfer method of claim 4, wherein said pulling up said reset pin and configuring said data pin to an input state while said host is in said power down mode comprises:
restarting the timer (timer) (x) and the counter TimerCnt;
set the counter TimerCnt to 0 and pull down the clock pin.
6. The debug data transfer method of claim 5, wherein said enabling said clock signals after said preset time of pulling down said reset pin and receiving input data stored by said peripheral device to said data pin upon interruption of a rising edge of each of said clock signals until all of said input data reception is completed comprises:
when the interrupt of the timer (x) comes, the timer is left;
when the counter TimerCnt% 2 is equal to 0, the input data is received, the clock pin is pulled up, and 1 is added to the counter TimerCnt, and when the counter TimerCnt% 2 is equal to 1, the clock pin is pulled down, and 1 is added to the counter TimerCnt.
7. The debug data transfer method of claim 6, wherein said enabling said clock signals after said preset time of pulling down said reset pin and receiving input data stored by said peripheral device to said data pin upon interruption of a rising edge of each of said clock signals until all of said input data reception is completed, further comprises:
continuing to wait for an interruption of the timer (timer) (x) when the received input data does not exceed a preset maximum data volume for single transmission;
when the received input data exceeds the maximum data volume of the single transmission, waiting for the interruption of the timer (x) again until all the input data are received.
8. A debugging data transmission method is applied to a peripheral comprising a USIM (Universal subscriber identity Module) connector of a user identification card, and is characterized by comprising the following steps:
when the USIM connector is inserted into a USIM card holder of a host and the host is in a power-down mode of the USIM card, configuring the USIM connector into a data receiving state;
when an interrupt signal of a reset pin of the host is received, if the reset pin is in a high level, the reset pin is configured to be in an output data state, the data pin of the host is set to be in the output state, and transmission data stored by the host in the last state is received;
when receiving an interrupt signal of a reset pin of the host, if the reset pin is at a low level, configuring the reset pin to receive a data state, and setting the data pin of the host to an input state.
9. A debug data transfer apparatus, characterized in that said apparatus comprises a memory, a processor and a computer program stored on said memory and executable on said processor, said computer program realizing the steps of the debug data transfer method as claimed in any one of claims 1 to 8 when executed by said processor.
10. A computer-readable storage medium, having stored thereon a debug data transfer program, which when executed by a processor implements the steps of the debug data transfer method of any of claims 1 to 8.
CN202111659264.4A 2021-12-30 2021-12-30 Debug data transmission method, device, equipment and storage medium Active CN114297104B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111659264.4A CN114297104B (en) 2021-12-30 2021-12-30 Debug data transmission method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111659264.4A CN114297104B (en) 2021-12-30 2021-12-30 Debug data transmission method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114297104A true CN114297104A (en) 2022-04-08
CN114297104B CN114297104B (en) 2023-08-18

Family

ID=80973867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111659264.4A Active CN114297104B (en) 2021-12-30 2021-12-30 Debug data transmission method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114297104B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101808343A (en) * 2009-02-13 2010-08-18 上海摩波彼克半导体有限公司 Automated test circuit structure and method of SIM (Subscriber Identity Module)/USIM(Universal Subscriber Identity Module) controller in ARM digital baseband chip
CN102254198A (en) * 2011-04-28 2011-11-23 华为终端有限公司 Data transmitting method for expansion microSD card and user identification module
CN103874236A (en) * 2012-12-17 2014-06-18 福兴达科技实业(深圳)有限公司 Wireless communication data card with extended function and wireless communication terminal
CN104135757A (en) * 2014-06-20 2014-11-05 北京创毅视讯科技有限公司 Method and device of reducing power consumption of terminal as well as baseband chip
CN106453730A (en) * 2016-12-22 2017-02-22 珠海市魅族科技有限公司 Smart card and terminal equipment
CN108112008A (en) * 2017-12-12 2018-06-01 苏州蜗牛数字科技股份有限公司 A kind of circuit for realizing SIM card function, method and terminal
US20180293191A1 (en) * 2015-12-18 2018-10-11 Huawei Technologies Co., Ltd. Non-volatile storage device and method for accessing non-volatile storage device
CN208112977U (en) * 2018-04-28 2018-11-16 中创通信技术(深圳)有限公司 A kind of mobile SIM card pond and mobile SIM card cell system
CN109830095A (en) * 2019-01-25 2019-05-31 国网河南省电力公司焦作供电公司 A kind of data concentrator
CN112995955A (en) * 2021-04-21 2021-06-18 智道网联科技(北京)有限公司 Intelligent vehicle-mounted networking terminal, debugging method, networking compatibility method and device
WO2021185105A1 (en) * 2020-03-20 2021-09-23 华为技术有限公司 Method for switching between sim card and esim card, and electronic device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101808343A (en) * 2009-02-13 2010-08-18 上海摩波彼克半导体有限公司 Automated test circuit structure and method of SIM (Subscriber Identity Module)/USIM(Universal Subscriber Identity Module) controller in ARM digital baseband chip
CN102254198A (en) * 2011-04-28 2011-11-23 华为终端有限公司 Data transmitting method for expansion microSD card and user identification module
CN103874236A (en) * 2012-12-17 2014-06-18 福兴达科技实业(深圳)有限公司 Wireless communication data card with extended function and wireless communication terminal
CN104135757A (en) * 2014-06-20 2014-11-05 北京创毅视讯科技有限公司 Method and device of reducing power consumption of terminal as well as baseband chip
US20180293191A1 (en) * 2015-12-18 2018-10-11 Huawei Technologies Co., Ltd. Non-volatile storage device and method for accessing non-volatile storage device
CN106453730A (en) * 2016-12-22 2017-02-22 珠海市魅族科技有限公司 Smart card and terminal equipment
CN108112008A (en) * 2017-12-12 2018-06-01 苏州蜗牛数字科技股份有限公司 A kind of circuit for realizing SIM card function, method and terminal
CN208112977U (en) * 2018-04-28 2018-11-16 中创通信技术(深圳)有限公司 A kind of mobile SIM card pond and mobile SIM card cell system
CN109830095A (en) * 2019-01-25 2019-05-31 国网河南省电力公司焦作供电公司 A kind of data concentrator
WO2021185105A1 (en) * 2020-03-20 2021-09-23 华为技术有限公司 Method for switching between sim card and esim card, and electronic device
CN112995955A (en) * 2021-04-21 2021-06-18 智道网联科技(北京)有限公司 Intelligent vehicle-mounted networking terminal, debugging method, networking compatibility method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
郭文光: "低功耗多通道多方式数据传输控制***研究及应用", 《中国优秀硕士学位论文全文数据库》, pages 012 - 42 *
鹿勇: "无线通信模块生产测试***的设计和实现", 《中国优秀硕士学位论文全文数据库》, pages 135 - 203 *

Also Published As

Publication number Publication date
CN114297104B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
CN101958799B (en) Method, device and system for updating terminal
US8650332B2 (en) Method for switching working mode, USB device, and host device
CN101673202B (en) Program writing method and system, pre-writing device and writing device
CN102164363B (en) Base station version updating realization method and base station
EP3258737B1 (en) Mobile terminal, power supply adapter, and upgrading method thereof
CN102185754B (en) Method for upgrading board card in switch system
CN101350990A (en) Method for updating CP of intelligent mobile phone
WO2012113196A1 (en) Method and apparatus for realizing upgrade of master single-board and slave single-board
CN111240753A (en) Loading method of bootstrap program, storage medium and embedded terminal
CN108027744B (en) Data transmission method and mobile terminal
CN111488207A (en) Application process keep-alive method, device, network equipment and storage medium
CN111736866A (en) One-to-one and one-to-many compatible online upgrading method and terminal equipment
CN114297104B (en) Debug data transmission method, device, equipment and storage medium
KR20080078112A (en) Apparatus and method for updating boot logo in portable terminal
CN101854442B (en) Network device and firmware updating method thereof
CN115658152A (en) Firmware upgrading method, firmware, electronic device and computer readable storage medium
US8473007B2 (en) IC card that discards proactive command at predetermined timing and resumes transmission of proactive command after initialization
CN115268969A (en) Android system upgrading method and device and terminal equipment
CN113127227B (en) Instruction processing method and device for module communication, microcontroller and medium
CN101998691B (en) Method, system and device for data transmission
US10049070B2 (en) Data card, and data card switching method and apparatus
WO2008104601A2 (en) Method of managing command execution in an electronic token
CN108270596B (en) Method for upgrading embedded wireless communication module
CN105718388A (en) USB device based asynchronous calling method and apparatus
CN101984407B (en) Terminal driver upgrading method and device

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
CB02 Change of applicant information

Address after: 518000 606, block a, sharing building, No. 78, Keyuan North Road, songpingshan community, Xili street, Nanshan District, Shenzhen, Guangdong

Applicant after: Gosuncn IOT Technology Co.,Ltd.

Address before: 518000 606, block a, sharing building, No. 78, Keyuan North Road, songpingshan community, Xili street, Nanshan District, Shenzhen, Guangdong

Applicant before: Gaoxing Wulian Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant