SylixOS and hardware device connection problems - hardware device serial port, network port connection problem

  1. Introduction to the problems in the connection between SylixOS and hardware devices
    In general, users can communicate with hardware devices through serial ports and network ports. This chapter will introduce how to obtain the local IP for communication in a special case.
    The IP addresses of hardware devices under SylixOS are generally changeable, and sometimes users forget their own modified IP addresses. Under normal circumstances, users can connect through the serial port and use the corresponding shell commands to obtain the local IP. But some devices do not have a serial port, or the serial port is occupied, what should I do?
  2. Solution to
    the problem 2.1 The problem of
    serial port occupation There are many ways of serial port occupation. The following introduces a common problem and the corresponding solution.
    In the i.MX6Q experimental box, you can set the boot-up self-starting program in startup.sh. Set it to run in the foreground during setup, as shown in Figure 2.1. After the device is powered on, the serial port will always be occupied, and the device cannot be connected through the serial port at this time. As shown in Figure 2.2.

    Figure 2.1 Set up self-starting

    Figure 2.2 Serial port cannot be connected
    In response to this situation, you can connect to the device through the network port, and then stop the running of the self-starting program in the device. As shown in Figure 2.3.

    Figure 2.3 Stop running
    the self-starting program after booting Or add "&" to the self-starting program after starting the self-starting file and modify it to the background running mode. After restarting the system, you can connect the hardware device through the serial port.
    2.2 The serial port is occupied, and the IP is unknown.
    Also refer to the example in 2.1. The program starts running in the foreground after booting, the port is occupied, and the specific IP address of the device segment is not known (the network segment and other information are known), so it cannot connect to the hardware device.
    How to realize the communication with the hardware device in this case? Here to introduce two very useful IP search software: Netscan and IPscan. Here, we will introduce the usage and results of one of IPscan. As shown in Figure 2.4, the search range of IP addresses is defined, and the approximate IP address can be determined from the search results by information such as the manufacturer.

    Figure 2.4 Searching for device IP
    is shown in Figure 2.4. The IP address of the hardware device is: 192.168.2.100, connect through the network port at this time, and close the process through the shell command, or add "&" to the boot self-start program in the boot-up self-start file to change it to background running mode, After restarting the system, you can connect the hardware device through the serial port.

  3. Summary
    In the usual design and development process, there will be various unforeseen problems. Cleverly solving these problems through the system's own tools and some small tools can greatly reduce the various problems in the development process.

  4. Reference materials
    "SylixOS Application Development Manual"
    "RealEvo-IDE User Manual"

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325942985&siteId=291194637