CN116431546A - Parameter configuration method, electronic device, storage medium, and program product - Google Patents

Parameter configuration method, electronic device, storage medium, and program product Download PDF

Info

Publication number
CN116431546A
CN116431546A CN202310697656.2A CN202310697656A CN116431546A CN 116431546 A CN116431546 A CN 116431546A CN 202310697656 A CN202310697656 A CN 202310697656A CN 116431546 A CN116431546 A CN 116431546A
Authority
CN
China
Prior art keywords
usb
parameter configuration
parameter
information
communication
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
CN202310697656.2A
Other languages
Chinese (zh)
Other versions
CN116431546B (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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310697656.2A priority Critical patent/CN116431546B/en
Publication of CN116431546A publication Critical patent/CN116431546A/en
Application granted granted Critical
Publication of CN116431546B publication Critical patent/CN116431546B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/008Reliability or availability analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4072Drivers or receivers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Human Computer Interaction (AREA)
  • Telephone Function (AREA)

Abstract

The application provides a parameter configuration method applied to first electronic equipment, which comprises the following steps: determining first parameter configuration information, wherein the first parameter configuration information is information for configuring parameters of a first communication device, the first communication device is a communication device corresponding to a first communication mode, the first parameter configuration information is determined by a first electronic device according to setting operation of a user on the parameter configuration information, or the first parameter configuration information is determined by the first electronic device according to information sent by a second electronic device; and configuring parameters of the first communication device according to the first parameter configuration information. Therefore, the first electronic equipment can dynamically update and configure the parameters of the first communication device, and the compatibility of the first communication device can be effectively improved, so that the use requirements in different scenes are met, and the user experience is effectively improved. The application also discloses an electronic device, a storage medium and a program product.

Description

Parameter configuration method, electronic device, storage medium, and program product
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a parameter configuration method, an electronic device, a storage medium, and a program product.
Background
With the development of science and technology, more and more electronic devices can be connected with each other by communication, such as data transmission. For example, after the mobile phone and the computer establish a communication connection through a universal serial bus (Universal Serial Bus, USB), data transmission such as pictures and files can be realized between the mobile phone and the computer. In the current process of establishing USB communication connection between a mobile phone and a computer and performing USB communication, the problem that the computer cannot identify the mobile phone (namely equipment identification fails), the problem of communication quality such as data transmission failure between the mobile phone and the computer and the like exists, and the user experience is affected.
Of course, in other scenarios where two electronic devices, such as a mobile phone connected to a car set and a mobile phone connected to a usb flash disk, communicate, there are also problems of communication quality, such as failure of device identification and data transmission, which affect user experience.
Disclosure of Invention
The application provides a parameter configuration method, electronic equipment, a storage medium and a program product, which are used for solving the problems that in the scene of communication between two electronic equipment, the equipment cannot be identified (namely equipment identification fails), the data transmission fails and other communication quality problems exist, and the user experience is influenced.
In order to solve the above technical problem, an implementation manner of the present application provides a parameter configuration method, which is applied to a first electronic device, and the method includes: determining first parameter configuration information, wherein the first parameter configuration information is information for configuring parameters of a first communication device, the first communication device is a communication device corresponding to a first communication mode, the first parameter configuration information is determined by a first electronic device according to setting operation of a user on the parameter configuration information, or the first parameter configuration information is determined by the first electronic device according to information sent by a second electronic device, and the second electronic device is electronic equipment which establishes communication connection with the first electronic device; and configuring parameters of the first communication device according to the first parameter configuration information.
In a possible implementation manner of the first aspect, the first electronic device may be, for example, a mobile phone, the first communication manner may be, for example, a USB communication manner, the first communication device may be, for example, a USB communication device, for example, including a USB physical interface transceiver (Physical Interface Transceiver, phy) and a USB device controller (USB Device Controller, UDC), parameters of the first communication device may be, for example, USB eye parameter, parameter configuration information may be, for example, USB eye parameter configuration information, which may be, for example, a USB eye parameter configuration policy, and the USB eye parameter configuration policy may also be referred to as a USB eye parameter update policy. Of course, the first electronic device may be another electronic device such as a computer, the first communication mode may be another communication mode other than the USB communication mode, and the corresponding USB eye parameter configuration information may be other parameter configuration information, which may be selected and set as required.
In addition, configuring the parameters of the first communication device may refer to updating the parameters of the first communication device (may also be referred to as configuration updating), that is, setting the parameters of the first communication device to the first parameters, or may refer to updating and enabling the parameters of the first communication device, that is, setting the parameters of the first communication device to the first parameters corresponding to the USB eye pattern parameter configuration policy, and enabling the first parameters to validate the first parameters, which may be selected and set as needed.
In one possible implementation of the first aspect, the mobile phone may store a plurality of USB eye parameter configuration policies in the mobile phone in advance, and the mobile phone may display identification information corresponding to the plurality of USB eye parameter configuration policies according to a user operation, so as to facilitate user selection. The identification information corresponding to the USB eye parameter configuration policy may include, for example, a policy name, and may further include applicable scenario information of the policy, an influence of the policy on USB communication, and other influence information. Of course, the identification information may also include other information, which may be selected and set as desired. And the mobile phone determines the corresponding USB eye pattern parameter configuration strategy according to the selection operation (as an example of the setting operation) of the identification information corresponding to the USB eye pattern parameter configuration strategy by the user, and configures the USB eye pattern parameters of the USB communication device according to the USB eye pattern parameter configuration strategy so as to dynamically update and enable the USB eye pattern parameters of the USB communication device. Or, the mobile phone can also display a USB eye parameter configuration strategy input box for the user to input a corresponding USB eye parameter configuration strategy. And, the mobile phone configures the USB eye pattern parameters of the USB communication device according to the USB eye pattern parameter configuration strategy input by the user in the USB eye pattern parameter configuration strategy input box (as another example of the setting operation), so as to realize the dynamic update and enabling of the USB eye pattern parameters of the USB communication device.
In addition, the mobile phone may also receive a USB eye parameter configuration policy sent by an electronic device (as an example of the second electronic device) such as a computer or a cloud server, and configure the USB eye parameter of the USB communication device according to the USB eye parameter configuration policy, so as to dynamically update and enable the USB eye parameter of the USB communication device.
Therefore, the mobile phone can dynamically update and enable the USB eye pattern parameters of the mobile phone according to the USB eye pattern parameter configuration strategy selected or input by the user or the USB eye pattern parameter configuration strategy sent by other electronic equipment, namely according to the setting strategy of the user on the USB eye pattern parameter configuration strategy or the information such as the USB eye pattern parameter configuration strategy sent by other electronic equipment, so that the quality of the USB eye pattern can be improved, the USB compatibility of the mobile phone is further improved, the use requirements under different scenes are met, the USB transmission reliability is improved, the USB communication performance is improved, and the user experience is effectively improved.
In addition, the mobile phone displays the identification information such as the strategy name of the USB eye pattern parameter configuration strategy, the applicable scene of the strategy, the influence of the strategy on USB communication and the like, so that a user can conveniently check and know the related information of the strategy, the user can conveniently and accurately select the strategy, and the user experience is effectively improved.
In a possible implementation of the first aspect, determining the first parameter configuration information includes: displaying a first interface, wherein the first interface comprises first parameter identification information, and the first parameter identification information corresponds to first parameter configuration information; receiving a first operation of a user on the first parameter identification information, wherein the first operation is an operation of selecting the first parameter identification information; in response to the first operation, first parameter configuration information is determined.
In this implementation manner, the first interface may be, for example, a setting interface of a mobile phone, a developer option interface, or the like, which may be set as required. The parameter identification information may be, for example, policy names of policy 1, policy 2, and the like. Of course, the parameter identification information may also include other information such as pictures, text, etc., and information including the applicable scenario of the foregoing policy, the influence of the policy on USB communication, etc. The first operation may be, for example, a click operation of a policy name or a selection box corresponding to the policy name by a user (as an example of a selection operation). Of course, the first operation may be other gesture operations, or other operations such as voice.
As described above, the mobile phone may store a plurality of USB eye parameter configuration policies in advance in the mobile phone, and the mobile phone may display identification information (e.g., a policy name) corresponding to one or more USB eye parameter configuration policies according to user operation, so that user selection is facilitated, and user experience is effectively improved. And the mobile phone determines the corresponding USB eye pattern parameter configuration strategy according to the selection operation of the user on the identification information corresponding to the USB eye pattern parameter configuration strategy, and configures the USB eye pattern parameters of the USB communication device according to the USB eye pattern parameter configuration strategy so as to realize the dynamic update and enabling of the USB eye pattern parameters of the USB communication device. Therefore, the mobile phone can dynamically update and enable the USB eye pattern parameters of the USB communication device according to user operation, so that the configured USB eye pattern parameters can meet the use requirements of users more, USB compatibility of the mobile phone is further improved, the use requirements under different scenes are met, USB transmission reliability is improved, USB communication performance is improved, and user experience is effectively improved.
In a possible implementation of the first aspect, the first parameter identification information is determined by the first electronic device according to at least one of the following information: the first electronic equipment corresponds to communication scene information of a first communication mode; historical setting information of the parameter configuration information by the user.
That is, the mobile phone displays the identification information corresponding to the one or more USB eye parameter configuration policies, which may be that the mobile phone selects the one or more USB eye parameter configuration policies from the prestored multiple USB eye parameter configuration policies according to the current communication scene or the historical communication scene of the mobile phone or the applicable communication scene information, and displays the corresponding identification information. Namely, the USB eye pattern parameter configuration strategy selected by the mobile phone can be suitable for the application scene of the mobile phone. The communication scene information includes device type information in the communication scene in which the communication scene is located, and corresponding communication role information, the communication role referring to whether to be a master device or a slave device.
For example, when the mobile phone is currently or frequently applied to a scenario where the mobile phone is connected to the computer through a USB, the mobile phone selects one or more USB eye parameter configuration policies related to, for example, the mobile phone and the computer through a USB communication connection from among a plurality of pre-stored USB eye parameter configuration policies, and displays corresponding identification information, and does not select the USB eye parameter configuration policies related to devices such as the mobile phone and the USB disk through the USB communication connection.
In addition, in a communication scenario applicable to the mobile phone, for example, the mobile phone may support connection with the computer through a USB and not support connection with the USB disk, so that the mobile phone only displays identification information of a USB eye pattern parameter configuration policy related to connection between the mobile phone and the computer through the USB and does not display identification information of the USB eye pattern parameter configuration policy related to connection between the mobile phone and the USB disk through the USB.
And the mobile phone can also select a USB eye pattern parameter configuration strategy according to the communication role of the mobile phone in the communication scene. For example, if the mobile phone is currently or frequently used as the master device, the mobile phone selects a USB eye parameter configuration policy corresponding to the master device; if the mobile phone is currently or frequently used as the slave device, the mobile phone selects a USB eye pattern parameter configuration strategy corresponding to the slave device.
The mobile phone can also select one or more USB eye pattern parameter configuration strategies from a plurality of prestored USB eye pattern parameter configuration strategies according to the historical setting information of the user on the USB eye pattern parameter configuration strategies, and display corresponding identification information. For example, if the user frequently selects a USB eye parameter configuration policy associated with a connection between the mobile phone and the computer through the USB, the mobile phone selects one or more USB eye parameter configuration policies from a plurality of pre-stored USB eye parameter configuration policies, for example, the USB eye parameter configuration policies associated with the connection between the mobile phone and the computer through the USB communication, and displays corresponding identification information, and does not select the USB eye parameter configuration policies associated with the connection between the mobile phone and the USB device through the USB communication.
Therefore, the mobile phone can display the USB eye pattern parameter configuration strategy which is more in line with the communication scene of the mobile phone or the use habit of the user so as to facilitate the selection of the user, effectively promote the user experience, and can obtain the USB eye pattern parameter configuration strategy which is more in line with the communication scene of the mobile phone or the use habit of the user to carry out the USB eye pattern parameter configuration so as to realize the dynamic update and the enabling of the USB eye pattern parameters of the USB communication device. Therefore, the mobile phone can dynamically update and enable the USB eye pattern parameters of the USB communication device according to user operation, so that the configured USB eye pattern parameters can meet the use requirements of users more, USB compatibility of the mobile phone is further improved, the use requirements under different scenes are met, USB transmission reliability is improved, USB communication performance is improved, and user experience is effectively improved.
Of course, the mobile phone can also select the USB eye parameter configuration policy according to the communication scene information and the history setting information of the user at the same time, or select the USB eye parameter configuration policy in other manners, which can be selected and set according to the needs.
In a possible implementation of the first aspect, determining the first parameter configuration information includes: displaying a second interface, wherein the second interface comprises a parameter configuration information input control; receiving a second operation of inputting parameter configuration information by a user, wherein the second operation is an operation of inputting the parameter configuration information; in response to the second operation, first parameter configuration information is determined.
The second interface is, for example, an interface including a USB eye parameter configuration information input box (as an example of a parameter configuration information input control) for a user to input a new USB eye parameter configuration policy in the USB eye parameter configuration information input box by means of a keyboard or the like. And the mobile phone configures the USB eye pattern parameters of the USB communication device according to the USB eye pattern parameter configuration strategy input by the user in the USB eye pattern parameter configuration strategy input box so as to realize the dynamic update and enabling of the USB eye pattern parameters of the USB communication device.
Therefore, a user can directly input a control through an input box and the like according to the needs, a new USB eye pattern parameter configuration strategy is input into the mobile phone, and the mobile phone can dynamically update and enable the USB eye pattern parameters of the mobile phone according to the new USB eye pattern parameter configuration strategy input by the user, so that the quality of a USB eye pattern can be improved, the USB compatibility of the mobile phone is further improved, the use requirements under different scenes are met, the USB transmission reliability is improved, the USB communication performance is improved, and the user experience is effectively improved.
In a possible implementation of the first aspect, determining the first parameter configuration information includes: receiving first information sent by second electronic equipment; responding to the first information, and sending parameter identification information of parameter configuration information preset in the first electronic equipment to the second electronic equipment so that the second electronic equipment displays a third interface, wherein the parameter configuration information comprises first parameter configuration information, the parameter identification information comprises first parameter identification information, the first parameter identification information corresponds to the first parameter configuration information, and the third interface comprises first parameter identification information; receiving second information sent by second electronic equipment, wherein the second information comprises first parameter identification information, the first parameter identification information is determined by the second electronic equipment in response to third operation of a user on a third interface, and the third operation is operation of selecting the first parameter identification information; the first parameter configuration information is determined in response to the second information.
In a possible implementation of the first aspect, the first information and the second information are android debug bridge (Android Debug Bridge, adb) commands (command).
In this implementation, the second electronic device may be, for example, a computer. Thus, by embedding a plurality of USB eye parameter configuration policies in the mobile phone, and providing the USB eye parameter configuration policy selection or setting adb command interface (as an example of the third interface) to the user through the computer, the computer may send the adb command to the mobile phone based on the user selection or setting operation (as an example of the third operation) of the USB eye parameter configuration policy, and notify the mobile phone of the USB eye parameter configuration policy selected or set by the user, so that the mobile phone updates and enables the USB eye parameter according to the corresponding USB eye parameter configuration policy. The USB eye pattern parameter configuration strategy can be conveniently and accurately selected or set by a user through the adb command interface provided by the computer, and user experience is effectively improved. And, can make the mobile phone dynamically update and enable the correspondent USB eye pattern parameter according to the USB eye pattern parameter configuration tactics that the user chooses. Therefore, the quality of a USB eye pattern can be improved, the USB compatibility of the mobile phone is further improved, the use requirements under different scenes are met, the USB transmission reliability is improved, the USB communication performance is improved, and the user experience is effectively improved.
In a possible implementation of the first aspect, determining the first parameter configuration information includes: receiving third information sent by the second electronic equipment, wherein the third information comprises first parameter configuration information, the first parameter configuration information is determined by the second electronic equipment in response to fourth operation of a fourth interface displayed by the second electronic equipment by a user, and the fourth operation is operation of inputting the parameter configuration information; the first parameter configuration information is determined in response to the third information. The third information may be, for example, an adb command.
That is, the computer may also display an operation interface (as an example of a fourth interface) corresponding to the adb command for the user to input (as an example of a fourth operation) the corresponding USB eye parameter configuration policy by means of the adb command or the like. And the computer can send the USB eye pattern parameter configuration information input by the user to the mobile phone in an adb command mode. The mobile phone configures the USB eye pattern parameters of the USB communication device according to the USB eye pattern parameter configuration strategy sent by the computer so as to realize the dynamic update and the enabling of the USB eye pattern parameters of the USB communication device.
Therefore, a user can directly input a new USB eye pattern parameter configuration strategy into the computer in an adb command mode and the like according to the requirement. And the mobile phone can dynamically update and enable the USB eye pattern parameters of the mobile phone according to the new USB eye pattern parameter configuration strategy newly input by the user, so that the quality of the USB eye pattern can be improved, the USB compatibility of the mobile phone is further improved, the use requirements under different scenes are met, the USB transmission reliability is improved, the USB communication performance is improved, and the user experience is effectively improved.
In a possible implementation of the first aspect, the first information, the second information, and the third information may also be other information such as other commands or instructions that may implement the same or similar functions as the adb command (e.g., implement the functions of policy query and policy sending, notification, etc. described above), which may be selected and set as needed.
In one possible implementation manner of the first aspect, the determining, by the second electronic device, first parameter configuration information for the cloud server includes: and receiving the parameter configuration information sent by the cloud server as first parameter configuration information.
Therefore, the cloud server can push a new USB eye pattern parameter configuration strategy to the mobile phone, and the mobile phone can update the USB eye pattern parameters according to the USB eye pattern parameter configuration strategy, dynamically update and enable the corresponding USB eye pattern parameters. Therefore, the quality of a USB eye pattern can be improved, the USB compatibility of the mobile phone is further improved, the use requirements under different scenes are met, the USB transmission reliability is improved, the USB communication performance is improved, and the user experience is effectively improved.
In a possible implementation manner of the first aspect, the parameter configuration information sent by the cloud server is determined by the cloud server according to at least one of the following information: device information of the first electronic device; the device information of the third electronic device, the third electronic device is used for establishing communication connection with the first electronic device through a first communication mode; the first electronic equipment corresponds to communication scene information of a first communication mode; historical setting information of the parameter configuration information sent by the first electronic equipment by a user.
The device information may be, for example, a device type of the device. For example, the cloud server determines that the mobile phone can be connected with the equipment such as the computer and the car machine according to the equipment type of the mobile phone, and cannot be connected with the USB flash disk, so that the cloud server pushes the USB eye pattern parameter configuration strategy related to the mobile phone, the equipment such as the computer and the car machine through USB communication connection to the mobile phone, and does not push the USB eye pattern parameter configuration strategy related to the equipment such as the mobile phone, the USB flash disk and the like through USB communication connection to the mobile phone.
Or the cloud server determines that the mobile phone is often connected with the computer according to the equipment type of the mobile phone for USB connection, and only pushes the USB eye pattern parameter configuration strategy related to the mobile phone and the computer through USB communication connection to the mobile phone, and does not push the USB eye pattern parameter configuration strategy related to the mobile phone and other equipment of the U disk through USB communication connection to the mobile phone. Of course, the device information may be other information, which may be selected and set as desired.
And the cloud server can determine a USB eye pattern parameter configuration strategy according to the master-slave relation between the mobile phone and the electronic equipment connected with the mobile phone. For example, if the cloud server determines that the mobile phone is currently or frequently used as the master device, pushing a USB eye parameter configuration policy related to the master device to the mobile phone; if the cloud server determines that the mobile phone is current or frequently used as the main device, the USB eye pattern parameter configuration strategy related to the main device is pushed to the mobile phone.
In addition, for example, if the cloud server determines that the user frequently selects the USB eye parameter configuration policy related to the connection between the mobile phone and the computer through the USB, the cloud server only pushes the USB eye parameter configuration policy related to the connection between the mobile phone and the computer through the USB communication, and does not push the USB eye parameter configuration policy related to the connection between the mobile phone and other devices such as the USB disk through the USB communication.
Therefore, the cloud server can push the USB eye pattern parameter configuration strategy which is more in line with the application scene of the mobile phone or the use requirement of a user to the mobile phone, and the mobile phone can dynamically update and enable the corresponding USB eye pattern parameters according to the USB eye pattern parameter configuration strategy. Therefore, the quality of a USB eye pattern can be improved, the USB compatibility of the mobile phone is further improved, the use requirements under different scenes are met, the USB transmission reliability is improved, the USB communication performance is improved, and the user experience is effectively improved.
Of course, the cloud server can push the updated USB eye pattern parameter configuration strategy of the cloud server to the mobile phone, and the configuration strategy can be selected and set according to the requirement.
In a possible implementation manner of the first aspect, the first electronic device is a master device, and the third electronic device is a slave device.
In a possible implementation of the first aspect, determining the first parameter configuration information includes: acquiring first state information of first electronic equipment; under the condition that the first electronic equipment is in the first state according to the first state information, acquiring parameter configuration information from a first configuration file to obtain the first parameter configuration information, wherein the first configuration file is a configuration file corresponding to the first communication device.
In a possible implementation of the first aspect, the first state may be, for example, a power-on start-up state, or a state such as a fault.
Therefore, a plurality of USB eye pattern parameter configuration strategies can be built in the mobile phone, and the mobile phone can automatically determine the corresponding USB eye pattern parameter configuration strategy according to the plurality of USB eye pattern parameter configuration strategies stored in advance locally under the condition that the mobile phone is in a first state, such as starting up or failure, and the like, so as to update and enable the USB eye pattern parameters. Therefore, the quality of a USB eye pattern can be improved, the USB compatibility of the mobile phone is further improved, the use requirements under different scenes are met, the USB transmission reliability is improved, the USB communication performance is improved, and the user experience is effectively improved.
In a possible implementation of the first aspect, the parameter configuration information is a parameter configuration policy. The parameter configuration policy refers to, for example, a policy for configuring or updating a USB eye parameter, such as turning up a certain parameter, turning down a certain parameter, or turning up a certain parameter by x, turning down a certain parameter by y, or setting a certain parameter to an on/off state, etc. The parameter configuration policy may also be specific parameter values, for example, the value of the a parameter is adjusted to X, the value of the B parameter is adjusted to Y, and so on. Or the parameter configuration strategy can also be, for example, adjusting related parameters or other information of the device, and the parameter configuration strategy can be selected and set according to the needs.
In a possible implementation manner of the first aspect, configuring parameters of the first communication device according to the first parameter configuration information includes: and sending the first parameter configuration information to the first parameter configuration driver, and sending first notification information to the first communication device driver, so that the first communication device driver responds to the first notification information, configures parameters of the first communication device according to the first parameter configuration information in the first parameter configuration driver, and the first communication device driver is a driver corresponding to the first communication device.
In one possible implementation of the first aspect described above, the first communication device driver includes a first communication controller driver and a first communication transceiver driver, the first communication device includes a first communication controller and a first communication transceiver, and sending the first notification information to the first communication device driver includes: driving and transmitting first notification information to a first communication controller; so that the first communication device driver responds to the first notification information and configures parameters of the first communication device according to the first parameter configuration information in the first parameter configuration driver, comprising: causing the first communication controller to drive to send second notification information to the first communication controller to cause the first communication controller to set parameters of the first communication controller in response to the second notification information; and causing the first communication controller driver to send third notification information to the first communication transceiver driver to cause the first communication transceiver driver to obtain first parameter configuration information from the first parameter configuration driver in response to the third notification information, and to configure parameters of the first communication transceiver driver according to the first parameter configuration information.
In a possible implementation manner of the first aspect, the first communication manner is a USB communication manner, the first parameter configuration information is a USB eye pattern parameter configuration information, the first parameter configuration driver is a USB parameter configuration driver, the first communication controller driver is a USB controller driver, the first communication controller is a USB controller, the first communication transceiver driver is a USB transceiver, and the first communication transceiver is a USB transceiver.
Therefore, the mobile phone can complete dynamic updating and enabling of USB eye pattern parameters such as the USB transceiver through USB parameter configuration driving, USB controller driving, USB transceiver driving, USB controller and USB transceiver in the mobile phone, so that the quality of a USB eye pattern can be improved, USB compatibility of the mobile phone is further improved, use requirements under different scenes are met, USB transmission reliability is improved, USB communication performance is improved, and user experience is effectively improved.
In a possible implementation manner of the first aspect, configuring parameters of the first communication device according to the first parameter configuration information includes: according to the first parameter configuration information, setting the parameter of the first communication device as the first parameter, and enabling the first parameter to enable the first parameter.
In a second aspect, an implementation manner of the present application provides an electronic device, including: a memory for storing a computer program, the computer program comprising program instructions; a processor configured to execute program instructions to cause an electronic device to perform a parameter configuration method as provided in the first aspect and/or any one of the possible implementation manners of the first aspect.
In a third aspect, an implementation of the present application provides a computer readable storage medium storing a computer program comprising program instructions that are executed by an electronic device to cause the electronic device to perform a parameter configuration method as provided in the first aspect and/or any one of the possible implementations of the first aspect.
In a fourth aspect, an implementation of the present application provides a computer program product comprising a computer program to be run by an electronic device to cause the electronic device to perform a parameter configuration method as provided by the first aspect and/or any one of the possible implementations of the first aspect.
The relevant advantageous effects of the second aspect to the fourth aspect may be referred to the relevant description of the first aspect, and are not described herein.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the following description will briefly introduce the drawings used in the description of the implementation.
FIG. 1 is a system architecture diagram illustrating a communication system provided herein, according to some implementations of the present application;
FIG. 2A is a schematic diagram illustrating a display interface of a mobile phone provided herein, according to some implementations of the present application;
FIG. 2B is a schematic diagram illustrating a display interface of a computer provided herein, according to some implementations of the present application;
FIG. 3A is a schematic diagram illustrating a USB eye diagram provided herein, according to some implementations of the present application;
FIG. 3B is another schematic diagram illustrating a USB eye pattern provided herein, according to some implementations of the present application;
FIG. 3C is another schematic diagram illustrating a USB eye pattern provided herein, according to some implementations of the present application;
FIG. 4A is a schematic diagram illustrating another display interface of a mobile phone provided herein, according to some implementations of the present application;
FIG. 4B is a schematic diagram illustrating another display interface of a mobile phone provided herein, according to some implementations of the present application;
FIG. 4C is a schematic diagram illustrating another display interface of a mobile phone provided herein, according to some implementations of the present application;
FIG. 5 is a schematic diagram illustrating another display interface of a computer provided herein, according to some implementations of the present application;
FIG. 6 is a schematic diagram illustrating a hardware architecture of a mobile phone provided herein, according to some implementations of the present application;
FIG. 7 is a schematic diagram illustrating a software architecture of a mobile phone provided herein, according to some implementations of the present application;
FIG. 8 is a process schematic diagram illustrating a parameter configuration method provided herein, according to some implementations of the present application;
FIG. 9 is another process schematic diagram illustrating the parameter configuration method provided herein, according to some implementations of the present application;
FIG. 10 is a diagram illustrating some of the USB eye pattern parameters provided herein, according to some implementations of the present application;
FIG. 11 is another process schematic diagram illustrating the parameter configuration method provided herein, according to some implementations of the present application;
FIG. 12 is another process schematic illustrating the parameter configuration method provided herein, according to some implementations of the present application;
FIG. 13 is another process schematic diagram illustrating a parameter configuration method provided herein, according to some implementations of the present application;
FIG. 14 is another process schematic diagram illustrating a parameter configuration method provided herein, according to some implementations of the present application;
FIG. 15 is another process schematic diagram illustrating the parameter configuration method provided herein, according to some implementations of the present application;
FIG. 16 is another process schematic illustrating the parameter configuration method provided herein, according to some implementations of the present application;
FIG. 17 is another process schematic diagram illustrating a parameter configuration method provided herein, according to some implementations of the present application;
FIG. 18 is a schematic diagram illustrating the structure of an electronic device, according to some implementations of the present application;
fig. 19 is a schematic diagram illustrating the architecture of a system on a chip (SoC) according to some implementations of the present application.
Detailed Description
The technical solutions of the present application will be described in further detail below with reference to the accompanying drawings.
The implementation mode of the application takes USB eye pattern parameters in a USB communication connection scene as an example, and describes a parameter configuration method provided by the application.
As shown in fig. 1, a schematic system architecture of a communication system according to an implementation of the present application is provided. The communication system may include a host (or host, also referred to as a master) and a slave (or device, also referred to as a slave), which may establish a USB communication connection by a USB method (as an example of the first communication method) based on respective USB interfaces, and perform communication such as signal transmission or data transmission based on the established USB communication connection. The master may be understood as a device that performs operations such as reading and writing on other devices, and the slave may be understood as a device that is performed by the master. Of course, the master and the slave may be other devices, which may be set as needed.
For example, as shown in fig. 1, in a USB communication connection scenario, the host may be, for example, a personal computer (Personal Computer, PC) (e.g., a computer), or may be a vehicle, and the slave may be, for example, a mobile Phone (Phone). In another USB communication connection scenario, the host may be, for example, a mobile phone, and The slave may be, for example, a USB disk such as an OTG (On-The-Go) USB disk or a hard disk, or may be an external device (i.e., a peripheral) such as a mouse, a keyboard, or a digital earphone. Of course, the master and slave may be other electronic devices, which may be selected and set as desired.
In the USB communication connection scenario, the host and the slave may be referred to as USB terminals, and after USB communication connection is established between the USB terminals in a USB manner, transmission data is basic communication interactive content in the USB communication connection scenario. Taking a mobile phone as an example, the method comprises the steps of transmitting pictures or files, wire screen throwing, OTG U disk, mobile phone backup or upgrading, and data transmission in the scenes of car-machine connection and the like. For example, in a scenario where a mobile phone is connected to a computer via a USB, contents such as pictures and/or files may be transmitted, and in a scenario where a mobile phone is connected to a USB flash disk and a car machine via a USB, contents such as files may be transmitted.
Currently, in the USB communication connection scenario, because the USB terminal has poor compatibility, there are problems that the host cannot identify the slave (i.e. the device fails to identify), the data transmission rate between the host and the slave is slow or the data transmission fails, and the compatibility between the host and the slave is poor, which affects the user experience.
For example, as shown in fig. 2A, after the mobile phone establishes a USB communication connection with the USB disk, if the mobile phone does not recognize the USB disk, the mobile phone may display a reminder message such as "no target path found". Alternatively, as shown in fig. 2B, after the computer establishes a USB communication connection with the mobile phone, for example, through a USB method, if the computer does not recognize the mobile phone, the computer may display a reminder message such as "the device connected to the system is not functioning".
Based on this, the present application provides a parameter configuration method, which can implement, for example, dynamic update and enabling of a USB eye parameter (as an example of parameters of the first communication device) of a mobile phone (as an example of the first electronic device). The method includes that the mobile phone determines a USB eye parameter update (updating may also be referred to as configuration) policy (as an example of parameter configuration information), where the USB eye parameter update policy is determined by the mobile phone according to a setting operation, such as a selection operation of the USB eye parameter update policy included in a USB eye parameter update policy setting interface displayed by the mobile phone by a user, or the USB eye parameter update policy is a USB eye parameter update policy sent by, for example, a computer, a cloud server, or the like. Then, the mobile phone configures the USB eye pattern parameters according to the USB eye pattern parameter updating strategy to realize the dynamic updating of the USB eye pattern parameters or realize the dynamic updating and enabling of the USB eye pattern parameters.
The USB eye parameter update policy refers to, for example, a policy for configuring a USB eye parameter, such as turning up a certain parameter, turning down a certain parameter, or turning up a certain parameter by x, turning down a certain parameter by y, or setting a certain parameter to an on or off state, etc. The parameter configuration policy may also be specific parameter values, for example, the value of the a parameter is adjusted to X, the value of the B parameter is adjusted to Y, and so on. Or the parameter configuration strategy can also be, for example, to adjust related parameters or other information of devices, and the USB eye pattern parameter updating strategy can be selected and set according to the needs.
Therefore, the mobile phone can dynamically update, configure and enable the USB eye pattern parameters of the mobile phone according to the USB eye pattern parameter updating strategy, so that the quality of the USB eye pattern can be improved, the USB compatibility of the mobile phone is further improved, the use requirements under different scenes are met, the USB transmission reliability is improved, the USB communication performance is improved, and the user experience is effectively improved.
The reason why the USB communication connection compatibility can be improved by the USB eye pattern parameter is described below.
According to analysis, in a USB communication connection scene, under the condition that the electronic equipment is determined, namely, under the condition that the hardware equipment is determined, the software layer understands that USB eye pattern parameters of the electronic equipment can directly influence the compatibility of USB communication connection, further influence signal transmission performance (namely, signal transmission quality), influence the identification, enumeration, connection stability and the like of the USB equipment, and the direct phenomena are that the electronic equipment has the phenomena of unstable USB ports, failure in USB enumeration (namely, equipment cannot be identified), unstable equipment connection and the like. In addition, the signal transmission performance of the USB communication connection is poor, data transmission among devices, abnormal reporting of the USB and other processes are affected, and user experience is further affected.
That is, the signal transmission performance of the USB communication connection may be directly reflected to the user side, for example, if the signal transmission performance is poor, a long time is required between the master and the slave to complete the data transmission, such as the image, the file, etc., so that the user needs to wait for a long time to affect the user experience. In addition, for a host including multiple USB ports, the hardware circuit of the connected slaves is inconsistent, which also causes a difference in the USB eye parameter setting of the host, that is, the requirements of the host for the USB eye parameters for different slaves are different.
The USB eye diagram corresponding to the USB eye diagram parameter is also an index for measuring the transmission performance of USB signals, and software can finely adjust the USB eye diagram to a certain extent through a configuration register. As shown in fig. 3A, the USB eye pattern includes information of eye height, rising edge, eye angle, template, etc. The influence of inter-code crosstalk and noise can be observed from the USB eye diagram, the integral characteristic of the digital signal is reflected, and the system quality degree can be estimated. The size of the opening of the "eyes" of the USB eye diagram reflects the intensity of the inter-code crosstalk, and the larger the opening of the "eyes" is, the more positive the USB eye diagram is, the smaller the inter-code crosstalk is, and otherwise, the larger the inter-code crosstalk is.
Illustratively, as shown in fig. 3A, the middle region 10, and the upper and lower lines 20 in the USB eye diagram are standard templates, and the line 30 is the test result. Where the eye height (DC level) (line 1), i.e. the magnitude of the level, is slightly lower as can be seen from fig. 3A, the eye height should be adjusted higher with a smaller opening of the glasses. The rising edge (line 2), which characterizes the Rise (Rise)/fall (fall) time, directly determines whether the eyes are open, and it can be seen from fig. 3A that the rising slope of the rising edge is compatible with the internal template. The canthus (line 3), i.e., the crossover point (cross point). Should be close to the zero point, it can be seen from fig. 3A that the corner of the eye is above the zero point and should be moved downwards. In addition, the USB eye may further include information such as duty cycle, jitter, threshold level, etc., which will not be described in detail herein.
Therefore, the analysis of the USB eye diagram is the core of the analysis of the signal integrity of the high-speed interconnection system, and the USB eye diagram reflects the overall characteristics of all digital signals transmitted on the communication link corresponding to the USB communication connection. The method has more accurate and proper eye pattern parameters, and has great optimization effect on USB communication connection under the condition of fixed hardware equipment. Thus, as shown in fig. 3B and 3C, by adjusting the USB eye parameters, the USB eye can be adjusted. That is, USB eye pattern parameters are adjusted, USB compatibility can be improved, transmission signal performance is optimized, and user experience is further optimized.
Taking a mobile phone as an example, the device side can improve the compatibility of the mobile phone to different devices by updating policy input through different USB eye pattern parameters. The manner in which the handset determines the USB eye parameter update policy is described below.
In one implementation manner of the present application, a plurality of USB eye parameter update policies may be stored in the mobile phone, and the mobile phone may determine the corresponding USB eye parameter update policy according to a selection or a setting operation of the user on the USB eye parameter update policy through, for example, a setting interface of the mobile phone.
Illustratively, as shown in FIG. 4A, the cell phone displays a system and updates a setup interface that includes a "developer options" control. If the mobile phone receives the clicking operation of the user on the system and update setting interface on the "developer option" control, the mobile phone responds to the clicking operation, and displays a developer option setting interface as shown in fig. 4B, wherein the interface comprises a "select USB eye configuration" control. If the mobile phone receives a clicking operation of the "select USB eye configuration" control on the developer option setting interface by the user, the mobile phone responds to the clicking operation, and displays a select USB eye configuration setting interface (as an example of the first interface) shown in fig. 4C, where the interface includes identification information of a USB eye parameter updating policy, such as policy 1, policy 2, policy 3, policy 4, policy 5, and policy 6 (as an example of parameter identification information). If the mobile phone receives a click operation (as an example of the first operation) of the "O" selection box corresponding to, for example, policy 1 (as an example of the first parameter identification information), the mobile phone determines that policy 1 updates the policy (as an example of the first parameter configuration information) for the USB eye parameter selected by the user.
Therefore, the USB eye pattern parameter configuration can be performed based on the USB eye pattern parameter updating strategy corresponding to the selection or setting operation of the user by arranging a plurality of USB eye pattern parameter updating strategies in the mobile phone and providing a USB eye pattern parameter updating strategy selection or setting interface for the user through the mobile phone. That is, the user can use the setting interface to dynamically update the mobile phone and enable the corresponding USB eye pattern parameters.
In addition, as described above, the selection USB eye configuration setting interface may further include other information such as a scenario where the policy is applicable, an effect of the policy on USB communication, etc., so that the user views and knows the policy related information, so that the user can more conveniently and accurately select the policy.
In another implementation of the present application, as previously described, the mobile phone may display an interface (as an example of a second interface) including a USB eye parameter update policy input box (as an example of a parameter configuration information input control) for a user to input a new USB eye parameter configuration policy in the USB eye parameter update policy input box by means of a keyboard or the like. And the mobile phone configures the USB eye pattern parameters of the USB communication device according to the USB eye pattern parameter configuration strategy input by the user in the USB eye pattern parameter configuration strategy input box so as to realize the dynamic update and enabling of the USB eye pattern parameters of the USB communication device.
Therefore, a user can directly input a control through an input box and the like according to the needs, a new USB eye pattern parameter configuration strategy is input into the mobile phone, and the mobile phone can dynamically update and enable the USB eye pattern parameters of the mobile phone according to the new USB eye pattern parameter configuration strategy input by the user, so that the quality of a USB eye pattern can be improved, the USB compatibility of the mobile phone is further improved, the use requirements under different scenes are met, the USB transmission reliability is improved, the USB communication performance is improved, and the user experience is effectively improved.
In other implementations of the present application, the mobile phone may also display a USB eye parameter update policy selection or setting interface of other formats or content, so that the user may set the USB eye parameter update policy by selecting, inputting or modifying, etc., and the interface displayed by the mobile phone may be selected and set as required.
In another implementation manner of the present application, the mobile phone may also establish a communication connection with a cloud server (which may also be referred to as a cloud end, as an example of the second electronic device), where the cloud server may push a USB eye parameter update policy updated by the cloud server side to the mobile phone, or according to device information such as a device type of the mobile phone reported by the mobile phone and/or device information (i.e., USB communication big data information) such as a device type of an electronic device (as an example of the third electronic device) in which the mobile phone establishes a USB communication connection based on a USB manner, where the mobile phone is used as communication scene information such as a host or a slave, determine a corresponding USB eye parameter update policy, and push the corresponding USB eye parameter update policy to the mobile phone. Or according to big data (i.e. history setting information) of operations such as selection, setting and the like of the USB eye pattern parameter updating strategy by a user reported by the mobile phone, determining the USB eye pattern parameter updating strategy of the corresponding type, and pushing the corresponding USB eye pattern parameter updating strategy to the mobile phone. The cloud server can push the USB eye pattern parameter updating strategy to the mobile phone in a directional push mode, a wide push mode and the like. And the mobile phone receives the USB eye pattern parameter updating strategy sent by the cloud server to obtain the USB eye pattern parameter updating strategy.
Further, after the mobile phone receives the USB eye parameter updating policy sent by the cloud server, a corresponding USB eye parameter configuration setting interface may be provided by, for example, a cloud service application, so that a user may select the USB eye parameter updating policy, or may directly default to perform USB eye parameter configuration according to the USB eye parameter updating policy sent by the cloud server, where the USB eye parameter configuration may be selected and set as required.
In addition, in the implementation manner, the mobile phone can be used as a host, and the electronic device connected with the mobile phone through the USB can be used as a slave. Of course, the mobile phone can also be used as a slave, and the electronic device connected with the mobile phone through the USB is used as a host.
In other implementations of the present application, the mobile phone may also provide a corresponding selection USB eye configuration setting interface through an application, such as a setting application, a mobile phone manager application, etc., so that a user selects or queries a USB eye parameter update policy through a visual interface, which may be selected and set as needed. And the display mode and the display content of the interface for selecting the corresponding USB eye pattern parameter updating strategy by the user can be selected and set according to the requirement.
In another implementation manner of the present application, the mobile phone may determine the USB eye parameter update policy according to a selection or setting operation of the USB eye parameter update policy by a user through, for example, an adb command.
As shown in fig. 5, the mobile phone and the computer (as an example of the second electronic device) establish a wireless communication connection, for example, through wifi or the like, or establish a wired communication connection through USB, the user may view, through the computer, a USB eye parameter update policy configured in the mobile phone in an adb command manner, and the computer may display identification information corresponding to the USB eye parameter update policy configured in the mobile phone. For example, the computer may query a USB eye parameter update policy, such as USB Phy, via an adb command (as an example of the first information). Then as shown in fig. 5, the USB eye parameter update policy corresponding to USB Phy configured in the computer display handset includes policy1 (as an example of identification information of policy 1), policy2 (as an example of identification information of policy 2), policy3 (as an example of identification information of policy 3), policy4 (as an example of identification information of policy 4), policy5 (as an example of identification information of policy 5), and policy6 (as an example of identification information of policy 6). The interface displayed by the computer is an example of the third interface.
And the user can select the USB eye parameter updating policy by the computer based on the manner of inputting the adb command (as an example of the third operation), the computer sends the identification information of the USB eye parameter updating policy selected by the user to the mobile phone by the manner of the adb command (as an example of the second information), and the mobile phone can determine the corresponding USB eye parameter updating policy according to the identification information of the USB eye parameter updating policy sent by the computer.
Therefore, the USB eye pattern parameter updating configuration can be carried out based on the USB eye pattern parameter updating strategy corresponding to the selection or setting operation of the user by arranging a plurality of USB eye pattern parameter updating strategies in the mobile phone and providing the USB eye pattern parameter updating strategy selection or setting adb command interface for the user through the computer. That is, the user can use the adb command interface provided by the computer to dynamically update the mobile phone and enable the corresponding USB eye pattern parameters.
In addition, the user can also modify the USB eye pattern parameter updating strategy in the mobile phone in an adb command mode, and carry out corresponding USB eye pattern parameter updating configuration.
In other implementations of the present application, the computer may query the USB eye parameter update policy in the mobile phone in other manners, so that the user selects the corresponding USB eye parameter update policy. Or, the mobile phone can also establish communication connection with other electronic devices, so that a user can inquire the USB eye pattern parameter updating strategy in the mobile phone through the other electronic devices, and the USB eye pattern parameter updating strategy can be selected and set according to the needs.
And, as previously described, the computer may also display an operation interface (as an example of a fourth interface) corresponding to the adb command for the user to input (as an example of a fourth operation) the corresponding USB eye parameter configuration policy by means of the adb command or the like. And, the computer can send the USB eye pattern parameter updating strategy (as an example of the third information) input by the user to the mobile phone, and the mobile phone configures the USB eye pattern parameters of the USB communication device according to the USB eye pattern parameter configuration strategy sent by the computer so as to realize the dynamic updating and enabling of the USB eye pattern parameters of the USB communication device.
In other implementations of the present application, a plurality of USB eye parameter update policies may be preset locally, and when the state information (such as a start-up state, a connection state with other devices, and the like, as an example of the first state information) acquired by the mobile phone is, for example, in a case where the mobile phone is started up or fails (as an example of the first state), the mobile phone may acquire, from, for example, a USB corresponding USB eye parameter update policy file (as an example of the first configuration file), a preset USB eye parameter update policy to automatically determine a corresponding USB eye parameter update policy, and perform USB eye parameter update and enabling. Therefore, the quality of a USB eye pattern can be improved, the USB compatibility of the mobile phone is further improved, the use requirements under different scenes are met, the USB transmission reliability is improved, the USB communication performance is improved, and the user experience is effectively improved.
Of course, the mobile phone may determine the USB eye parameter update policy in other manners, which may be selected and set as needed.
Therefore, the mobile phone can dynamically update, configure and enable the USB eye pattern parameters of the mobile phone, so that the quality of the USB eye pattern can be improved, USB compatibility of the mobile phone is further improved, use requirements under different scenes are met, USB transmission reliability is improved, USB communication performance is improved, and user experience is effectively improved.
Further, the above-mentioned user-selected USB eye parameter updating policy, the USB eye parameter updating policy pushed by the cloud server, the USB eye parameter updating policy automatically selected by the mobile phone, etc. may be one or more, and they may be selected and set according to the needs.
The following describes the structure of the mobile phone provided by the implementation manner of the present application.
As shown in fig. 6, fig. 6 shows a schematic structural diagram of a mobile phone.
The handset may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) connector 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It will be appreciated that the structure illustrated in the embodiments of the present application is not limited to a specific configuration of the mobile phone. In other embodiments of the present application, the handset may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components may be provided. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The processor 110 may generate operation control signals according to the instruction operation code and the timing signals to complete instruction fetching and instruction execution control.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processorinterface, MIPI), a general-purpose input/output (GPIO) interface, and a subscriber identity module (subscriber identity module, SIM) interface.
USB interface 130 is a connector that meets the USB standard specification, and may be used to connect a mobile phone to a peripheral device, specifically, a standard USB connector (e.g., type C connector), a Mini USB connector, a Micro USB connector, etc. The USB interface 130 may be used to connect to a charger to charge the phone, or may be used to transfer data between the phone and peripheral devices. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc. In some embodiments, processor 110 may support a universal serial bus (Universal Serial Bus), which may be standard specification for USB b1.X, USB2.0, USB3.X, USB4, etc.
The wireless communication function of the mobile phone can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor and the like.
The software system of the mobile phone will be described below.
The software system of the mobile phone can adopt a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture or a cloud architecture. In the embodiment of the application, taking an Android system with a layered architecture as an example, a software structure of a mobile phone is illustrated.
Fig. 7 is a software structural block diagram of a mobile phone according to an implementation of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is an Application (app) layer, an Application framework (frame) layer, a Hardware abstraction layer (Hardware abstraction layer, HAL) or interface (native) layer, a Kernel (Kernel) layer, a Hardware (Hardware) layer, and the like from top to bottom, which are not limited in this Application.
The application layer may include a series of application packages, such as a USB eye parameter configuration application. The USB eye parameter configuration applications may include, for example, an adb command application, a system application corresponding to a system Android application package (Android application package, apk), and other applications corresponding to other installation packages (other apk). Applications corresponding to the system apk include, for example, a setting application corresponding to a setting apk, an engineering Menu application corresponding to an engineering Menu (Project Menu) apk, a Mobile Manager application corresponding to a Mobile Manager (Mobile Manager) apk, a cloud service application corresponding to a cloud service apk, and the like.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions. Including, for example, system services (System Server), including USB services (USB service) and original equipment manufacturer (Origina EquipmentManufacturer, ome) services, etc.
The hardware abstraction layer includes an adbd service, a USB hardware abstraction layer (USB hal) service, a USB profile service, and the like, and the USB profile may be, for example, an rc file related to USB configuration.
The kernel layer includes a USB UDC driver (as an example of a first communication controller driver), a USB eye parameter update driver (i.e., USB eye diagram parameter update driver) (as an example of a first parameter configuration driver), and a USB Phy driver (i.e., a USB Phy driver) (as an example of a first communication transceiver driver). The USB UDC driver comprises a USB controller device driver (USB controller Component driver), a USB controller gadget driver (USB controller gadget driver), a USB controller hub-host driver (USB controller hub-host driver) and the like. The USB Phy driver includes a plurality of USB Phy drivers such as a USB Phy 1 device driver (USB Phy 1 Component driver), a USB Phy 2 device driver (USB Phy 2 Component driver), a USB Phy N device driver (USB Phy N Component driver), and the like.
The hardware layer includes a USB UDC (as an example of the first communication controller) and a USB Phy (as an example of the first communication transceiver).
The foregoing system service, adbd service, USB hal service, USB profile service, etc. may be referred to as a USB eye parameter update service.
The parameter configuration method provided by the implementation of the present application will be described below with reference to fig. 7 and table 1 below.
TABLE 1
Sequence number Description of the invention Usage scenarios
0 USB Phy registers to USB eye pattern parameter updating drive, updates USB Phy original and built-in parameters/interfaces Initialization of
1 Updating default/built-in policy parameter configuration from configuration file Initialization/specific conditional triggering
2 Policy update configuration enabling from user side app, transmission to USB eye parameter update driver via hal operation node Interface dynamic update enabled configuration policies
3 Policy update configuration enabling from a user to directly update a corresponding node using an adb command Instruction dynamic update enable configuration policy
4 hal resets the USB UDC, and then the USB Phy parameter is initialized USB Phy parameter update
5 The USB eye pattern parameter updating driver updates the USB eye pattern parameter updating strategy configuration to the corresponding USB Phy Updating parameters to USB Phy
6 USB status report (Master/Slave) USB status inquiry
Exemplary, as in FIG. 7 "
Figure SMS_1
"shown," in the case of, for example, a mobile phone startup, the USB Phy driver is initialized, registers the USB Phy to the USB eye parameter update driver, and updates the original and built-in parameters and/or interfaces of the USB Phy.
During the initialization of the USB Phy driver, as shown in FIG. 7'
Figure SMS_2
"as shown, the USB eye parameter update driver may obtain a default or built-in USB eye parameter update policy (i.e., policy parameter configuration) from, for example, a USB rc file, so that the USB Phy driver performs USB eye parameter configuration of the USB Phy according to the USB eye parameter update policy.
Further, in other specific scenarios, when a specific condition triggers (e.g., when a USB connection fails), as shown in FIG. 7, "
Figure SMS_3
The "shown, the USB eye parameter updating driver may also obtain a default or built-in USB eye parameter updating policy (i.e. policy parameter configuration) from a configuration file, such as a USB rc file, so that the USB Phy driver performs USB eye parameter configuration of the USB Phy according to the USB eye parameter updating policy.
As in figure 7'
Figure SMS_4
"shown, in the interface dynamic update enabling configuration policy scenario, when an application corresponding to a system apk or an application corresponding to other apks receives a USB eye parameter update policy selected by a user side app, the application corresponding to apk updates the USB eye parameter update policy or the USB eye The identification information of the parameter updating strategy is sequentially sent to the USB eye pattern parameter updating driver through oem service and USB hal, so that the USB eye pattern parameter configuration of the USB Phy is carried out by the USB Phy driver according to the corresponding USB eye pattern parameter updating strategy. I.e. "-in FIG. 7>
Figure SMS_5
In the strategy scene of dynamic updating and enabling configuration of the interface, strategy updating and configuration enabling is carried out from the user side app, and the strategy updating and configuration enabling is transmitted to a USB eye pattern parameter updating driving process through a USB hal operation node.
As in figure 7'
Figure SMS_6
In the "shown, in the instruction dynamic update use configuration policy scenario, after the adb application determines the USB eye parameter update policy selected by the user, the adb application sends the USB eye parameter update policy or the identification information of the USB eye parameter update policy to the USB eye parameter update driver via the adbd, so as to be used for the USB Phy driver to perform USB eye parameter configuration of the USB Phy according to the corresponding USB eye parameter update policy. I.e. "-in FIG. 7>
Figure SMS_7
"a policy update configuration enabled procedure for directly updating the corresponding node using the adb command from the user side. />
As in figure 7'
Figure SMS_8
And the process of resetting the USB UDC and updating the USB Phy parameters is shown in the figure. In the process of updating the USB eye pattern parameters, the USB hal can issue instructions to the USB UDC driver, so that the USB UDC driver is reset, and then the USB Phy parameters are initialized, and the USB Phy parameters are updated.
As in figure 7'
Figure SMS_9
"shown, the USB eye parameter update driver performs parameter update to update the parameter configuration corresponding to the USB eye parameter update policy to the corresponding USB Phy driver, and further to the corresponding USB Phy driverIn USB Phy. That is, the USB eye parameter update driver causes the USB Phy driver to configure the USB eye parameters of USB Phy to validate the corresponding USB eye parameters.
As in figure 7'
Figure SMS_10
After the updating of the USB eye diagram parameter configuration is completed, for example, the USB UDC driver, such as the USB controller gadget driver and the USB controller hub-host driver, may respond to the USB state query information of the upper module, such as the USB service, and report the USB state (which may also be understood as the USB eye diagram parameter configuration result) to the USB service, so that the upper module knows the USB state of the mobile phone as the host or the slave.
In this implementation, the USB eye parameter update policy may include, for example, information related to a policy applicable mode (i.e., applicable to a master mode or a slave mode), policy enable (enable) control information, policy configuration information, and the like. The policy configuration information may include configuration information of a plurality of different configurations, and some configuration information may be, for example, corresponding register information, USB Phy information, configuration enable (enable) control, and other information, and corresponding parameter information such as parameter values. Of course, the USB eye parameter update policy may also include more or less information, and the format and content of the USB eye parameter update policy may be selected and set as desired.
The parameter configuration method provided by the application is described below by taking a host as a mobile phone, a slave as a USB flash disk (e.g., OTG USB flash disk), and the mobile phone as an example for configuring USB eye pattern parameters of the mobile phone.
As shown in fig. 8, the method for configuring parameters provided by the implementation manner of the present application configures USB eye pattern parameters by using a mobile phone, which includes the following three steps.
Step 1, USB eye pattern parameter updating strategy input.
And 2, updating and enabling the USB eye pattern parameter updating strategy configuration.
And 3, enabling the USB eye pattern parameter updating strategy to be effective.
For step 1, the mobile phone may perform processing such as issuing configuration, issuing control, and issuing policy setting on the USB eye parameter update policy through the user side or the application layer.
Exemplary, as shown in fig. 9, the USB eye parameter update policy input manner is divided from different dimensions, and may include input manners such as a background menu input, an app update input, a policy update input, a cloud push input, an adb command input, a system built-in scheme, and the like. The background menu input includes, for example, providing a plurality of USB eye parameter updating policies by providing a setting interface by a mobile phone through a background menu apk, so that a user can select the parameters to implement parameter configuration. The app update input mode is that, for example, a single parameter update app displays a plurality of USB eye pattern parameter update policies pushed by a received cloud, so that a user can select the parameters to implement parameter configuration. The policy update input may also refer to, for example, enabling a user to select according to a plurality of USB eye parameter update policies pushed by, for example, a cloud server, so as to implement parameter configuration, or enabling a mobile phone to generate a new USB eye parameter update policy according to preset settings so as to enable the user to select or directly configure, for example. The cloud pushing input may also refer to, for example, that the cloud server pushes a plurality of USB eye parameter updating policies to enable a user to select to implement parameter configuration. The adb command input means that the USB eye pattern parameter updating strategy selected by the user is input by means of the adb command. The system built-in scheme refers to that a plurality of USB eye pattern parameter updating strategies are preset in the system to enable a user to select or configure when corresponding conditions trigger (such as starting up) so as to realize parameter configuration.
Of course, the input mode of the USB eye parameter updating policy may be input by a setting application corresponding to the setting apk, an engineering menu application corresponding to the engineering menu (which may be understood as the background menu) apk, a mobile phone manager application corresponding to the mobile phone manager apk, and a cloud service application corresponding to the cloud service apk, or may be input by an adb command, etc., and the input mode of the USB eye parameter updating policy may be selected and set as required.
Further, for the input form of the USB eye parameter update policy, the following categories may be mainly classified:
(1) And the data configuration class is used for setting the parameter configuration of each USB eye pattern parameter updating strategy. That is, the corresponding parameter information may be configured in the USB eye parameter update policy (e.g., a certain parameter is turned up by x) for configuration of the corresponding USB eye parameter. In this implementation, the mobile phone needs to enable the corresponding USB eye parameter according to the additional enabling control signal, so as to control the validation of the USB eye parameter.
(2) And enabling the control class to control the enabling or not of each USB eye pattern parameter updating strategy and determine whether each USB eye pattern parameter updating strategy is effective or not. That is, whether the corresponding USB eye parameter is enabled or not is configured in the USB eye parameter update policy for setting the enabling of the USB eye parameter configured in advance in, for example, a mobile phone.
(3) The method comprises the first two comprehensive classes, namely, the one-time setting of the configuration updating and enabling of the USB eye parameter updating strategy is completed. That is, the information of the corresponding parameter information and whether the parameter is enabled or not may be simultaneously configured in the USB eye parameter update policy for configuration update and enabling of the corresponding eye parameter.
Further, as shown in fig. 10, in one implementation of the present application, the USB eye parameters include, for example, parameters corresponding to USB Phy, including, for example, pre-emphasis and equalizer parameters, analysis filter parameters, clock phase and delay parameters, transmit signal alignment and level parameters, receiver threshold level parameters, and related parameters such as ensuring transmission line impedance matching, etc. Wherein the pre-emphasis and equalizer parameters may optimize the bandwidth and jitter of the transmitted signal. The analysis of the filter parameters can adjust the resource occupation and bandwidth, and improve the anti-interference performance of the signals. The clock phase and delay parameters can adjust the jitter of data, optimize clock delay, and ensure normal transmission. The transmit signal alignment and level parameters may adjust the amplitude and sequence of the signals to ensure that the transmitted data is correct. The receiver threshold level parameter may adjust the deviation of the receiver level threshold to ensure proper reception of the data. The related parameters of ensuring the impedance matching of the transmission line can reduce reflection and signal attenuation and improve the transmission efficiency.
In addition, the PRE-emphasis and equalizer parameters may be, for example, parameters tx_equ_param0, tx_pre_emph_param0, the analysis filter parameters may be, for example, parameters tx_analog_reserved 0, tx_analog_reserved1, the clock phase and delay parameters may be, for example, parameters rx_clkctrl, tx_clkctrl, the transmit signal arrangement and level parameters may be, for example, parameters tx_reserve0, tx_reserve1, the receiver threshold level parameters may be, for example, parameters rx_cm_hyst, rx_vcmp_ctrl, and the related parameters ensuring the impedance matching of the transmission line may be, for example, parameters tx_imp_ctrl, cfg_tx_imp_cal.
In other implementations of the present application, the USB eye parameters may further include parameters corresponding to the USB UDC, or parameters corresponding to other related components, which may be selected and set as needed.
In addition, the USB eye pattern parameters of different devices are regulated with high similarity, the influence of the USB eye pattern parameters is clear, the USB eye pattern parameters are only examples in some scenes, and the USB eye pattern parameters can be other parameters which can be selected and set according to the needs.
Further, after the USB eye parameter update policy in the mobile phone is input, the determined USB eye parameter update policy or the identification information of the USB eye parameter update policy is input to the USB eye parameter update service, so as to start the update and enable of the USB eye parameter update policy.
And 2, updating and enabling the USB eye parameter updating strategy, wherein the part of the process is to respond to the actions such as the strategy or inquiry of the user side or the application layer and update the USB eye parameter updating strategy to the kernel side or the driving layer of the mobile phone. In addition, a reset (reset) is performed for the relevant USB device, and the reset load validates the USB eye parameters. And in the loading process, the USB eye pattern parameter updating strategy is checked, and the USB eye pattern parameter corresponding to the USB eye pattern parameter updating strategy is updated to the corresponding USB eye pattern parameter, so that the USB eye pattern parameter is correspondingly updated.
For example, please refer to fig. 11, the usb eye parameter update policy update and enabling includes: the USB eye parameter update service sends a USB eye parameter update policy (e.g., including configuration (config) information and/or enable (enable) information, etc.) to the corresponding USB eye parameter update driver. And, for example, after all the USB eye parameter update policies are updated to the USB eye parameter update driver, the USB eye parameter update service sends a reset or initialization command to the USB related device driver (such as the USB UDC driver and the USB Phy driver described above) to reset or initialize the USB eye parameter of the USB related device driver, and further reset the validation parameter.
And for the step 3, the USB eye pattern parameter updating strategy is effective, namely the parameter strategy is effective, the partial process is mainly carried out between the kernel layer and the driver, after the USB eye pattern parameter updating strategy is updated, the existing strategy and configuration can be traversed in the resetting process of the device corresponding to the USB, and the enabled configuration is written into the corresponding hardware to finish the USB eye pattern parameter effective.
As shown in fig. 12, after receiving an instruction for resetting or initializing the USB related device driver, the USB related device driver sends check (check) notification information to the USB eye parameter update driver, so that the USB eye parameter update driver performs a USB eye parameter update policy check, traverses the USB eye parameter update policy set in sequence, and traverses the configuration set under the USB eye parameter update policy set, and configures the corresponding USB eye parameter according to the corresponding USB eye parameter update policy set and the configuration set setting (set) under the USB eye parameter update policy set.
In summary, as shown in fig. 13, the configuration process of the USB eye parameter includes inputting a USB eye parameter update policy, the USB eye parameter update service inputs the USB eye parameter update policy to the USB eye parameter update driver, and sends a reset instruction or an initialization instruction to the USB device driver to perform device reset or initialization, and complete the parameter setting check to realize that the parameter update is effective.
Compared with the mode that only one set of fixed USB eye pattern parameters is set in the mobile phone, or the mode that two sets of fixed USB eye pattern parameters are set so that the mobile phone can select according to master-slave equipment roles of the mobile phone in a communication connection scene, under the conditions that the scheme of mobile phone hardware equipment is fixed and the software version of the mobile phone is not changed, the method can dynamically input USB eye pattern parameter updating strategies based on modes such as user selection operation, and the like, the mobile phone dynamically updates, configures and enables the USB eye pattern parameters in the mobile phone through the dynamically input USB eye pattern parameter updating strategies, so that the USB eye pattern parameters can be more compatible with different connected equipment, USB compatibility problems under different scenes are effectively optimized, and user experience is improved.
The parameter configuration method provided by the implementation manner of the present application will be further described below.
As shown in fig. 14, in one implementation of the present application, the parameter configuration method includes the following steps.
S101, for example, the foregoing setting applies an operation of selecting the USB eye parameter update policy according to the user received by the mobile phone, and determines the input USB eye parameter update policy (or the identification information of the USB eye parameter update policy).
S102, the application sends the USB eye parameter updating strategy (or the identification information of the USB eye parameter updating strategy) to the USB eye parameter updating service.
S103, the USB eye pattern parameter updating service determines a USB eye pattern parameter updating strategy (or determines a corresponding USB eye pattern parameter updating strategy from the USB eye pattern parameter updating service according to the identification information of the USB eye pattern parameter updating strategy, or acquires the corresponding USB eye pattern parameter updating strategy from a preset configuration file, for example) and sends the USB eye pattern parameter updating strategy to the USB eye pattern parameter updating driver.
S104, the USB eye parameter update service sends a reset instruction (as an example of the first notification information) to the USB UDC driver.
The reset instruction may include information of the corresponding USB Phy, or information of the corresponding USB Phy and the USB UDC driver, etc. determined by the USB eye parameter update service according to, for example, the USB eye parameter update policy, so that the USB eye parameter update service sends the reset instruction to the corresponding USB UDC driver, and the USB UDC driver configures parameters of the corresponding USB Phy.
S105, the USB UDC driver resets the USB UDC according to the reset instruction. And step S106 is performed.
For example, the USB UDC driver sends a reset instruction (as an example of the second notification information) to the USB UDC, resetting the USB UDC.
S106, the USB UDC driver sends a reset instruction (as an example of the third notification information) to the USB Phy driver.
S107, the USB Phy driver acquires the USB eye pattern parameter updating strategy from the USB eye pattern parameter updating driver according to the reset instruction, and traverses the USB eye pattern parameter updating strategy in the USB eye pattern parameter updating strategy driver.
S108, the USB Phy driver resets the USB Phy according to the USB eye pattern parameter updating strategy, for example, configures the parameters or functions of the corresponding register, and completes the USB parameter configuration of the USB Phy.
Therefore, the mobile phone dynamically updates, configures and enables the USB eye pattern parameters in the mobile phone through the dynamically input USB eye pattern parameter updating strategy, so that the USB eye pattern parameters can be more compatible with different connected devices, USB compatibility problems in different scenes are effectively optimized, and user experience is improved.
Further, as shown in fig. 15, in another implementation of the present application, compared to the system architecture of the mobile phone shown in fig. 7, the application framework layer may be, for example, a USB framework (i.e., USB fwk) layer, the system service may be, for example, a USB framework service, the hardware abstraction layer may be, for example, a USB hal, and the kernel layer may be, for example, a USB driver layer. In addition, the hardware abstraction layer service may be, for example, a USB/tool service (USB/Gadget service), and the USB hal may further include an initialization profile service (for example, a service corresponding to a configuration rc file related to USB initialization).
Further, where the USB Phy 1 drive corresponds to Phy (e.g., to USB 2.0), the USB Phy 2 drive corresponds to SS Phy (e.g., to USB 3.0), the USB Phy3 drive corresponds to eUSB Phy (e.g., to low power USB), and the USB Phy 4 drive corresponds to other Phy.
In this implementation manner, after receiving the USB eye parameter update policy selected by, for example, the user, the application corresponding to the setting apk, the application corresponding to the engineering menu apk, the application corresponding to the cloud service apk, and the application corresponding to the mobile phone manager apk, the USB eye parameter update policy (or the identification information of the USB eye parameter update policy) is sent to the USB frame service. The USB framework service transmits the USB eye parameter update policy (or identification information of the USB eye parameter update policy) to the USB/tool service, the USB profile service, the initialization profile service, etc. The USB/tool service may send the USB eye parameter update policy (or identification information of the USB eye parameter update policy) to the USB eye parameter update driver, so that the USB Phy driver performs USB eye parameter configuration of the USB Phy according to the corresponding USB eye parameter update policy. And the USB/tool service can issue a reset instruction to the USB UDC driver, so that the USB UDC driver resets according to the corresponding USB eye pattern parameter updating strategy, and the USB Phy driver configures the USB eye pattern parameter corresponding to the USB Phy according to the USB eye pattern parameter updating strategy, and further initializes the USB Phy parameter to complete the updating of the USB Phy parameter. And, the USB eye parameter updating policy in the initialization profile service may be used for parameter configuration in the initialization process of the mobile phone, for example, and the USB eye parameter updating policy in the USB profile service may be used for parameter configuration in other processes.
In addition, the application corresponding to the adb command apk may also send the USB eye parameter update policy (or the identification information of the USB eye parameter update policy) selected by the user to the adbd service. The adbd service sends the USB eye parameter updating strategy (or the identification information of the USB eye parameter updating strategy) to the USB eye parameter updating driver, so that the USB eye parameter updating driver can be used for carrying out USB eye parameter configuration of the USB Phy according to the corresponding USB eye parameter updating strategy. And the adbd service can issue a reset instruction to the USB UDC driver, so that the USB UDC driver resets according to the USB eye parameter updating strategy, and the USB Phy driver configures the USB eye parameter corresponding to the USB Phy according to the USB eye parameter updating strategy, and further initializes the USB Phy parameter to complete the updating of the USB Phy parameter.
As shown in fig. 16, in another implementation of the present application, the application layer may include only a setting application and an adb command application, compared to the system architecture of the mobile phone shown in fig. 15. In addition, the USB Phy driver does not include the aforementioned USB Phy1 driver, and the USB Phy does not include the aforementioned Phy.
After receiving an initialization (init) instruction, the initialization profile service may send a configuration (config) set of the USB eye parameter update policy stored therein to the USB eye parameter update driver, so that the USB eye parameter update driver may perform USB eye parameter configuration of the USB Phy according to the USB eye parameter update policy.
In addition, the application to which the apk is set sends a corresponding USB eye parameter update policy (send policy) (or identification information of the USB eye parameter update policy) to the USB framework layer, the USB framework layer sends the USB eye parameter update policy (or identification information of the USB eye parameter update policy) to the USB/tool service, and may send a start (start) signal to the USB profile service. The USB profile service may provide information such as corresponding parameters to the USB service or provide corresponding functions according to a start signal. The USB service may send the USB eye parameter update policy (or identification information of the USB eye parameter update policy) to the USB eye parameter update driver, so that the USB Phy driver performs enable (enable) according to the corresponding USB eye parameter update policy, to complete USB eye parameter configuration of the USB Phy. And the USB service can issue a reset instruction to the USB UDC driver, so that the USB UDC driver resets according to the USB eye parameter updating strategy, and the USB Phy driver configures USB eye parameters of the USB Phy according to the USB eye parameter updating strategy, and further initializes USB Phy parameters to complete the updating of the USB Phy parameters.
In addition, the application corresponding to the adb command apk may also send configuration (configuration) set and control (control) information of the USB eye parameter update policy (or identification information of the USB eye parameter update policy) selected by the user to the adbd service. The adbd service sends the configuration set and control information of the USB eye parameter updating strategy (or the identification information of the USB eye parameter updating strategy) to the USB eye parameter updating driver, so that the USB eye parameter updating driver can be used for carrying out USB eye parameter configuration of the USB Phy according to the corresponding USB eye parameter updating strategy. And the adbd service can issue a reset instruction to the USB UDC driver, so that the USB UDC driver resets according to the USB eye parameter updating strategy, and the USB Phy driver configures the USB eye parameter of the USB Phy according to the USB eye parameter updating strategy, and further initializes the USB Phy parameter to complete the updating of the USB Phy parameter.
In addition, the USB framework layer also receives USB status information (USB_STATE) reported by the USB UDC driver.
Referring to fig. 17, in the parameter configuration method provided in the implementation manner of the present application, when, for example, a mobile phone is started and started, a USB Phy driver is initialized, and a USB eye parameter update driver is initialized, and the USB Phy registers to the USB eye parameter update driver to update original and built-in parameters and/or interfaces of the USB Phy, that is, register node interfaces related to the USB eye parameter update. And the USB eye pattern parameter updating driver can acquire a default or built-in USB eye pattern parameter updating strategy from the corresponding storage file, so that the USB Phy driver carries out USB eye pattern parameter configuration of the USB Phy according to the USB eye pattern parameter updating strategy. The storage file may be embedded with a plurality of sets of USB eye parameter update policies, for example, in the form of a device tree.
Further, after receiving the above-mentioned new input USB eye parameter updating policy, the application layer and the framework layer may update the new input USB eye parameter updating policy to the new input USB eye parameter updating service, perform configuration and enabling of the new input USB eye parameter updating policy, perform the foregoing USB Phy reset and initialization processing, and traverse all the USB eye parameter updating policies, so that the USB eye parameter corresponding to the new input USB eye parameter updating policy is effective.
In other implementations of the present application, the software architecture of the mobile phone may also be in other forms, and the foregoing applications, services, drivers, etc. that implement the corresponding functions may also be other applications, services, drivers, etc. that implement the same or similar functions, which may be selected and set as needed.
Based on the parameter configuration method provided by the implementation manner of the application, the mobile phone can dynamically configure the USB eye pattern parameters, for example, the effective of the specific USB eye pattern parameters can be dynamically controlled through interface modes such as adb command, setting and the like. In addition, the user side can customize USB eye pattern parameters, the user side can customize and push the required USB eye pattern parameters in a cloud pushing mode or a plurality of groups of USB eye pattern parameters are built in, and the user side can select more suitable USB eye pattern parameters. Of course, more USB eye pattern parameters can be built in, and more USB eye pattern parameters can be selected by arranging a plurality of groups of USB eye pattern parameters. In this way, the method can quickly respond to quick iteration (USB eye pattern parameters can be separated from software versions), and can quickly modify parameters in a cloud pushing or apk mode and the like aiming at a user scene, so that corresponding problems are quickly optimized.
The parameter configuration method provided by the implementation mode of the application is applied to the mobile phone, the mobile phone can update the USB eye pattern parameters under the condition that a software system is unchanged, and USB compatibility can be effectively improved by updating the USB eye pattern parameters. Therefore, it may also be called a method of improving USB compatibility.
Compared with the method for configuring parameters, which is provided by the implementation mode of the application, in which two sets of USB eye pattern parameters are preset in advance in a mobile phone according to the roles of the mobile phone in a USB communication connection scene (namely, the mobile phone is used as a master device or a slave device), the method for configuring parameters provided by the implementation mode of the application has the advantages that the built-in fixed USB eye pattern parameters cannot be used for all USB terminals on the market, so that the problem of certain USB compatibility can still be caused. According to the parameter configuration method provided by the implementation mode of the application, under the condition that a software system is unchanged, the USB eye pattern parameters can be dynamically updated, so that the USB eye pattern parameters are more compatible with the connection equipment, and the USB compatibility problem under different scenes is effectively optimized. That is, by updating the USB eye pattern parameters, the USB compatibility can be effectively improved, and the problem that two sets of parameters are preset in advance in the mobile phone can be solved, and the mobile phone cannot cope with all USB terminals on the market according to the mode of selecting the corresponding parameters in the USB communication connection scene, so that a certain USB compatibility problem can still be caused, that is, more USB terminals on the market can be dealt with.
In other implementations of the present application, the foregoing mobile phone as an example of the first electronic device may also be a wearable device such as an earphone, glasses, a bracelet, a pedometer, and the mobile phone may also be a tablet computer, a notebook computer, a palm computer, a mobile internet device (mobile internet device, MID), a personal digital assistant, a portable media player, a navigation device, a video game device, a set-top box, a virtual reality and/or augmented reality device, an internet of things device, an industrial control device, a streaming media client device, an electronic book, a reading device, a vehicle-mounted device, a POS device, and other electronic devices, which are not limited in this application. The computer as an example of the second electronic device may be another electronic device such as a tablet computer, and the cloud server as an example of the second electronic device may be another server. The usb disk, which is an example of the third electronic device, may be another electronic device such as a computer or a car. Namely, the first electronic device, the second electronic device and the second electronic device can be selected and set according to the needs.
The two electronic devices may communicate with each other through a communication scheme other than the USB communication scheme described above. Therefore, the foregoing USB eye parameter update policy may also be an update policy of parameters of other communication devices corresponding to other communication methods, which may be selected and set as needed.
Referring to fig. 18, fig. 18 is a schematic structural diagram of an electronic device 900 according to an implementation of the present application. The electronic device 900 may include one or more processors 901 coupled to a controller hub 904. For at least one implementation, the controller hub 904 communicates with the processor 901 via a multi-drop Bus, such as a Front Side Bus (FSB), a point-to-point interface, such as a fast channel interconnect (QuickPath Interconnect, QPI), or similar connection. The processor 901 executes instructions that control the general type of data processing operations. In one implementation, the controller hub 904 includes, but is not limited to, a graphics memory controller hub (Graphics Memory controller hub, GMCH) (not shown) and an input/output hub (IOH) (which may be on separate chips) (not shown), where the GMCH includes memory and graphics controllers and is coupled to the IOH.
Electronic device 900 may also include a coprocessor 906 and memory 902 coupled to controller hub 904. Alternatively, one or both of the memory 902 and GMCH may be integrated within the processor 901 (as described herein), with the memory 902 and co-processor 906 being directly coupled to the processor 901 and the controller hub 904, the controller hub 904 being in a single chip with the IOH.
The memory 902 may be, for example, dynamic random access memory (Dynamic Random Access Memory, DRAM), phase change memory (Phase Change Memory, PCM), or a combination of both.
In one implementation, coprocessor 906 is a special-purpose processor, such as, for example, a high-throughput many-core (Many Integrated Core, MIC) processor, network or communication processor, compression engine, graphics processor, general-purpose graphics processor (General Purpose Graphics Processing Units, GPGPU), embedded processor, or the like. Optional properties of coprocessor 906 are shown in fig. 18 with dashed lines.
In one implementation, the electronic device 900 may further include a network interface (Network Interface Card, NIC) 903. The network interface 903 may include a transceiver to provide a radio interface for the electronic device 900 to communicate with any other suitable device (e.g., front end module, antenna, etc.). In various implementations, the network interface 903 may be integrated with other components of the electronic device 900. The network interface 903 may implement the functionality of the communication unit in the above-described implementation.
The electronic device 900 may further include an input/output (I/O) device 905. Input/output (I/O) devices 905 may include: a user interface, the design enabling a user to interact with the electronic device 900; the design of the peripheral component interface enables the peripheral component to also interact with the electronic device 900; and/or sensors designed to determine environmental conditions and/or location information associated with the electronic device 900.
It is noted that fig. 18 is merely exemplary. That is, although fig. 18 shows that the electronic apparatus 900 includes a plurality of devices such as a processor 901, a controller hub 904, and a memory 902, in practical applications, the apparatus using the methods of the present application may include only a part of the devices of the electronic apparatus 900, for example, may include only the processor 901 and the NIC903. The nature of the alternative device is shown in dashed lines in fig. 18.
One or more tangible, non-transitory computer-readable media for storing data and/or instructions may be included in the memory of the electronic device 900. The computer-readable storage medium has stored therein instructions, and in particular, temporary and permanent copies of the instructions.
In this application, the electronic device 900 may be a terminal device such as a mobile phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA), or a desktop computer. The instructions stored in the memory of the electronic device may include: instructions that when executed by at least one unit in the processor cause the electronic device to implement the parameter configuration method as previously mentioned.
Illustratively, fig. 19 is a schematic structural diagram of a SoC (System on Chip) 1000 provided according to an implementation of the present application. In fig. 19, similar parts have the same reference numerals. In addition, the dashed box is an optional feature of the more advanced SoC 1000. The SoC 1000 may be used in any electronic device according to the present application, and may implement corresponding functions according to the device in which it is located and the instructions stored therein.
In fig. 19, the SoC1000 includes: an interconnect unit 1002 coupled to the processor 1001; a system agent unit 1006; a bus controller unit 1005; an integrated memory controller unit 1003; a set or one or more coprocessors 1007 which may include integrated graphics logic, image processors, audio processors, and video processors; a Static Random-Access Memory (SRAM) unit 1008; direct memory access (Direct Memory Access, DMA) unit 1004. In one implementation, the coprocessor 1007 includes a special-purpose processor, such as, for example, a network or communication processor, compression engine, GPGPU, high-throughput MIC processor, embedded processor, or the like.
One or more computer-readable media for storing data and/or instructions may be included in the SRAM cell 1008. The computer-readable storage medium may have stored therein instructions, and in particular, temporary and permanent copies of the instructions. The instructions may include: instructions that when executed by at least one unit in the processor 1001 cause the electronic device to implement the parameter configuration method as previously mentioned.
The implementation manner of the application provides electronic equipment, which comprises the following components: a memory for storing a computer program, the computer program comprising program instructions; and a processor for executing program instructions to cause the electronic device to perform the parameter configuration method as described above.
Implementations of the present application provide a computer readable storage medium storing a computer program comprising program instructions that are executed by an electronic device to cause the electronic device to perform the foregoing parameter configuration method.
Implementations of the present application provide a computer program product comprising a computer program to be run by an electronic device to cause the electronic device to perform the aforementioned parameter configuration method.
The terms "first," "second," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
In the drawings, some structural or methodological features may be shown in a particular arrangement and/or order. However, it should be understood that such a particular arrangement and/or ordering may not be required. Rather, in some implementations, the features can be arranged in a different manner and/or order than shown in the illustrative drawings. Additionally, the inclusion of structural or methodological features in a particular figure is not meant to imply that such features are required in all implementations, and in some implementations, such features may not be included or may be combined with other features.
While the application has been shown and described with respect to certain implementations thereof, it will be apparent to those of ordinary skill in the art that the foregoing is a further detailed description of the application in connection with the specific implementations, and it is not intended to limit the practice of the application to only those implementations. Various changes in form and detail may be made therein by those skilled in the art, including a few simple inferences or alternatives, without departing from the spirit and scope of the present application.

Claims (19)

1. A method of parameter configuration, applied to a first electronic device, the method comprising:
determining first parameter configuration information, wherein the first parameter configuration information is information for configuring parameters of a first communication device, the first communication device is a communication device corresponding to a first communication mode, the first parameter configuration information is determined by the first electronic equipment according to setting operation of a user on the parameter configuration information, or the first parameter configuration information is determined by the first electronic equipment according to information sent by a second electronic equipment, and the second electronic equipment is electronic equipment which establishes communication connection with the first electronic equipment;
And configuring parameters of the first communication device according to the first parameter configuration information.
2. The parameter configuration method of claim 1, wherein determining the first parameter configuration information comprises:
displaying a first interface, wherein the first interface comprises first parameter identification information, and the first parameter identification information corresponds to the first parameter configuration information;
receiving a first operation of a user on the first parameter identification information, wherein the first operation is an operation of selecting the first parameter identification information;
and determining the first parameter configuration information in response to the first operation.
3. The parameter configuration method according to claim 2, wherein the first parameter identification information is determined by the first electronic device according to at least one of the following information:
the first electronic equipment corresponds to communication scene information of the first communication mode;
historical setting information of the parameter configuration information by the user.
4. The parameter configuration method of claim 1, wherein determining the first parameter configuration information comprises:
displaying a second interface, wherein the second interface comprises a parameter configuration information input control;
Receiving a second operation of the parameter configuration information input control by a user, wherein the second operation is an operation of inputting parameter configuration information;
and determining the first parameter configuration information in response to the second operation.
5. The parameter configuration method of claim 1, wherein determining the first parameter configuration information comprises:
receiving first information sent by the second electronic equipment;
transmitting parameter identification information of parameter configuration information in the first electronic device to the second electronic device in response to the first information, so that the second electronic device displays a third interface, wherein the parameter configuration information comprises the first parameter configuration information, the parameter identification information comprises first parameter identification information, the first parameter identification information corresponds to the first parameter configuration information, and the third interface comprises the first parameter identification information;
receiving second information sent by the second electronic device, wherein the second information comprises the first parameter identification information, the first parameter identification information is determined by the second electronic device in response to a third operation of a user on the third interface, and the third operation is an operation for selecting the first parameter identification information;
The first parameter configuration information is determined in response to the second information.
6. The parameter configuration method according to claim 5, wherein the first information and the second information are android debug bridge commands.
7. The parameter configuration method of claim 1, wherein determining the first parameter configuration information comprises:
receiving third information sent by the second electronic equipment, wherein the third information comprises the first parameter configuration information, the first parameter configuration information is determined by the second electronic equipment in response to a fourth operation of a fourth interface displayed by the second electronic equipment by a user, and the fourth operation is an operation of inputting the parameter configuration information;
and determining the first parameter configuration information in response to the third information.
8. The method for configuring parameters according to claim 1, wherein the second electronic device is a cloud server, and determining the first parameter configuration information includes:
and receiving parameter configuration information sent by the cloud server as the first parameter configuration information.
9. The parameter configuration method according to claim 8, wherein the parameter configuration information sent by the cloud server is determined by the cloud server according to at least one of the following information:
Device information of the first electronic device;
the device information of a third electronic device, wherein the third electronic device is an electronic device for establishing communication connection with the first electronic device through the first communication mode;
the first electronic equipment corresponds to communication scene information of the first communication mode;
and the history setting information of the parameter configuration information sent by the first electronic equipment is set by the user.
10. The method of claim 9, wherein the first electronic device is a master device and the third electronic device is a slave device.
11. The parameter configuration method of claim 1, wherein determining the first parameter configuration information comprises:
acquiring first state information of the first electronic equipment;
and under the condition that the first electronic equipment is in the first state according to the first state information, acquiring parameter configuration information from a first configuration file to obtain the first parameter configuration information, wherein the first configuration file is a configuration file corresponding to the first communication device.
12. The method of claim 1, wherein the parameter configuration information is a parameter configuration policy.
13. The parameter configuration method according to any one of claims 1 to 12, wherein configuring parameters of the first communication device according to the first parameter configuration information includes:
and sending the first parameter configuration information to a first parameter configuration driver, and sending first notification information to a first communication device driver, so that the first communication device driver responds to the first notification information, configures parameters of the first communication device according to the first parameter configuration information in the first parameter configuration driver, and the first communication device driver is a driver corresponding to the first communication device.
14. The method of claim 13, wherein the first communication device driver comprises a first communication controller driver and a first communication transceiver driver, wherein the first communication device comprises a first communication controller and a first communication transceiver,
transmitting the first notification information to the first communication device driver, comprising:
driving and transmitting the first notification information to the first communication controller;
so that the first communication device driver responds to the first notification information and configures parameters of the first communication device according to the first parameter configuration information in the first parameter configuration driver, comprising:
Causing the first communication controller to drive to send second notification information to the first communication controller, so that the first communication controller sets parameters of the first communication controller in response to the second notification information; and is also provided with
And enabling the first communication controller driver to send third notification information to the first communication transceiver driver, enabling the first communication transceiver driver to respond to the third notification information, acquiring the first parameter configuration information from the first parameter configuration driver, and configuring parameters of the first communication transceiver driver according to the first parameter configuration information.
15. The method of claim 14, wherein the first communication mode is a USB communication mode, the first parameter configuration information is USB eye pattern parameter configuration information, the first parameter configuration driver is a USB parameter configuration driver, the first communication controller driver is a USB controller driver, the first communication controller is a USB controller, the first communication transceiver driver is a USB transceiver driver, and the first communication transceiver is a USB transceiver.
16. The parameter configuration method according to any one of claims 1 to 12, wherein configuring parameters of the first communication device according to the first parameter configuration information includes:
And setting the parameter of the first communication device as a first parameter according to the first parameter configuration information, and enabling the first parameter to enable the first parameter.
17. An electronic device, comprising:
a memory for storing a computer program, the computer program comprising program instructions;
a processor for executing the program instructions to cause the electronic device to perform the parameter configuration method of any one of claims 1-16.
18. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions that are executed by an electronic device to cause the electronic device to perform the parameter configuration method according to any one of claims 1-16.
19. A computer program product comprising a computer program to be run by an electronic device to cause the electronic device to perform the parameter configuration method of any one of claims 1-16.
CN202310697656.2A 2023-06-13 2023-06-13 Parameter configuration method, electronic device, storage medium, and program product Active CN116431546B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310697656.2A CN116431546B (en) 2023-06-13 2023-06-13 Parameter configuration method, electronic device, storage medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310697656.2A CN116431546B (en) 2023-06-13 2023-06-13 Parameter configuration method, electronic device, storage medium, and program product

Publications (2)

Publication Number Publication Date
CN116431546A true CN116431546A (en) 2023-07-14
CN116431546B CN116431546B (en) 2023-10-27

Family

ID=87094714

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310697656.2A Active CN116431546B (en) 2023-06-13 2023-06-13 Parameter configuration method, electronic device, storage medium, and program product

Country Status (1)

Country Link
CN (1) CN116431546B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117312086A (en) * 2023-10-10 2023-12-29 上海合芯数字科技有限公司 Method, device, equipment and medium for adjusting USB interface of server

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135520A (en) * 2014-07-29 2014-11-05 广州金山网络科技有限公司 Method and device for identifying Android terminal
US20190260741A1 (en) * 2018-02-19 2019-08-22 Fmr Llc Secure authentication and network access management for mobile computing devices
CN113296984A (en) * 2021-06-15 2021-08-24 杭州朗和科技有限公司 Compatibility parameter determining method and device, electronic equipment and storage medium
CN115016329A (en) * 2022-06-30 2022-09-06 联想(北京)有限公司 Control method, control device and electronic equipment
CN115776666A (en) * 2021-09-07 2023-03-10 华为技术有限公司 Network parameter configuration method and related equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135520A (en) * 2014-07-29 2014-11-05 广州金山网络科技有限公司 Method and device for identifying Android terminal
US20190260741A1 (en) * 2018-02-19 2019-08-22 Fmr Llc Secure authentication and network access management for mobile computing devices
CN113296984A (en) * 2021-06-15 2021-08-24 杭州朗和科技有限公司 Compatibility parameter determining method and device, electronic equipment and storage medium
CN115776666A (en) * 2021-09-07 2023-03-10 华为技术有限公司 Network parameter configuration method and related equipment
CN115016329A (en) * 2022-06-30 2022-09-06 联想(北京)有限公司 Control method, control device and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117312086A (en) * 2023-10-10 2023-12-29 上海合芯数字科技有限公司 Method, device, equipment and medium for adjusting USB interface of server

Also Published As

Publication number Publication date
CN116431546B (en) 2023-10-27

Similar Documents

Publication Publication Date Title
US10223132B2 (en) Synchronization between electronic devices
US8943232B2 (en) System method for enumerating client devices embedded in a user device during reboot, wake up or restart of user device
US11057762B2 (en) Electronic device and method for switching electronic device between dual standby mode and single standby mode
US11647108B2 (en) Service processing method and apparatus
US9954959B2 (en) Method and apparatus for controlling electronic devices in proximity
US20060136899A1 (en) Method for programming/updating software using USB OTG
US11076037B2 (en) Electronic device for synchronizing modification among screens and operation method thereof
US20060160569A1 (en) Cellular phone and portable storage device using the same
CN204331708U (en) A kind of portable set and a kind of host computer system
CN116431546B (en) Parameter configuration method, electronic device, storage medium, and program product
US11144190B2 (en) Electronic device and method for sharing data thereof
CN112771489A (en) Method of controlling execution of heterogeneous operating system and electronic device and storage medium thereof
WO2023082622A1 (en) Method for designing communication module having master and slave devices compatible, and apparatus
WO2023087696A1 (en) Communication module and external interface configuration method and configuration apparatus therefor, and storage medium
CN115733549A (en) PCIE network card and switching method of interface modes thereof, electronic equipment and storage medium
US8881176B2 (en) Block device management
US10171651B2 (en) Electronic device and method for configuring message, and wearable electronic device and method for receiving and executing the message
US20140075063A1 (en) Smart device with no AP
US20140267096A1 (en) Providing a hybrid touchpad in a computing device
CN101998691B (en) Method, system and device for data transmission
US20130080659A1 (en) Device and method for controlling usb terminal
CN116737601B (en) Method, device and storage medium for expanding peripheral registers into system RAM
US20230161324A1 (en) Electronic apparatus for performing heating control and control method therefor
US20220214850A1 (en) Electronic device for seamlessly displaying images, and operating method therefor
CN115066877B (en) Electronic device and method for identifying an audio output device connected to a USB Type-C connector

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
GR01 Patent grant
GR01 Patent grant