Disclosure of Invention
The invention aims to provide a wireless communication method for analog-to-digital adaptive switching, which can rapidly and adaptively switch between an analog channel and a digital channel through a mixed channel.
It is a further object of the invention to provide an electronic device and a computer readable storage medium that can be quickly and adaptively switched between analog and digital channels through a hybrid channel.
In order to achieve the above object, the present invention adopts the following technical scheme:
in a first aspect, a wireless communication method for a terminal for adaptive switching of private network analog to digital, the terminal including an analog channel, a digital channel, and a hybrid channel, where reception and transmission of the analog signal are configured with CTCSS or CDCSS, the hybrid channel is capable of adaptively switching between the associated digital channel and analog channel, and a reception frequency point and a transmission frequency point of the digital channel are the same as those of the analog channel, and when a new area is started or switched or a new channel is switched, the method includes a new switching to the hybrid channel, including the steps of:
Step S101: the APP is switched to an analog channel of the mixed channel;
step S102: the APP transmits the current channel parameters to the CCL;
Step S103: CCL receives the parameters and switches to the analog channel of the mixed channel;
Step S104: CCL transmits the current channel parameters to DLL;
Step S105: the DSP receives the parameters and switches to an analog channel of the mixed channel, and backs up the formulated digital channel parameters;
Step S106: the DSP starts a channel hold timer;
step S107: judging whether an analog signal is received, if yes, executing a step S108, otherwise, executing a step S109;
step S108: stopping the channel holding timer, and entering a process of starting to switch to the analog channel mode;
step S109: and judging whether the time of the channel hold timer is up, if yes, executing the flow of the DSP to uninterruptedly detect the digital and analog signals, otherwise, returning to the step S107.
Preferably, the DSP uninterruptedly detects digital and analog signal flows includes:
Step S201: judging whether the time t is up, if yes, executing S202, otherwise returning to the step S201;
Step S202: attempting to decode the digital synchronization header;
Step S203: judging whether the digital synchronous head is found successfully, if yes, executing S204, otherwise, executing S207;
step S204: judging whether ARM is working in a digital channel, if so, executing S205, otherwise, entering to start to switch to the digital channel mode;
Step S205: the DSP locks a digital channel and no longer receives analog signals;
Step S206: entering a normal digital channel receiving process and a useful signal channel;
Step S207: judging whether the time T is up, if T is an integer multiple of T, returning to the step S201, otherwise executing the step S208;
step S208: attempting to detect an analog signal;
Step S209: judging whether CTCSS or CDCSS is matched, if so, executing step S210, otherwise, returning to step S201;
Step S210: judging whether ARM is working in an analog channel, if so, executing step S211, otherwise, entering a mode of starting to switch to the analog channel;
step S211: the DSP is locked into an analog channel, and digital signals are not received any more;
step S212: and entering a normal analog channel receiving flow and entering a useful signal channel.
Preferably, t=2.5 ms, t=20 ms.
Preferably, the initiating switching to the analog channel mode comprises the steps of:
Step S301: the DSP is locked into an analog channel, and digital signals are not received any more;
step S302: the DSP sends a message for switching to the analog channel to the CCL;
step S303: CCL forwards the message switched to the analog channel to APP;
Step S304: the APP is switched to the analog channel, and the CCL is replied after the word pattern of the analog channel is displayed;
Step S305: the CCL switches to the analog channel after receiving the message, so that the whole system is ensured to work in the analog channel;
Step S306: and entering a normal analog channel receiving flow and entering a useful signal channel.
Preferably, the enabling switching to the digital path mode comprises the steps of:
step S401: the DSP locks a digital channel and no longer receives analog signals;
step S402: the DSP sends a message for switching to the digital channel to the CCL;
Step S403: CCL forwards the message switched to the digital channel to APP;
step S404: the APP is switched to the digital channel, and the CCL is replied after the digital channel word is displayed;
step S405: the CCL switches to the digital channel after receiving the message, so that the whole system is ensured to work in the digital channel;
Step S406: and entering a normal digital channel receiving process and entering a useful signal channel.
Preferably, the entering the useful signal channel comprises the steps of:
step S501: the terminal is processing business and is in busy state;
step S502: and judging whether the terminal processes the service and is in an idle state, if yes, entering a channel for maintaining, otherwise, returning to the step S502.
Preferably, the entering channel maintenance comprises the steps of:
step S601: the DSP starts a channel holding time timer;
Step S602: judging whether the current operation is in an analog channel, if so, executing a step S603, otherwise, executing a step S612;
step S603: judging whether the channel holding time overflows, if yes, executing step S606, otherwise, entering step S604;
Step S604: judging whether a valid analog signal exists, if yes, executing a step S605, otherwise, returning to the step S602;
Step S605: the DSP stops the channel holding time timer and enters a useful signal channel;
Step S606: judging whether the preferred transmitting mode is a digital channel, if yes, executing step S607, otherwise executing step S611;
step S607: the DSP sends a message for switching to the digital channel to the CCL;
step S608: CCL forwards the message switched to the digital channel to APP;
step S609: the APP is switched to the digital channel, and the CCL is replied after the digital channel word is displayed;
Step S610: after receiving the message, the CCL switches to a digital channel to ensure that the ARM end works in the digital channel;
step S611: the DSP unlocks the analog channel and enters a mixed channel mode;
Step S612: judging whether the channel holding time overflows or not, if yes, executing step S613, otherwise executing step S619;
step S613: judging whether the preferred transmitting mode is an analog channel, if yes, executing step S614, otherwise executing step S618;
Step S614: the DSP sends a message for switching to the analog channel to the CCL;
step S615: CCL forwards the message switched to the analog channel to APP;
Step S616: the APP is switched to the analog channel, and the CCL is replied after the word pattern of the analog channel is displayed;
step S617: after receiving the message, the CCL switches to an analog channel, so that the ARM end is ensured to work in the analog channel;
step S618: the DSP unlocks the digital channel, enters a mixed channel mode, and continuously detects digital and analog signals;
Step S619: judging whether a valid digital signal exists, if yes, executing a step S620, otherwise, returning to the step S602;
step S620: the DSP stops the channel hold time timer and enters the useful signal channel.
Preferably, the method further comprises the steps of:
Step S701: judging whether the terminal is in a locked channel state, if so, executing a step S703, otherwise, executing a step S702;
step S702: judging whether the channel holding time overflows, if yes, executing step S706, otherwise executing step S703;
step S703: judging whether the current work is in an analog channel, if so, executing a step S704, otherwise, executing a step S705;
step S704: the terminal sends an analog signal;
step S705: the terminal sends out a digital signal;
Step S706: whether the preferred transmission mode is a digital channel is judged, if yes, step S705 is executed, otherwise step S704 is executed.
In a second aspect, the present invention also discloses an electronic device, including: one or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs comprising instructions for performing the method of private network analog-to-digital adaptive handover of a terminal wireless communication as described above.
In a third aspect, the present invention discloses a computer readable storage medium comprising a computer program for use in connection with an electronic device having a memory, the computer program being executable by a processor to perform a method of terminal wireless communication for private network analog-to-digital adaptive handover as described above.
From the above technical scheme, the invention has the following advantages: analog signals and digital signals can be rapidly identified, corresponding working modes can be accurately switched, and the existing analog intercom terminal and digital intercom terminal are well compatible.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
The terms first, second, third and the like in the description and in the claims and in the above drawings, are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
The following describes the embodiments of the present invention in detail by way of specific examples.
Referring to fig. 1, which is a general block diagram of a wireless communication terminal software for adaptive switching of a private network, the terminal for adaptive switching of a private network of the present invention can receive both analog signals and digital signals, but only one of the signals can be received at the same time; in order to avoid misjudgment of digital signals received by the terminal as analog signals, CTCS or CDCSS is required to be configured for receiving and transmitting appointed analog signals.
Case of terminal entering mixed channel state:
The terminal enters a mixed channel state after being started and switched to a new area/a new channel or the channel holding time, the mixed channel state can continuously search radio signals in the air to search available digital signals or analog signals, if the digital signals are searched first, the current channel is locked to be a digital channel, and if the analog signals are searched first, the current channel is locked to be an analog channel.
Hybrid channel: channels capable of adaptively receiving analog signals and digital signals.
The mixed channel functionality involves modifying the APP layer and the PS layer.
CTCSS (Continuous Tone Coded Squelch System), also called sub-audio, is a technique in which frequencies below the audio frequency (67-254.1 Hz) are added to the audio signal for simultaneous transmission.
CDCSS (Continuous Digital Coded Squelch System) also called digital subsonic, continuous digital control squelch system, which functions identically to CTCSS, except that it uses digital coding as a condition of whether or not silence is on. Consists of a fixed code group, and is sent out circularly.
PS: a protocol stack (Protocal Stack).
APP: is the application layer of the terminal software.
CCL (CCL): call control layer of DMR/PDT protocol.
DLL: the data link layer of the DMR/PDT protocol.
PL: physical layer of DMR/PDT protocol.
ARM: is an ARM core of a terminal using a general chip.
DSP: is a DSP core for a terminal to use a general-purpose chip.
Channel retention time: the terminal starts a timer for a channel hold time at the instant of transition from the busy state to the idle state, which is a time to lock on to maintain this channel state (analog channel or digital channel). When the channel hold time expires, the current channel state is not locked into the mixed channel state (uninterrupted searching for analog or digital signals).
Some configuration parameters are added on the basis of an analog channel:
the single box "mixed channel" is added. The option is checked to mean that the hybrid channel is enabled on the current channel.
The list box "designate digital channels" is added, wherein list members are all digital channels, and finally one of the digital channels is selected. The selected digital channel is associated with the current analog channel to form a hybrid channel in which both the digital channel and the analog channel are adaptive. Then the receiving frequency point and the transmitting frequency point of the digital channel are required to be the same as those of the analog channel.
The list box "preferred transmit mode" is added, and the list box members are digital channels/analog channels, and finally select one of them. The terminal transmits an analog signal or a digital signal outside the channel hold time, which is selected according to the preferred transmission mode.
Referring to fig. 2, in an embodiment of the present invention, a process flow of switching to a hybrid channel when a new area is started or switched or a new channel is switched is disclosed, and a wireless communication method of a terminal for adaptive switching of private network modulus includes an analog channel, a digital channel and a hybrid channel, wherein CTCSS or CDCSS is configured for receiving and transmitting the analog signal, the hybrid channel can be adaptively switched between an associated digital channel and the analog channel, and a receiving frequency point and a transmitting frequency point of the digital channel are the same as those of the analog channel, when the new area is started or switched or the new channel is switched, the method S100 for switching to the hybrid channel is included, and the method includes the following steps:
Step S101: the APP is switched to an analog channel of the mixed channel;
step S102: the APP transmits the current channel parameters to the CCL;
Step S103: CCL receives the parameters and switches to the analog channel of the mixed channel;
Step S104: CCL transmits the current channel parameters to DLL;
Step S105: the DSP receives the parameters and switches to an analog channel of the mixed channel, and backs up the formulated digital channel parameters;
Step S106: the DSP starts a channel hold timer;
step S107: judging whether an analog signal is received, if yes, executing a step S108, otherwise, executing a step S109;
step S108: stopping the channel holding timer, and entering a process of starting to switch to the analog channel mode;
step S109: and judging whether the time of the channel hold timer is up, if yes, executing the flow of the DSP to uninterruptedly detect the digital and analog signals, otherwise, returning to the step S107.
As an embodiment, when the terminal switches to the hybrid channel (at power-on, to a new zone/new channel), APP defaults to the analog channel of the hybrid channel (the analog channel needs to be configured with CTCSS/CDCSS) and passes the hybrid channel parameters and specified digital channel parameters read from FLASH to CCL. After receiving the message of APP switching channel, CCL also switches to analog channel of mixed channel, and transfers the received parameters to DLL. After receiving the CCL channel switching message, the DLL switches to the analog channel of the mixed channel, and backs up the designated digital channel parameters so as to support the DLL and the PL to process and recognize the analog signal and the digital signal at the same time. When these operations are ready, the DSP starts a channel hold timer during which the terminal is operating on the current analog channel and enters the analog receive path if an analog signal is received. After the channel hold time has timed out, a mixed channel state is entered, and the digital signal and the analog signal are continuously detected to determine which path to operate on.
Referring to fig. 3, a flowchart of a DSP for uninterruptedly detecting digital and analog signals according to an embodiment of the invention, the DSP for uninterruptedly detecting digital and analog signals includes:
Step S201: judging whether the time t is up, if yes, executing S202, otherwise returning to the step S201;
Step S202: attempting to decode the digital synchronization header;
Step S203: judging whether the digital synchronous head is found successfully, if yes, executing S204, otherwise, executing S207;
step S204: judging whether ARM is working in a digital channel, if so, executing S205, otherwise, entering to start to switch to the digital channel mode;
Step S205: the DSP locks a digital channel and no longer receives analog signals;
Step S206: entering a normal digital channel receiving process and a useful signal channel;
Step S207: judging whether the time T is up, if T is an integer multiple of T, returning to the step S201, otherwise executing the step S208;
step S208: attempting to detect an analog signal;
Step S209: judging whether CTCSS or CDCSS is matched, if so, executing step S210, otherwise, returning to step S201;
Step S210: judging whether ARM is working in an analog channel, if so, executing step S211, otherwise, entering a mode of starting to switch to the analog channel;
step S211: the DSP is locked into an analog channel, and digital signals are not received any more;
step S212: and entering a normal analog channel receiving flow and entering a useful signal channel.
Wherein preferably t=2.5 ms, t=20 ms.
As one example, the DSP waits for a mixed channel and detects digital and analog signals without interruption based on the stored mixed channel parameters. Every 2.5 milliseconds, the digital signal is decoded in an attempted way, when the digital signal is decoded correctly, the digital signal receiving process is entered, the analog signal process is not processed any more, at this time, if the ARM end works in the analog channel path, the DSP can send a mode switching message switching to the digital channel to the CCL, the CCL forwards the mode switching message to the APP, the APP switches to the digital channel, and sends the message to the CCL after displaying the digital channel word, and the CCL also switches to the digital channel after receiving the message, so that the whole terminal system is ensured to work in the same digital channel path. If no digital signal is found in 2.5 ms, detecting whether the time of 20 ms overflows, if so, detecting CTCS/CDCSS, and entering into a receiving analog signal flow when the CTCS/CDCSS is matched, and not processing the digital signal flow any more, if the ARM end works in a digital channel mode, then sending a message switched to an analog channel to CCL, the CCL is forwarded to APP, the APP is switched to the analog channel, and displaying the word of the analog channel and sending the message to CCL, and the CCL is switched to the analog channel after receiving the message, so that the whole terminal system works in the same analog channel.
Referring to fig. 4, a flow chart of the method for starting switching to the analog channel mode according to an embodiment of the invention, the step of starting switching to the analog channel mode S300 includes the following steps:
Step S301: the DSP is locked into an analog channel, and digital signals are not received any more;
step S302: the DSP sends a message for switching to the analog channel to the CCL;
step S303: CCL forwards the message switched to the analog channel to APP;
Step S304: the APP is switched to the analog channel, and the CCL is replied after the word pattern of the analog channel is displayed;
Step S305: the CCL switches to the analog channel after receiving the message, so that the whole system is ensured to work in the analog channel;
Step S306: and entering a normal analog channel receiving flow and entering a useful signal channel.
Referring to fig. 5, a flowchart of an embodiment of the invention for initiating a switch to digital channel mode, the process S400 for initiating a switch to digital channel mode includes the steps of:
step S401: the DSP locks a digital channel and no longer receives analog signals;
step S402: the DSP sends a message for switching to the digital channel to the CCL;
Step S403: CCL forwards the message switched to the digital channel to APP;
step S404: the APP is switched to the digital channel, and the CCL is replied after the digital channel word is displayed;
step S405: the CCL switches to the digital channel after receiving the message, so that the whole system is ensured to work in the digital channel;
Step S406: and entering a normal digital channel receiving process and entering a useful signal channel.
Referring to fig. 6, an embodiment of the present invention is a flowchart for entering a useful signal channel, the process S500 for entering a useful signal channel includes the following steps:
step S501: the terminal is processing business and is in busy state;
step S502: and judging whether the terminal processes the service and is in an idle state, if yes, entering a channel for maintaining, otherwise, returning to the step S502.
As an embodiment, when the terminal determines that the digital mode is to be switched, the DSP locks the digital channel and does not receive the analog signal any more, the DSP continues to notify the upper layer CCL of the message switched to the digital channel, the CCL forwards the message to the upper layer APP to notify the message, the APP switches to the digital channel after receiving the message, displays the interface as a digital channel word and replies to the CCL, and the CCL switches itself to the digital channel after receiving the reply, thereby ensuring that the whole terminal works in the digital channel, and the terminal enters a normal receiving path processing flow at this time; otherwise, the processing method for switching to the analog mode is similar. After entering the normal receiving path, the terminal faces the situation of service termination, and if the terminal is switched from the busy state to the idle state, a channel holding timer is started, so that the terminal enters the channel holding state.
Referring to fig. 7, an embodiment of the invention is a channel-maintaining flow chart, and the channel-maintaining flow S600 includes the following steps:
step S601: the DSP starts a channel holding time timer;
Step S602: judging whether the current operation is in an analog channel, if so, executing a step S603, otherwise, executing a step S612;
step S603: judging whether the channel holding time overflows, if yes, executing step S606, otherwise, entering step S604;
Step S604: judging whether a valid analog signal exists, if yes, executing a step S605, otherwise, returning to the step S602;
Step S605: the DSP stops the channel holding time timer and enters a useful signal channel;
Step S606: judging whether the preferred transmitting mode is a digital channel, if yes, executing step S607, otherwise executing step S611;
step S607: the DSP sends a message for switching to the digital channel to the CCL;
step S608: CCL forwards the message switched to the digital channel to APP;
step S609: the APP is switched to the digital channel, and the CCL is replied after the digital channel word is displayed;
Step S610: after receiving the message, the CCL switches to a digital channel to ensure that the ARM end works in the digital channel;
step S611: the DSP unlocks the analog channel and enters a mixed channel mode;
Step S612: judging whether the channel holding time overflows or not, if yes, executing step S613, otherwise executing step S619;
step S613: judging whether the preferred transmitting mode is an analog channel, if yes, executing step S614, otherwise executing step S618;
Step S614: the DSP sends a message for switching to the analog channel to the CCL;
step S615: CCL forwards the message switched to the analog channel to APP;
Step S616: the APP is switched to the analog channel, and the CCL is replied after the word pattern of the analog channel is displayed;
step S617: after receiving the message, the CCL switches to an analog channel, so that the ARM end is ensured to work in the analog channel;
step S618: the DSP unlocks the digital channel, enters a mixed channel mode, and continuously detects digital and analog signals;
Step S619: judging whether a valid digital signal exists, if yes, executing a step S620, otherwise, returning to the step S602;
step S620: the DSP stops the channel hold time timer and enters the useful signal channel.
As an embodiment, the terminal receives a digital signal or an analog signal, and enters a channel hold mode if it recognizes that the received useful signal is terminated. The channel hold mode is to start a timer that expires while the current channel mode is still operating. If the timer overflows and the current channel mode is not the preferred transmission mode channel, the DSP sends a message switched to the preferred transmission mode channel to the CCL, the CCL forwards the message to the APP, after the APP is switched to the preferred transmission mode channel selection channel, the APP displays a word of the preferred transmission mode channel and sends the message to the CCL, and the CCL also switches to the preferred transmission mode channel after receiving the message, so that the channel of the preferred transmission mode channel is ensured to work when the terminal initiates service after standby.
Referring to fig. 8, a flowchart of a method for transmitting a wireless communication terminal with adaptive switching of a private network module according to an embodiment of the invention is provided, where the method for transmitting a wireless communication terminal with adaptive switching of a private network module further includes a transmitting method S700, and includes the following steps:
Step S701: judging whether the terminal is in a locked channel state, if so, executing a step S703, otherwise, executing a step S702;
step S702: judging whether the channel holding time overflows, if yes, executing step S706, otherwise executing step S703;
step S703: judging whether the current work is in an analog channel, if so, executing a step S704, otherwise, executing a step S705;
step S704: the terminal sends an analog signal;
step S705: the terminal sends out a digital signal;
Step S706: whether the preferred transmission mode is a digital channel is judged, if yes, step S705 is executed, otherwise step S704 is executed.
As one example, there are three cases when a terminal transmits:
1. When the terminal is in a locked channel state (channel determined when the useful signal has been found, useful signal path), the terminal transmits an analog signal if the terminal locked channel is an analog channel, and transmits a digital signal if the terminal locked channel is a digital channel.
2. During the channel hold time, an analog signal is transmitted if the terminal was previously operating on an analog channel and a digital signal is transmitted if the terminal was previously operating on a digital channel.
3. And transmitting according to the configured channel of the preferred transmitting mode by the terminal outside the channel holding time, transmitting an analog signal if the preferred transmitting mode is configured as an analog channel by the terminal, and otherwise transmitting a digital signal.
The invention also discloses an electronic device, comprising: one or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the program comprising instructions for performing the method of private network analog-to-digital adaptive handover of a terminal wireless communication as described above.
The invention also discloses a computer readable storage medium comprising a computer program for use in connection with an electronic device having a memory, the computer program being executable by a processor to perform a method of terminal wireless communication for private network analog-to-digital adaptive handover as described above.
The invention has the following advantages: analog signals and digital signals can be rapidly identified, corresponding working modes can be accurately switched, and the existing analog intercom terminal and digital intercom terminal are well compatible.
The technical scheme of the invention is described in detail through the specific embodiments. In the foregoing embodiments, the descriptions of the embodiments are each focused, and for those portions of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
It should be understood that the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting. Modifications of the technical solutions described in the above embodiments or equivalent substitutions of some technical features thereof may be made by those skilled in the art; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.