Programmatically change Edgeport 8s interfaces?

Is it possible to configure the RS interface for an Edgeport 8s using custom software e.g. using an API?

Thanks.

Hello,

Exactly what kinds of settings are you looking to configure?

Am I correctly understanding that you’re looking to use your own software instead of the Edgeport Configuration Utility GUI?

Hi,

Yes, that’s correct. Our software runs on a tenAsys INtime RT kernel and needs to communicate using a combination of RS422 and RS232 interfaces. To do this, the controller is “handed over” to INtime and is no longer be detected by Windows. So we need to be able to configure the interfaces without using the Edgeport Configuration Utility GUI.

Sorry, to continue… we need to be able to change the interface type (RS232, RS422) but are not able to use the Utility GUI. Is this possible?

To my knowledge, the only way to do this would be by manually modifying some registry entries. That’s essentially what the Edgeport Configuration Utility is doing when you use it to make changes. If that’s something you have the capability of doing, let me know and I can give you further details, i.e. what keys to modify, and what values they accept, etc.

Editing the registry is the only way I would know how to do it without using the GUI.

If this doesn’t work for you, be aware that it may also require a disconnect/reconnect of the Edgeport USB in order for the changes to take place (another step the GUI may be performing in software that you may not realize is forcing the EP to come off and back on the bus).

OK, thanks. Will give it a try.

The “Port Flag” settings, such as the RS-232/422/485 signal mode setting for software-selectable Edgeports, are stored in the registry. When those settings are changed by using the Edgeport Configuration Utiltiy (edgeport.exe), that utility changes the value(s) of the related key(s) in the registry. So, if you want to bypass edgeport.exe then your software needs to directly change the same value(s)/key(s).

Port Flags are stored as a 32bit binary value in:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EdgeSer\Parameters\Vxxxxxxxx-x\PortFlags

The first four bytes are for the first set of COMs, the second four bytes are for the second set of COMs (when dealing with a 4 port Edgeport, for example).

BYTE 1 is a bit mask for the first two check boxes. (01= first checkbox checked, 02= second checked, 03= both checked).

BYTE 2 is a bit mask for the last check boxes. (01=3rd checked, 02=4th checked (fastwrites), 10=5th checked, 04=6th checked, 08=7th checked, +plus any combo of those (so if 6th and 7th checked = 0x04 + 0x08 = 0x0c, so value would be “0C”).

*** BYTE 3 is the byte that you would be interested in. *** BYTE 3 is the 0 based INDEX for the combobox which describes if that port on a “Selectable” EP is RS232, RS422Term, plus lots of other various 485 options. (Range: 0x00 (“rs232”) - 0x0A (“485,FullDup,MiddleUnit,Slave”)

BYTE 4 is a placeholder (byte not used).

P.S. We plan to release a command-line version of edgeport.exe when the next Edgeport driver is released, which should be in a few months, and that should make this kind of configuration easier. Until then, this is the best suggestion that we have.

Has the command line version of edgeport.exe ever been released?

Not yet, it should be in a couple of months. I suggest “Subscribing” to the Edgeport driver, so you will be notified when it’s updated. To do that, go to www.digi.com then click Support/Drivers and select Edgeport USB. Then select either of the Edgeports (under Active Products). Then select your Operating System from the dropbox at the bottom, and you should see the links to the .exe and .zip versions of that driver. Click the “Subscribe” link next to one of them and follow the instructions from that point on.