Network sharing method and electronic equipment
By bridging the external network port and the internal network port in the interactive flat panel and changing the forwarding configuration, the problem of limited local applications caused by the software routing solution was solved, and the device performance and operating efficiency were improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2026-04-14
AI Technical Summary
Existing software routing solutions restrict the use of interactive flat panels for local applications, affecting device performance.
By establishing a bridge node in the interactive flat panel to bridge the external network port and the internal network port, and changing the forwarding configuration of the first system module, network signals can be sent to the second system module through the internal network port, avoiding IP address changes.
It enabled the normal use of local area applications, improved device performance, simplified the modification process, and increased operating efficiency.
Smart Images

Figure CN121864579A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network sharing technology, and in particular to a network sharing method and an electronic device. Background Technology
[0002] With the continuous improvement of scientific standards, interactive whiteboards with touch screens have begun to be widely used in various scenarios, such as conferences and teaching, due to their ease of use and powerful information processing and display functions.
[0003] In related technologies, the built-in boards of the interactive flat panel use the Android system to implement some basic functions. To expand and enrich the functionality of the interactive flat panel, it is also equipped with an OPS (Open Pluggable Specification) computer using a Windows system. Network sharing between the Android system and the OPS is achieved through a software router solution.
[0004] However, the aforementioned network sharing scheme may lead to restrictions on some local area applications. Summary of the Invention
[0005] The purpose of this application is to provide a shared network method and electronic device that can solve the problem of routing isolation in software routing solutions, which restricts the use of some local applications and thus affects device performance.
[0006] To achieve the above objectives, one aspect of this application provides a shared network method for an electronic device, the electronic device including a first system module; the electronic device further including a second system module, or the electronic device being able to connect to an external second system module; the first system module having an internal network port and an external network port, and establishing a bridge node in the first system module; the method includes: bridging the bridge node to the external network port and bridging the bridge node to the internal network port; changing the forwarding configuration of the first system module so that network signals can be sent to the second system module through the external network port, the bridge node, and the internal network port, thereby enabling the second system module to connect to the network through the internal network port; changing the configuration of the external network port and the configuration of the bridge node so that the first system module can connect to the network through the bridge node.
[0007] The shared network method provided in this application, when the second system module needs to connect to the network, bridges the bridge node to both the external network port and the internal network port, and modifies the forwarding configuration of the first system module. This allows network signals passing through the bridge node to be sent to the second system module via the internal network port, enabling network signals to enter the second system module via the external network port, the bridge node, and the internal network port, thus achieving signal transmission between the second system module and the external network. Since the IP address remains unchanged when the bridge node bridges the external and internal network ports, it avoids the problem of restricted use of some local applications, as seen in routing schemes, and offers the advantages of normal local application use and good device performance.
[0008] Furthermore, before the external network port is bridged with the bridge node, the first system module originally used the external network port to connect to the internet. After the external network port is bridged with the bridge node, the external network port becomes degraded, and the first system module can no longer connect to the internet through it. To ensure the networking function of the first system module, this embodiment cleverly modifies the configuration of the external network port and the bridge node, enabling the first system module to connect to the internet through the bridge node, thereby ensuring its networking function. Compared to finding the source code implementing the networking function of the first system module from its complex source code and replacing the external network port-related parts with the bridge node, the method provided in this embodiment simply modifies the configuration of the external network port and the bridge node without changing the complex source code, allowing the first system module to connect to the internet through the bridge node. This method has the advantages of being simple to modify, easy to operate, and highly efficient.
[0009] Optionally, changing the configuration of the external network port and the bridge node includes: renaming the original name of the external network port to another name, and renaming the original name of the bridge node to the original name of the external network port.
[0010] Optionally, the first system module runs the Android system; changing the forwarding configuration of the first system module so that network signals can be sent to the second system module through the external network port, the bridge node, and the internal network port includes: modifying the iptables table of the first system module to perform IP forwarding so that network signals can be sent to the second system module through the external network port, the bridge node, and the internal network port.
[0011] Optionally, the first system module has a built-in DHCP service module; the method further includes: when there is no network signal input at the external network port, the built-in DHCP service module enables the first system module and the second system module to communicate through the bridge node.
[0012] The above scheme enables the built-in DHCP service module to allocate IP addresses through the bridge node when it is determined that there is no network signal input at the external network port, thereby enabling communication between the first system module and the second system module.
[0013] Optionally, the intranet port is formed by an OTG analog network card, and the intranet port adopts the NCM protocol to realize Ethernet frame data transmission.
[0014] To achieve the above objectives, another aspect of this application provides an electronic device, including a first system module; the electronic device further includes a second system module, or the electronic device can be connected to an external second system module; the first system module has an internal network port and an external network port, and a bridge node is established in the first system module; the forwarding configuration of the first system module can be changed so that network signals can be sent to the second system module through the external network port, the bridge node, and the internal network port, thereby enabling the second system module to connect to the network through the internal network port; the bridge node bridges the external network port and the internal network port respectively; the configuration of the external network port and the configuration of the bridge node can be changed so that the first system module can connect to the network through the bridge node.
[0015] The electronic device provided in this application embodiment establishes a bridge node in the first system module, and bridges the bridge node to both the external network port and the internal network port. The forwarding configuration of the first system module is modified so that network signals passing through the bridge node can be sent to the second system module through the internal network port. This allows network signals to enter the second system module via the external network port, the bridge node, and the internal network port, thus realizing signal transmission between the second system module and the external network. Since the IP address remains unchanged when the bridge node bridges the external network port and the internal network port, IP address changes, as seen in routing schemes, are avoided, preventing restrictions on some local area applications and impacting device performance. Furthermore, the network connectivity of the first system module is cleverly maintained by modifying the name of the bridge node, avoiding modifications to the first system module's source code. This approach offers advantages such as ease of modification, simple operation, and high efficiency.
[0016] Optionally, the original name of the external network port can be renamed to another name, and the original name of the bridge node can be renamed to the original name of the external network port, so that the first system module can connect to the network through the bridge node.
[0017] Optionally, the first system module runs the Android system; the first system module is used to modify the iptables table to perform IP forwarding so that network signals can be sent to the second system module through the external network port, the bridge node, and the internal network port.
[0018] Optionally, the first system module has a built-in DHCP service module; when there is no network signal input at the external network port, the built-in DHCP service module enables the first system module to communicate with the second system module through the bridge node.
[0019] Optionally, the intranet port is formed by an OTG analog network card, and the intranet port adopts the NCM protocol to realize Ethernet frame data transmission. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of the relevant interactive flat panel;
[0022] Figure 2 A schematic diagram of an electronic device is provided in the embodiments of this application;
[0023] Figure 3 This is a flowchart illustrating a shared network method provided in an embodiment of this application. Detailed Implementation
[0024] As described in the background section, the interactive flat panel of the relevant technology uses a software routing solution to achieve network sharing. However, the software routing solution inherently suffers from routing isolation, which limits the use of some local applications and affects device performance. The inventors' research revealed that the reason for this problem is as follows:
[0025] Figure 1 Here is a schematic diagram of the relevant interactive flat panel, for reference. Figure 1Interactive flat panels consist of a System-on-Chip (SoC) and an Open Pluggable Specification (OPS) computer. The SoC provides routing functionality and DHCP service, while the OPS computer obtains an IP address via Ethernet access, thus forming an internal local area network (LAN) with the SoC. Through network configuration, the OPS can communicate with external networks. However, in software routing solutions, the software router's IP address (e.g., 192.168.1.1) and the external network's IP address (e.g., 172.17.xx.xx) are not in the same network segment. This means the OPS's IP address (e.g., 192.168.1.x) and the external network's IP address (e.g., 172.17.xx.xx) are also not in the same network segment. This restricts the use of some local area applications or requires network traversal to achieve certain application scenarios.
[0026] For example, the OPS and SOC are on an internal network segment, while the mobile phone and SOC are on an external network segment. Since the internal and external network segments are different, they cannot communicate directly. For instance, if a QR code is opened in the OPS, and the mobile phone's scanning application attempts to scan it, it will not receive a scan result.
[0027] To address the aforementioned issues, the inventors of this application conceived of using a switch to forward data packets within the same local area network. Replacing a soft router with a soft switch would resolve communication problems caused by different network segments. Specifically, a bridge node is used to bridge the external and internal network ports, effectively "degrading" them into a single network cable. The forwarding configuration of the first system module is then modified to allow network signals to be transmitted to the second system module via the external network port, bridge node, and internal network port of the first system module, thus enabling the second system module to connect to the network. Furthermore, to enable the first system module to connect, the inventors attempted to modify its source code. However, this method is complex (requiring locating the corresponding source code, understanding the meaning of each function, understanding the source code's execution logic, and changing names within the source code). To simplify the modification, the inventors conceived of changing the bridge node's name: renaming the external network port and the bridge node to the original name of the external network port. This avoids modifying the source code of the first system module, and has the advantages of being easy to modify, easy to run, and highly efficient.
[0028] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this application, but not all embodiments.
[0029] Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0030] Figure 2 This application provides a schematic diagram of an electronic device according to an embodiment. (Reference) Figure 2 The electronic devices provided in this application can be mobile phones, wearable devices, tablet computers, personal digital assistants (PDAs), laptops, mobile computers, interactive flat panels, and other terminal devices. In meeting or educational scenarios, multi-system devices can be large-sized interactive flat panels, which may have touch functionality.
[0031] The electronic device may include a first system module. The electronic device may also include a second system module, or the electronic device may be capable of connecting to an external second system module. That is, the second system module may be integrated into the electronic device; or, the second system module may not be part of the electronic device but rather an additionally configured device.
[0032] The first system module can be a processing chip such as a System-on-a-Chip (SoC), and the second system module can be an auxiliary expansion chip such as an OPS chip. For example, the first and second system modules can run different applications on the electronic device. For instance, the first system module can run a whiteboard application on an interactive flat panel, while the second system module can run image processing applications on the interactive flat panel. Furthermore, the first and second system modules can run applications with different power consumption levels on the electronic device. For example, the first system module can run complex high-power applications, while the second system module can run simple low-power applications, allowing for targeted use of the first and second system modules and facilitating the rational allocation of power and efficiency.
[0033] The first and second system modules can run different operating systems. For example, the first system module can be a System-on-a-Chip (SoC) running Android, while the second system module can be an OPS chip running Windows. Alternatively, the first and second system modules can run the same operating system, but with different versions. For instance, the first system module can be an SoC running the first version of Android, while the second system module can be an OPS device running the second version of Android.
[0034] The external network card of the first system module can form an external network port, which can communicate with external networks, such as transmitting wired network signals, WiFi network signals, 4G / 5G network data signals, etc. The external network can be a remote router or an external DHCP server (Dynamic Host Configuration Protocol, DHCP).
[0035] The first system module may also have an internal network port. This internal network port can be formed by a USB external network extension or an OTG (On-The-Go) emulated network card. OTG is used for connecting different devices or mobile devices to exchange data. The main purpose is to negotiate whether the second system module acts as a host device or a device. Specifically, when the ID pin of the OTG emulated network card is low, the OTG emulated network card can simulate an internal network port, the second system module is used as a device, the first system module can recognize the OTG emulated network card, and the first system module can output network signals to the second system module; the first and second system modules can share the network. When the ID pin of the OTG emulated network card in the first system module is high, the second system module acts as a host device, the first system module cannot recognize the OTG emulated network card, and the network connection between the first and second system modules is disconnected.
[0036] Optionally, when the internal network port is formed by an OTG emulated network card, the internal network port adopts protocols such as ECM (Ethernet Control Model Devices) or NCM (Network Control Model) for exchanging Ethernet frame data between the device and the host. Furthermore, the internal network port can use the NCM protocol to enable a single USB transmission to carry multiple Ethernet packets, thereby achieving gigabit network speeds.
[0037] Additionally, a bridge node can be established in the first system module to function as a softswitch. Specifically, a network bridging interface can be created in the first system module, which can connect two or more network segments to enable connectivity and data transmission between different network segments.
[0038] When the second system module needs to connect to the network, the bridge node can be used to bridge the external network port and the internal network port respectively. In this way, the bridge node acts as a connection between the external and internal network ports, and the IP address remains unchanged. Bridging refers to the process of forwarding network signal packets based on the link layer address of the OSI (Open Systems Interconnection) network model, operating at layer 2 of the OSI model. The OSI network model is a conceptual model designed to standardize communication functions between networks with different architectures to achieve interoperability. This model consists of seven layers: Physical Layer, Data Link Layer, Network Layer, Transport Layer, Session Layer, Presentation Layer, and Application Layer.
[0039] It is worth noting that after bridging is completed, when the external network port is connected to the external network, in order to avoid the bridge node from intercepting DHCP packets, the forwarding configuration of the first system module can be changed to avoid intercepting DHCP packets, so that the network signal passing through the bridge node can be sent to the second system module through the internal network port, thereby enabling the second system module to connect to the network.
[0040] For example, when the first system module is running the Android system, the iptables table in the Android system kernel can be modified to perform IP forwarding, so that network signals passing through the bridge node can be sent to the second system module through the internal network port. In other words, the first system module can configure the iptables table for the bridge node so that the DHCP packets of the second system module can be forwarded to obtain IP address allocation from the external network (DHCP server or router).
[0041] iptables is a crucial component of Linux firewall systems. Its primary function is to control the entry and exit of network packets and their forwarding. iptables can be used to control whether packets need to enter, exit, or be forwarded / routed by a device. Additionally, IP forwarding refers to IP address (Internet Protocol Address) forwarding, a network management method that allows selecting the forwarding path of packets based on their destination IP address. This strategy is more flexible than traditional destination-address-based routing because it considers not only the destination address but also packet size, application, or IP source address for route selection.
[0042] In summary, the electronic device provided in this application includes a first system module and a second system module. The first system module establishes a bridge node, which bridges an external network port and an internal network port respectively. The forwarding configuration of the first system module is modified so that network signals passing through the bridge node can be sent to the second system module through the internal network port. This allows network signals to enter the second system module via the external network port, the bridge node, and the internal network port, thus realizing signal transmission between the second system module and the external network. Since the IP address remains unchanged when the bridge node bridges the external and internal network ports, IP address changes as seen in routing schemes are avoided, preventing restrictions on some local area applications and impacting device performance.
[0043] It's worth noting that, assuming the first system module originally used an external network port for networking, after bridging, the external and internal network ports essentially "degenerate" into a single network cable. To allow the first system module to use the bridge node for networking without modifying its source code, the configurations of the external network port and the bridge node can be changed. Specifically, the original name of the external network port is renamed, and the original name of the bridge node is renamed to the original name of the external network port. Thus, the first system module can directly use the bridge node with the original external network port name for networking without modifying its source code. This clever approach of modifying the bridge node's name ensures the networking functionality of the first system module, avoiding the need to modify its source code, and offers advantages such as ease of modification, simple operation, and high efficiency.
[0044] For example, during the bridging phase, bridge node br0 is bridged to the external network port eth0, and bridge node br0 is also bridged to the internal network port usb0. In this step, the name of the external network port can be renamed from eth0 to eth0_line (or defined as something else), and the name of the bridge node can be renamed from br0 to eth0. When the first system module's operating system connects to the network, it still obtains the network port named eth0, thus, no change occurs to the operating system of the first system module.
[0045] Optionally, the first system module may include a built-in DHCP service module. When there is no network signal input on the external network port, the built-in DHCP service module can enable communication between the first system module and the second system module through a bridge node.
[0046] Specifically, the port of the built-in DHCP service module can be bridged with a bridge node. When it is determined that there is no network signal input on the external network port, the built-in DHCP service module can assign an IP address through the bridge node to enable communication between the first system module and the second system module.
[0047] Electronic devices may also include memory. Memory may be, for example, Dynamic Random Access Memory (DRAM), Phase Change Memory (PCM), or a combination of both. As a computer-readable storage medium, memory may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. For example, memory may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as one or more hard-disk drives (HDD(s)), one or more compact disc (CD) drives, and / or one or more digital versatile disc (DVD) drives.
[0048] Electronic devices may further include input / output (I / O) devices. I / O may include: a user interface designed to enable users to interact with the electronic device; interfaces for peripheral components designed to enable peripheral components to interact with the electronic device; and / or sensors designed to determine environmental conditions and / or location information relevant to the electronic device.
[0049] According to some embodiments of this application, the memory, which serves as a computer-readable storage medium, stores instructions that, when executed on a computer, cause an electronic device to perform the device-to-device communication method according to the above embodiments. For details, please refer to the methods in the above embodiments, which will not be repeated here.
[0050] refer to Figure 3 The shared network method provided in this application embodiment may include the following steps:
[0051] S101. Bridge the bridge node to the external network port and the bridge node to the internal network port.
[0052] Specifically, a bridge node acts as a connection between the external network port and the internal network port, and its IP address remains unchanged. Bridging refers to the process of forwarding network signal packets based on the link layer address of the OSI (Open Systems Interconnection) network model, operating at OSI Layer 2. The OSI network model is a conceptual model designed to standardize communication functions between networks with different architectures to achieve interoperability. This model consists of seven layers: Physical Layer, Data Link Layer, Network Layer, Transport Layer, Session Layer, Presentation Layer, and Application Layer.
[0053] The internal network port can be formed by a USB external network or an OTG emulated network card. When the ID pin of the OTG emulated network card is connected to a low level, the OTG emulated network card can simulate an internal network port, and the second system module is used as a device. The first system module can recognize the OTG emulated network card and can output network signals to the second system module. The first system module and the second system module can share the network. When the ID pin of the OTG emulated network card in the first system module is connected to a high level, the second system module acts as a host device, the first system module cannot recognize the OTG emulated network card, and the network connection between the first system module and the second system module is disconnected.
[0054] Optionally, when the internal network port is formed by an OTG emulated network card, the internal network port adopts protocols such as ECM (Ethernet Control Model Devices) or NCM (Network Control Model) for exchanging Ethernet frame data between the device and the host. Furthermore, the internal network port can use the NCM protocol to enable a single USB transmission to carry multiple Ethernet packets, thereby achieving gigabit network speeds.
[0055] S102. Modify the forwarding configuration of the first system module so that network signals can be sent to the second system module through the external network port, the bridge node, and the internal network port, thereby enabling the second system module to connect to the network through the internal network port.
[0056] Specifically, after bridging is completed, when the external network port is connected to the external network, in order to avoid the bridge node from intercepting DHCP packets, the forwarding configuration of the first system module can be changed to avoid intercepting DHCP packets, so that the network signal passing through the bridge node can be sent to the second system module through the internal network port.
[0057] For example, when the first system module is running the Android system, it can modify the iptables table in the Android kernel to perform IP forwarding, so that network signals passing through the bridge node can be sent to the second system module through the internal network port. That is, the first system module can configure the iptables table for the bridge node so that the DHCP packets of the second system module can be forwarded to obtain IP address allocation from the external network (DHCP server or router).
[0058] S103. Change the configuration of the external network port and the bridge node so that the first system module can connect to the network through the bridge node.
[0059] Specifically, the original name of the external network port is renamed to another name, and the original name of the bridge node is renamed to the original name of the external network port, so that network signals can be sent to the bridge node through the external network port.
[0060] Specifically, assuming the original system uses an external network port for networking, after bridging, the external and internal network ports are essentially "degraded" into a single network cable. To enable the first system module to connect to the network via the bridge node without modifying its source code, the original name of the external network port can be renamed, and the original name of the bridge node can be renamed back to the original name of the external network port. Thus, the first system module can directly use the bridge node with the original external network port name for networking without modifying its source code. This clever approach of modifying the bridge node's name ensures the native networking functionality of the first system module, avoiding the need to modify its source code, and offers advantages such as ease of modification, simple operation, and high efficiency.
[0061] For example, during the bridging phase, bridge node br0 is bridged to the external network port eth0, and bridge node br0 is also bridged to the internal network port usb0. In this step, the name of the external network port can be renamed from eth0 to eth0_line (or defined as something else), and the name of the bridge node can be renamed from br0 to eth0. When the first system module's operating system connects to the network, it still obtains the network port named eth0, thus, no change occurs to the operating system of the first system module.
[0062] In summary, the network sharing method provided in this application, when the second system module needs to connect to the network, utilizes the internal network port of the first system module to simulate an internal network port, and bridges the bridge node with both the external network port and the internal network port. The forwarding configuration of the first system module is modified so that network signals passing through the bridge node can be sent to the second system module through the internal network port. This allows network signals to enter the second system module via the external network port, the bridge node, and the internal network port, thus realizing signal transmission between the second system module and the external network. Since the IP address remains unchanged when the bridge node bridges the external and internal network ports, it avoids IP address changes as seen in routing schemes, preventing restrictions on some local area applications and impacting device performance.
[0063] The first system module has a built-in DHCP service module. Optionally, the method provided in this application embodiment may further include: S105, when there is no network signal input at the external network port, the built-in DHCP service module enables communication between the first system module and the second system module through a bridge node.
[0064] Specifically, the port of the built-in DHCP service module can be bridged with a bridge node. When it is determined that there is no network signal input on the external network port, the built-in DHCP service module can assign an IP address through the bridge node to enable communication between the first system module and the second system module.
[0065] The various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0066] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a Digital Signal Processor (DSP), a microcontroller, an Application Specific Integrated Circuit (ASIC), or a microprocessor.
[0067] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.
[0068] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, CD-ROMs, compact disc read-only memory (CD-ROMs), magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other forms of propagated signals. Therefore, machine-readable media includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.
[0069] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the accompanying drawings. Furthermore, including structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.
[0070] It should be noted that in the examples and description of this patent, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0071] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art should understand that various changes in form and detail may be made thereto without departing from the spirit and scope of this application.
Claims
1. A shared network method for an electronic device, the electronic device comprising a first system module; the electronic device further comprising a second system module, or, the electronic device being capable of connecting to an external second system module, characterized in that, The first system module has an internal network port and an external network port, and a bridge node is established in the first system module; the method includes: The bridge node is bridged to the external network port, and the bridge node is also bridged to the internal network port. The forwarding configuration of the first system module is changed so that network signals can be sent to the second system module through the external network port, the bridge node, and the internal network port, thereby enabling the second system module to connect to the network through the internal network port; The configuration of the external network port and the configuration of the bridge node are changed so that the first system module can connect to the network through the bridge node.
2. The method according to claim 1, characterized in that, The changes to the configuration of the external network port and the bridge node include: Rename the original name of the external network port to another name, and rename the original name of the bridge node to the original name of the external network port.
3. The method according to claim 1, characterized in that, The first system module runs the Android system; the step of changing the forwarding configuration of the first system module so that network signals can be sent to the second system module through the external network port, the bridge node, and the internal network port includes: Modify the iptables table of the first system module to enable IP forwarding, so that network signals can be sent to the second system module through the external network port, the bridge node, and the internal network port.
4. The method according to any one of claims 1-3, characterized in that, The first system module has a built-in DHCP service module; the method further includes: When there is no network signal input at the external network port, the built-in DHCP service module enables communication between the first system module and the second system module through the bridge node.
5. The method according to any one of claims 1-3, characterized in that, The internal network port is formed by an OTG analog network card, and the internal network port adopts the NCM protocol to realize Ethernet frame data transmission.
6. An electronic device, characterized in that, The electronic device includes a first system module; the electronic device also includes a second system module, or the electronic device can be connected to an external second system module; the first system module has an internal network port and an external network port, and a bridge node is established in the first system module; The bridge node bridges the external network port and the internal network port respectively; The forwarding configuration of the first system module can be changed so that network signals can be sent to the second system module through the external network port, the bridge node, and the internal network port, thereby enabling the second system module to connect to the network through the internal network port; the configuration of the external network port and the configuration of the bridge node can be changed so that the first system module can connect to the network through the bridge node.
7. The electronic device according to claim 6, characterized in that, The original name of the external network port can be renamed to another name, and the original name of the bridge node can be renamed to the original name of the external network port, so that the first system module can connect to the network through the bridge node.
8. The electronic device according to claim 6, characterized in that, The first system module runs the Android system; the first system module is used to modify the iptables table to perform IP forwarding so that network signals can be sent to the second system module through the external network port, the bridge node, and the internal network port.
9. The electronic device according to any one of claims 6-8, characterized in that, The first system module has a built-in DHCP service module; when there is no network signal input at the external network port, the built-in DHCP service module enables the first system module to communicate with the second system module through the bridge node.
10. The electronic device according to any one of claims 6-8, characterized in that, The internal network port is formed by an OTG analog network card, and the internal network port adopts the NCM protocol to realize Ethernet frame data transmission.