Self-adaptive USB network sharing method and device and MIFI equipment

By presetting multiple USB driver modes in MIFI devices and performing adaptive signaling negotiation, the problem of USB network sharing in existing MIFI products is solved, and compatibility and device performance for different operating systems is achieved promote.

CN119254717APending Publication Date: 2025-01-03SPREADTRUM SEMICON(CHENGDU) CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411365811.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

Existing MIFI products cannot support USB network sharing requirements for multiple different types of operating systems at the same time, and need to be configured separately according to the operating system's driver mode.

Method used

Provide an adaptive USB network sharing method and device, preset at least two USB driver modes (RNDIS and ECM modes), signaling negotiation is carried out after connecting to the upper computer, and if the negotiation is successful, a corresponding network card is created and an IP address is assigned. , if the negotiation fails, switch to other driver modes for negotiation to achieve compatibility with different operating systems.

Benefits of technology

It realizes USB network sharing for multiple operating systems, expands the type of upper computer operating system processed, avoids manual switching, simplifies user operations, and improves user experience and device performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119254717A_ABST
    Figure CN119254717A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive USB network sharing method and device and MIFI equipment, and the method comprises the steps: presetting at least two USB drive modes to support different types of operating systems; after the USB interface of the upper computer is connected, signaling negotiation with the upper computer is carried out according to the configured default driving mode; if the negotiation succeeds, a network card corresponding to the driving mode is created, an IP address is allocated to the upper computer, and the network card is utilized to provide a USB network sharing service for the upper computer; and if the negotiation fails or exceeds the set time, switching to other driving modes except the default driving mode to carry out signaling negotiation. By means of the scheme, the USB sharing service can be provided for the upper computer, various different types of operating systems can be adaptively compatible, and the internet surfing requirement of the upper computer based on the different types of operating systems is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to an adaptive USB network sharing method and device, and a MIFI device. Background Art

[0002] USB (Universal Serial Bus) network sharing refers to sharing a computer's network connection with another device via a USB connection. When currently MIFI (Mobile WIFI) devices provide USB network sharing, it is necessary to ensure that the driver mode used by the MIFI device and the host computer is the same. Host computers with different types of operating systems need to adapt to the driver mode of the MIFI device to ensure that the driver mode used by the MIFI device and the host computer is the same. For example, when the host computer supports the RNDIS (Remote Network Driver Interface Specification) mode, the driver on the MIFI device needs to be configured to the RNDIS mode, such as Figure 1 As shown; when the host computer supports ECM (Ethernet Networking Control Model) mode, the driver mode of the MIFI device needs to be configured as ECM mode, such as Figure 2 As shown. This ensures that the link layer between the two can communicate. The host computer based on the Linux Ubuntu operating system can support RNDIS mode and ECM mode. Figure 1 and Figure 2 In the process, the host computer can use the USB network provided by the MIFI device to connect to the core network through the remote port.

[0003] Most existing MIFI products only support RNDIS mode or ECM mode, that is, they are only configured as one of the port modes, which cannot meet the network sharing requirements of host computers with different operating systems. Summary of the invention

[0004] The embodiments of the present application provide an adaptive USB network sharing method and apparatus, and a MIFI device to solve the problem that existing MIFI products cannot simultaneously support the needs of host computers with multiple types of operating systems for USB network sharing.

[0005] In order to solve the above technical problems, the embodiments of the present application provide the following technical solutions:

[0006] On the one hand, an embodiment of the present application provides an adaptive USB network sharing method, the method comprising:

[0007] At least two USB drive modes are pre-set to support different types of operating systems;

[0008] After connecting to the USB interface of the host computer, perform signaling negotiation with the host computer according to the configured default drive mode;

[0009] If the negotiation is successful, a network card corresponding to the driving mode is created and an IP address is allocated to the host computer, and the network card is used to provide a USB network sharing service for the host computer;

[0010] If the negotiation fails or exceeds the set time, the system switches to another driving mode other than the default driving mode for signaling negotiation.

[0011] Optionally, the two USB drive modes include: RNDIS mode and ECM mode.

[0012] Optionally, the default driving mode includes any one of the following: RNDIS mode, ECM mode.

[0013] Optionally, using the network card to provide the host computer with a USB network sharing service includes:

[0014] Configure a network IP address for the host computer;

[0015] After receiving the uplink data packet sent by the host computer, forwarding the uplink data packet in the local area network through the LAN port or sending the uplink data packet through the WAN port according to the destination address of the uplink data packet;

[0016] After receiving the downlink data packet from the WAN port, the downlink data packet is sent to the host computer through the network card.

[0017] Optionally, configuring a network IP address for the host computer includes: configuring a network IP address for the host computer through a DHCP server.

[0018] Optionally, different host computers share the same IP pool.

[0019] On the other hand, the embodiment of the present application also provides an adaptive USB network sharing device, the device comprising: a signaling negotiation module, a network card creation module, and a sharing service module;

[0020] The signaling negotiation module is used to perform signaling negotiation with the host computer according to the configured default drive mode after being connected to the USB interface of the host computer;

[0021] The network card creation module is used to create a network card corresponding to the drive mode and allocate an IP address to the host computer after the signaling negotiation is successful; the network card creation module can create at least two network cards corresponding to different USB drive modes;

[0022] The shared service module is used to provide USB network sharing service for the host computer by using the network card;

[0023] The signaling negotiation module is further configured to switch to another driving mode other than the default driving mode for signaling negotiation after the signaling negotiation fails or exceeds a set time.

[0024] Optionally, the shared service module includes:

[0025] An address configuration unit, used to configure a network IP address for the host computer;

[0026] A data forwarding unit is used to forward the uplink data packet sent by the host computer within the local area network according to the destination address of the uplink data packet or send the uplink data packet from the WAN port through NAT; after receiving the downlink data packet from the WAN port, send the downlink data packet to the host computer through the network card.

[0027] On the other hand, an embodiment of the present application further provides a MIFI device, which includes the adaptive USB network sharing device.

[0028] On the other hand, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program executes the steps of the adaptive USB network sharing method when executed by a computer.

[0029] On the other hand, an embodiment of the present application further provides a computer program product, including a computer program / instruction, which implements the steps of the adaptive USB network sharing method when executed by a processor.

[0030] The adaptive USB network sharing method and device provided in the embodiment of the present application are configured with at least two USB drive modes at the same time, and when providing USB sharing services to the host computer, through an adaptive switching method, USB sharing services can be provided to the host computer based on different types of operating systems at the same time, so as to achieve compatibility with multiple different types of operating systems, such as the USB network sharing Internet access requirements of Windows, Linux, MacOS and other operating systems. The adaptive USB network sharing device provided in the embodiment of the present application has the network data processing capability under multiple different types of USB drive modes, expands the types of host computer operating systems that can be processed at the same time, and does not require manual switching, which facilitates the user's operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0032] Figure 1 It is a schematic diagram of the existing MIFI device in RNDIS driving mode providing USB network sharing for the host computer;

[0033] Figure 2 It is a schematic diagram of the existing MIFI device in ECM drive mode providing USB network sharing for the host computer;

[0034] Figure 3 It is a flow chart of the adaptive USB network sharing method provided by the embodiment of the present application;

[0035] Figure 4 A schematic diagram showing the principle of applying the adaptive USB network sharing method of the present application to a MIFI device;

[0036] Figure 5 It is a structural schematic diagram of an adaptive USB network sharing device provided in an embodiment of the present application;

[0037] Figure 6 It is a hardware structure diagram of the MIFI device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.

[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0040] Because different operating systems support different network interface driver modes, for example:

[0041] Windows operating system only supports RNDIS drive mode;

[0042] MacOS operating system only supports ECM drive mode;

[0043] The Linux operating system is compatible with RNDIS and ECM drive modes.

[0044] Therefore, when the MIFI device is configured to different drive modes, the supported host computer operating systems will be different. For example, when configured to RNDIS, the MIFI device will create an RNDIS network card for the RNDIS host computer to use, which can be provided to host computers with WINDOWS operating system and LINUX operating system for Internet access, but cannot support host computers with MacOS operating system for Internet access; when configured to ECM, the platform will create an ECM network card for the ECM host computer to use, which can be provided to host computers with MacOS operating system and LINUX operating system for Internet access, but cannot support host computers with WINDOWS operating system for Internet access.

[0045] In view of the fact that MIFI products in the prior art cannot simultaneously support the needs of host computers with multiple different types of operating systems for USB network sharing, an embodiment of the present application provides an adaptive USB network sharing method and device, and simultaneously configures the RNDIS drive mode and the ECM drive mode. When providing USB sharing services to the host computer, an adaptive switching method can be used to simultaneously provide USB sharing services to host computers based on different types of operating systems.

[0046] like Figure 3 FIG. 1 is a flow chart of an adaptive USB network sharing method provided by an embodiment of the present application, comprising the following steps:

[0047] Step 301, pre-set at least two USB drive modes to support different types of operating systems.

[0048] For example, two USB drive modes are set on the MIFI device, namely: RNDIS mode and ECM mode. Of course, the embodiments of the present application are not limited to other drive modes.

[0049] Step 302, after connecting to the host computer USB interface, perform signaling negotiation with the host computer according to the configured default drive mode. In this embodiment, the host computer, as a USB host, is responsible for managing all data streams on the USB bus and identifying and controlling peripheral hardware devices connected to the USB interface. As a peripheral hardware device connected to the USB host, the MIFI device responds to the host computer's request and provides functions and services. The MIFI device can work according to the host computer's commands, send and receive data, report status information, etc.

[0050] After the host computer and the MIFI device are connected through the USB interface, the host computer detects that an external device is connected to the USB interface and initiates signaling negotiation with the USB interface device. The host computer can perform corresponding signaling interaction with the MIFI device according to the USB driver mode supported by its own operating system.

[0051] The signaling negotiation between the host computer based on different types of operating systems and the USB interface device at the driver level is related to the USB interface protocol supported by the operating system.

[0052] For example, for a host computer based on the Windows operating system, since the Windows operating system only supports the RNDIS drive mode, the host computer will initiate RNDIS signaling negotiation; for a host computer based on the MacOS operating system, since the MacOS operating system only supports the ECM drive mode, the host computer will initiate ECM signaling negotiation; for a host computer based on the Linux operating system, since the Linux operating system supports both the RNDIS drive mode and the ECM drive mode, the host computer can initiate both the RNDIS signaling negotiation and the ECM signaling negotiation.

[0053] RNDIS is a generic driver for network devices that allows the operating system to identify the device as a network adapter and install the corresponding network driver.

[0054] The RNDIS signaling negotiation process between the USB host and the USB device at the driver level mainly involves the following steps:

[0055] 1. After the USB host detects that a device is connected to the USB interface, it first reads the device's descriptor information. The operating system identifies the device according to the RNDIS protocol, loads the appropriate driver, and starts the initial exchange of signaling.

[0056] 2. The USB host sends initialization requests to the device to obtain or set the device's network parameters. Correspondingly, the device responds to these requests to complete the signaling negotiation.

[0057] The ECM signaling negotiation process between the USB host and the USB device at the driver level mainly involves the following steps:

[0058] 1. Device identification and driver loading:

[0059] When a USB device is connected to a USB host, the USB host identifies the USB device type through the USB descriptor. The host operating system selects and loads the corresponding ECM driver based on the device descriptor.

[0060] 2. Device initialization:

[0061] The USB host sends initialization commands to the ECM device through control transfer. This process includes configuring the device's endpoints, setting up interfaces, etc. The ECM driver communicates with the device to ensure that the device is ready to receive and send data.

[0062] 3. Interface and configuration:

[0063] The driver configures the interface of the ECM device (such as configuring the transfer endpoint) so that the host can exchange data with the device. The USB host sends USB requests to set the status or parameters of the device, such as setting data flow control, network parameters, etc.

[0064] In some embodiments, for example, the host computer is based on a Windows operating system and supports the RNDIS driving mode. The default driving mode set by the MIFI device is the RNDIS mode.

[0065] The host computer and the MIFI device perform signaling negotiation according to the RNDIS protocol. Since the default drive mode set by the MIFI device is the RNDIS mode, the signaling negotiation process will end normally. Through the above signaling negotiation process, the connection between the two can be established.

[0066] For another example, the host computer is based on the Windows operating system and supports the RNDIS drive mode. The default drive mode set by the MIFI device is the ECM mode.

[0067] The host computer and the MIFI device perform signaling negotiation according to the RNDIS protocol. Since the default drive mode set by the MIFI device is the ECM mode, the signaling negotiation process will be terminated in advance, the negotiation fails, and the two cannot establish a connection.

[0068] Step 303, determine whether the negotiation is successful and whether it has not exceeded the set time; if so, execute step 304; if the negotiation fails or the negotiation process exceeds the set time (for example, the set time is 2s), confirm that the operating system of the host computer does not support the set default drive mode, and execute step 305.

[0069] Step 304: Create a network card corresponding to the driving mode and assign an IP address to the host computer, and use the network card to provide USB network sharing service for the host computer.

[0070] Step 305: Switch to another driving mode other than the default driving mode to perform signaling negotiation.

[0071] Through signaling negotiation, the host computer can automatically discover, identify and configure the network interface to which it is connected, implement network card enumeration, load the corresponding driver, allocate necessary resources, and prepare for communication with network devices. The network card enumeration process may be implemented differently in different operating systems and programming environments, but its core purpose is the same, that is, to enable the host computer's operating system to identify and manage the connected network interface.

[0072] After completing the network card enumeration, the MIFI device needs to create a network card that matches the driver mode.

[0073] For example, if the host computer uses the Windows operating system and enumerates the RNDIS network card through the adaptive signaling negotiation process, the MIFI device needs to create the RNDIS network card and specify the IP address of the RNDIS network card.

[0074] For another example, the host computer is a PC based on the MacOS operating system. Through the adaptive signaling negotiation process, the host computer enumerates an ECM network card. Then the MIFI device needs to create an ECM network card and specify the IP address of the ECM network card.

[0075] It should be noted that the RNDIS network card and ECM network card in the embodiments of the present application are virtual network cards rather than physical network cards.

[0076] In the embodiment of the present application, a DHCP (Dynamic Host Configuration Protocol) server can allocate an IP address to a host computer. Moreover, the same DHCP server can allocate IP addresses to hosts with different types of operating systems, and different hosts can share the same IP pool.

[0077] The same USB interface of the MIFI device is connected to only one type of host computer at the same time. Therefore, the IP addresses configured for different host computers connected to the USB interface may be the same or different.

[0078] After the IP address configuration is completed, the corresponding network card can be used to provide USB network sharing services for the host computer.

[0079] Specifically, after receiving the uplink data packet sent by the host computer, the uplink data packet is forwarded within the local area network through the LAN (Local Area Network) port or sent through the WAN port according to the destination address of the uplink data packet.

[0080] Specifically, if the destination address is a local address within the LAN, the data is sent to the destination address within the LAN through the LAN port; if the destination address is not a local address within the LAN, the address is converted through NAT (Network Address Translation), the destination address is converted to a global address, and then the uplink data packet is sent to the core network through the WAN (Wide Area Network) port. NAT can be implemented in a static conversion, dynamic conversion, or port multiplexing manner, which is not limited in the embodiments of the present application.

[0081] Correspondingly, after receiving the downlink data packet from the WAN port, the MIFI device sends the downlink data packet to the host computer through the network card.

[0082] The above-mentioned reception and transmission of uplink data and downlink data can be completed by the TCP (Transmission Control Protocol) / IP protocol stack of the MIFI device.

[0083] The adaptive USB network sharing method provided in the embodiment of the present application configures at least two USB drive modes at the same time, and when providing USB sharing services to a host computer, it can provide USB sharing services to host computers based on different types of operating systems through an adaptive switching method, thereby achieving compatibility with multiple different types of operating systems.

[0084] The adaptive USB network sharing method provided in the embodiment of the present application can be applied to MIFI devices, such as Figure 4 , which is a schematic diagram showing the principle of applying the adaptive USB network sharing method of the present application to a MIFI device.

[0085] In this example, the MIFI device 40 is configured with two USB driver modes, namely, RNDIS mode and ECM mode, and can adaptively provide USB network sharing services for a variety of different types of host computers.

[0086] like Figure 4 As shown, the host computer 11 is based on the Windows operating system, the host computer 12 is based on the Linux operating system, and the host computer 13 is based on the MacOS operating system.

[0087] Assume that the default driver mode of the USB sharing service is RNDIS mode.

[0088] After the MIFI device 40 is connected to the USB interface of the host computer 11, the MIFI device 40 performs RNDIS signaling negotiation with the host computer 11. Since the Windows operating system can support the RNDIS drive mode, the negotiation is successful. Then the MIFI device 40 establishes an RNDIS network card and specifies the IP address of the RNDIS network card, such as the IP address of the RNDIS network card is 192.168.40.1, and allocates an IP address to the host computer 11 through the DHCP server, such as the IP address of the host computer 11 is 192.168.40.3. Subsequently, the RNDIS network card can provide USB network sharing services for the host computer 11. Specifically, for the uplink data sent by the host computer 11, it is converted through NAT address and then sent to the core network through the remote port 401 (or WAN port); for the downlink data received from the remote port 401, it is converted through NAT address and sent to the host computer 11.

[0089] Similarly, after the MIFI device 40 is connected to the USB interface of the host computer 12, the MIFI device 40 performs RNDIS signaling negotiation with the host computer 11. Since the Linux operating system is compatible with RNDIS and ECM drive modes, the negotiation is successful. Then the MIFI device 40 establishes an RNDIS network card and allocates IP addresses to the RNDIS network card and the host computer 12 through the DHCP server. For example, the IP address of the RNDIS network card is 192.168.40.1, and the IP address of the host computer 12 is 192.168.40.3. Subsequently, the RNDIS network card can provide USB network sharing services for the host computer 12. Specifically, for the uplink data sent by the host computer 12, it is converted through NAT address and then sent to the core network through the remote port 401; for the downlink data received from the remote port 401, it is converted through NAT address and sent to the host computer 12.

[0090] Similarly, after the MIFI device 40 is connected to the USB interface of the host computer 13, the MIFI device 40 performs RNDIS signaling negotiation with the host computer 13. Since the MacOS operating system only supports the ECM drive mode and does not support the RNDIS drive mode, the negotiation fails. After the negotiation fails, the MIFI device 40 automatically switches to the ECM drive mode and performs ECM signaling negotiation with the host computer 13. After the negotiation is successful, the MIFI device 40 establishes an ECM network card and allocates IP addresses to the ECM network card and the host computer 13 through the DHCP server. For example, the IP address of the ECM network card is 192.168.40.1, and the IP address of the host computer 13 is 192.168.40.3. Subsequently, the ECM network card can provide USB network sharing services for the host computer 13. Specifically, for the uplink data sent by the host computer 13, it is converted through NAT address and then sent to the core network through the remote port 401; for the downlink data received from the remote port 401, it is converted through NAT address and sent to the host computer 13.

[0091] By utilizing the present application solution, the network sharing requirements of host computers with various types of operating systems can be met simultaneously, thereby improving the performance of MIFI devices.

[0092] Accordingly, the embodiment of the present application also provides an adaptive USB network sharing device, such as Figure 5 Shown is a structural schematic diagram of the adaptive USB network sharing device.

[0093] The adaptive USB network sharing device 500 of this embodiment includes: a signaling negotiation module 501, a network card creation module 502, and a sharing service module 503. Among them:

[0094] The signaling negotiation module 501 is used to perform signaling negotiation with the host computer according to the configured default drive mode after being connected to the USB interface of the host computer;

[0095] The network card creation module 502 is used to create a network card corresponding to the drive mode and allocate an IP address to the host computer after the signaling negotiation is successful; the network card creation module 502 can create at least two network cards corresponding to different USB drive modes;

[0096] The sharing service module 503 is used to provide USB network sharing service for the host computer by using the network card.

[0097] Since different types of operating systems can support different network card driver modes, after the adaptive USB network sharing device 500 is connected to the USB interface of the host computer, the signaling negotiation module 501 performs signaling negotiation with the host computer according to the default driver mode. If the operating system of the host computer supports the default driver mode, the signaling negotiation is successful; if the operating system of the host computer does not support the default driver mode, the signaling negotiation will fail, or the signaling negotiation will time out under abnormal circumstances. In these cases, the signaling negotiation module 501 will automatically switch to other driver modes other than the default driver mode for signaling negotiation after the signaling negotiation fails or exceeds the set time.

[0098] By adaptively switching the drive mode, a drive mode supported by the host computer operating system can always be found, so that USB network sharing services can be provided to hosts of various operating systems in a simple and convenient way. No manual intervention is required, so the efficiency can be greatly improved, the user is more convenient to use, and the user experience can be enhanced.

[0099] In some embodiments, the shared service module 503 may include: an address configuration unit and a data forwarding unit.

[0100] The address configuration unit is used to configure a network IP address for the host computer;

[0101] The data forwarding unit is used to forward the uplink data packet sent by the host computer within the local area network according to the destination address of the uplink data packet or send the uplink data packet from the WAN port through NAT; after receiving the downlink data packet from the WAN port, send the downlink data packet to the host computer through the network card.

[0102] Correspondingly, an embodiment of the present application further provides a MIFI device, which may include the adaptive USB network sharing device.

[0103] The MIFI device provided in the embodiment of the present application has the ability to process network data in various types of USB drive modes, which expands the types of host computer operating systems that can be processed simultaneously, and does not require manual switching, thus facilitating user operation.

[0104] The MIFI device may be, but is not limited to, a mobile phone, a tablet computer, a POS machine, a smart watch, etc.

[0105] For other related descriptions about the USB network sharing device 500 , reference may be made to the related descriptions in the aforementioned embodiments, which will not be repeated here.

[0106] In a specific implementation, the USB network sharing device may also correspond to a chip in a communication device, such as a system-on-a-chip (SOC).

[0107] Regarding the various modules / units included in the various devices and products described in the above embodiments, they can be software modules / units, or hardware modules / units, or they can be partially software modules / units and partially hardware modules / units. For example, for various devices and products applied to or integrated in a chip, the various modules / units included therein can all be implemented in the form of hardware such as circuits, or at least some of the modules / units can be implemented in the form of software programs, which run on a processor integrated inside the chip, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits; for various devices and products applied to or integrated in a chip module, the various modules / units included therein can all be implemented in the form of hardware such as circuits, and different modules / units can be located in the same component (such as a chip, circuit module, etc.) or different components of the chip module, or at least some of the modules / units can be implemented in the form of hardware such as circuits. The element can be implemented in the form of a software program, which runs on a processor integrated inside the chip module, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits; for various devices and products applied to or integrated in the terminal, the various modules / units contained therein can be implemented in the form of hardware such as circuits, and different modules / units can be located in the same component (for example, chip, circuit module, etc.) or in different components in the terminal, or, at least some modules / units can be implemented in the form of a software program, which runs on a processor integrated inside the terminal, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits.

[0108] The present application also discloses a storage medium, which is a computer-readable storage medium and stores a computer program, which can be executed when the computer program is run. Figure 3 The steps of the adaptive USB network sharing method are shown in . The storage medium may include a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. The storage medium may also include a non-volatile memory (non-volatile) or a non-transitory memory, etc.

[0109] Please refer to Figure 6 The embodiment of the present application also provides a hardware structure diagram of a MIFI device. The device includes a processor 601, a memory 602 and a transceiver 603.

[0110] Processor 601 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application. Processor 601 may also include multiple CPUs, and processor 801 may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, or processing cores for processing data (such as computer program instructions).

[0111] The memory 602 may be a ROM or other types of static storage devices that can store static information and instructions, a RAM or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, and the embodiments of the present application do not impose any restrictions on this. The memory 602 may exist independently (in this case, the memory 602 may be located outside the device or inside the device), or it may be integrated with the processor 601. Among them, the memory 602 may contain a computer program code. The processor 601 is used to execute the computer program code stored in the memory 602, thereby realizing the method provided in the embodiments of the present application.

[0112] The processor 601, the memory 602 and the transceiver 603 are connected via a bus. The transceiver 603 is used to communicate with other devices or a communication network. Optionally, the transceiver 603 may include a transmitter and a receiver. The device used to implement the receiving function in the transceiver 603 can be regarded as a receiver, and the receiver is used to perform the receiving step in the embodiment of the present application. The device used to implement the sending function in the transceiver 603 can be regarded as a transmitter, and the transmitter is used to perform the sending step in the embodiment of the present application.

[0113] when Figure 6When the structural schematic diagram shown is used to illustrate the structure of the MIFI device involved in the above embodiment, the processor 601 is used to control and manage the actions of the MIFI device. For example, the processor 601 is used to support the MIFI device to execute the various steps of the aforementioned method and / or the actions performed by the MIFI device in other processes described in the embodiments of the present application. The processor 601 can communicate with other network entities through the transceiver 603. The memory 602 is used to store program code and data of the MIFI device.

[0114] It should be understood that the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article indicates that the associated objects before and after are in an "or" relationship.

[0115] The "plurality" appearing in the embodiments of the present application refers to two or more.

[0116] The first, second, etc. descriptions appearing in the embodiments of the present application are only used for illustration and distinction of the description objects. There is no order, nor do they indicate any special limitation on the number of devices in the embodiments of the present application, and cannot constitute any limitation on the embodiments of the present application.

[0117] The "connection" that appears in the embodiments of the present application refers to various connection methods such as direct connection or indirect connection to achieve communication between devices, and the embodiments of the present application do not impose any limitations on this.

[0118] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means.

[0119] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0120] In the several embodiments provided in the present application, it should be understood that the disclosed methods, devices and systems can be implemented in other ways. For example, the device embodiments described above are merely schematic; for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0121] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0122] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0123] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the method described in each embodiment of the present application.

[0124] Although the present application is disclosed as above, the present application is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application. Therefore, the protection scope of the present application shall be subject to the scope defined by the claims.

Claims

1. An adaptive USB network sharing method, characterized in that: The method comprises: At least two USB drive modes are pre-set to support different types of operating systems; After connecting to the USB interface of the host computer, perform signaling negotiation with the host computer according to the configured default drive mode; If the negotiation is successful, a network card corresponding to the driving mode is created and an IP address is allocated to the host computer, and the network card is used to provide a USB network sharing service for the host computer; If the negotiation fails or exceeds the set time, the system switches to another driving mode other than the default driving mode for signaling negotiation.

2. The method according to claim 1, characterized in that The two USB drive modes include: RNDIS mode and ECM mode.

3. The method according to claim 1, characterized in that The default driving mode includes any one of the following: RNDIS mode and ECM mode.

4. The method according to any one of claims 1 to 3, characterized in that: The use of the network card to provide the host computer with a USB network sharing service includes: Configure a network IP address for the host computer; After receiving the uplink data packet sent by the host computer, forwarding the uplink data packet in the local area network through the LAN port or sending the uplink data packet through the WAN port according to the destination address of the uplink data packet; After receiving the downlink data packet from the WAN port, the downlink data packet is sent to the host computer through the network card.

5. The method according to claim 4, characterized in that Configuring a network IP address for the host computer includes: The network IP address is configured for the host computer through the DHCP server.

6. The method according to claim 5, characterized in that Different host computers share the same IP pool.

7. An adaptive USB network sharing device, characterized in that: The device comprises: a signaling negotiation module, a network card creation module, and a shared service module; The signaling negotiation module is used to perform signaling negotiation with the host computer according to the configured default drive mode after being connected to the USB interface of the host computer; The network card creation module is used to create a network card corresponding to the drive mode and allocate an IP address to the host computer after the signaling negotiation is successful; the network card creation module can create at least two network cards corresponding to different USB drive modes; The shared service module is used to provide USB network sharing service for the host computer by using the network card; The signaling negotiation module is further configured to switch to another driving mode other than the default driving mode for signaling negotiation after the signaling negotiation fails or exceeds a set time.

8. The device according to claim 7, characterized in that The shared service module includes: An address configuration unit, used to configure a network IP address for the host computer; A data forwarding unit is used to forward the uplink data packet sent by the host computer within the local area network according to the destination address of the uplink data packet or send the uplink data packet from the WAN port through NAT; after receiving the downlink data packet from the WAN port, send the downlink data packet to the host computer through the network card.

9. A MIFI device, characterized in that: The device comprises the adaptive USB network sharing apparatus as claimed in claim 7 or 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a computer, the steps of the adaptive USB network sharing method according to any one of claims 1 to 6 are executed.

11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the adaptive USB network sharing method described in any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • USB connection communication method and system

    CN121387808A

  • A USB connection communication method and system

    CN121387808B

  • Driver-free internet access method and terminal equipment

    CN121442511A