KB-30475: Changing a driver’s IP and communication port at run time.

Question:

How can I change a driver’s IP address and communication port at run time via Elipse E3?

Solution:

Both the IP address and the communication port are parameters in the IOKit, the shared component used by Elipse’s I/O drivers. This component implements the default access to the physical level and enables interfaces to serial ports, modems, ethernet, and RAS.

To edit them, you must create three tags (you can use TagBrowser to browse these tags directly from the IOKit, inside folder IOKit\Parameters):

  • IO.Ethernet.MainIP: contains the IP address.
  • IO.Ethernet.MainPort: contains the port address.
  • IO.WorkOnline: sets the driver as OffLine/OnLine

Via scripts, use this tags to set the driver as OffLine, change IP and port addresses, and then set the driver back as OnLine.

Example:

Application.GetObject(“Driver1.[IO.WorkOnline]”).Value = 0
Application.GetObject(“Driver1.[IO.Ethernet.MainIP]”).Value = “192.168.8.19”
Application.GetObject(“Driver1.[IO.Ethernet.MainPort]”).Value = 502
Application.GetObject(“Driver1.[IO.WorkOnline]”).Value = 1

For further information, see Elipse IOKit’s Manual.

Anexos:

ID1273.zip

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *