Using EPGW to Share Mobile devices Across a Network
// ThIS WAS A LINKED PAGE FROM ANOTHER ARTICLE. MAYBE WE CAN DELETE IT OR REPLACE IT WITH A DISCUSSION OF PCS?
At the time of writing (May 2023) there is a clunky way to use EPGW to mirror the functionality of the classic gateways (Android Gateway and iOS Gateway) whereby a dedicated machine can be used to connect to multiple devices and can be accessed by multiple users.
blue book Instructions
If iOS devices are to be hosted, install EPF. NOTE: This is needed because EPGW requires EPF to be installed in order to operate with iOS devices. EPF is NOT actually used and does not need access to a valid licence, so an EPF licence is NOT consumed.
Install the CLI version of EPGW. See the Install Eggplant Gateway documentation page.
NOTE: If the Machine hosting the device already has EPF (22.5+) you can CD into the following location in order to use the below EPGW commands.
Mac
cd /Applications/Eggplant.app/Contents/Resources/epgw
Windows
cd C:\Program Files\Eggplant\Eggplant.app\Resources\epgw
Use the relevant epgw add command (e.g. for Android, for iOS) to configure a connection for each device.
For example:
./epgw add iOS --name iPhone12 --provisioningProfile /Users/nwheeler/Documents/EPGW/EPGWSUPShared.mobileprovision --developerCertificate ~/Documents/EPGW/EPGW_Certificate.p12 --developerCertificatePassword myPwd123 --developerDiskLocation /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Use the epgw vnc command with the --vncPort, --webDriverPort and --host options to start a connection for each device.
--vncPort: the port for the VNC connection (use 0 to auto-assign, or specify a fixed value)
--webDriverPort: the port for the WebDriver connection (use 0 to auto-assign, or specify a fixed value)
--host: allows incoming traffic from machines other than the localhost (use 0.0.0.0 to allow traffic from any machine, or specify a domain to allow traffic from machines from that domain only)
For example:
.\epgw vnc iPhone12 --vncPort 0 --webDriverPort 0 --host 0.0.0.0
EPF users on remote machines can then create EPF connections to the devices attached to the communal machine using the IP address of the communal machine and the relevant port number assigned to the device.
You cannot use EPF on the communal machine to create the connections as this will only allow traffic from localhost. Additionally, ports are auto-assigned by EPF and are not exposed to the user in the UI so determining which ports have been assigned to each device would be cumbersome.
The above process will be simplified in due course. The development team is already looking to improve the mechanism in a number of ways, including the provision of a web-based user interface similar to that employed by Android Gateway.