Configure TCP/IP over USB with internet sharing

This guide shares a host's internet connection with a PAX terminal over USB, and covers giving the terminal internet over Ethernet. For the overall picture — topology, ports, and the terminal-side setup — start with Connect your terminal to your POS.

Step 1: Enable the USB network on Terminal

  1. Open NTMS Agent, which holds all USB configuration.
  2. Go to Advanced settings and enter the password 4315.
  3. Open USB Mode Settings, select USB-PC (RNDIS reverse) or USB ECM-HOST tethering, and save. This is what makes the terminal able to communicate with POS.

Note

USB-PC (RNDIS reverse) is compatible with Windows and Linux OS.

USB ECM-HOST tethering is working exclusively on Linux OS.

Affichage de image.png

 

Note

The terminal IP and the host USB-adapter IP must sit in the same subnet, with the host acting as the terminal's gateway. The defaults values are: 

  • IP — the address the terminal will hold on the USB link (default 192.168.42.129).
  • Netmask255.255.255.0.
  • Gateway — the IP you will give the host's USB adapter (192.168.42.1).

Set up the USB (RNDIS) connection for Windows (Linux here)

USB tethering (RNDIS) gives a reliable, low-latency link. These steps share your computer's internet connection with the terminal over USB.

Step 1 — Configure your computer

Open the Network Connections window (Start → type View network connections, or Control Panel → Network and Internet → Network and Sharing Center → Change adapter settings). A new connection appears — here, Ethernet 3:

New network connection

Right-click the connection that has internet access, open Properties → Sharing, and share it with the payment terminal connection. Here, NVP_OPT has internet access:

Share internet connection

Select the payment terminal RNDIS connection:

Select RNDIS connection

Open the RNDIS connection's Properties → IPv4 and configure it with the static IP 192.168.42.1, netmask 255.255.255.0. This address is the gateway you set on the terminal during terminal-side setup.

Configure static IP
Terminal connection configured

The terminal now has internet access.

Step 2 — Make internet sharing persistent

Keep the shared connection working after the computer reboots. Open Windows PowerShell with administrative privileges:

Open PowerShell as administrator

Run (this is a single command):

New-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\SharedAccess -Name EnableRebootPersistConnection -Value 1 -PropertyType dword

Then set the Internet Connection Sharing service to start automatically:

  1. Open Services (Start → Services, or Windows + RServices.msc).
  2. Open the Internet Connection Sharing (ICS) service.
  3. Set its startup type to Automatic.
Set ICS service to Automatic

Note

For full instructions, see RNDIS — Sharing of internet connection with a payment terminal on Windows 10.pdf in the Attachments at the end of this article.

Set up the USB (RNDIS) connection for Linux

This guide shares a Linux host's internet connection with a PAX A35 terminal over USB, so the terminal can reach Market Pay through the host. The examples use Ubuntu; the commands apply to any Debian-based distribution. For the overall picture — topology, ports, and the terminal-side setup — start with Connect your terminal to your POS.

Note

The terminal must already be switched to USB-PC (RNDIS reverse) mode. Run all the commands below with sudo or as root.

Phase 1 — Prepare the connection

Step 1 — Identify the interfaces

Connect the A35 to the host by USB. Run ifconfig and note two interfaces:

  • usb0 — the new virtual NIC that bridges to the A35.
  • Your active internet interface — for example wlp0s20f3 for Wi-Fi, or an eth* / enp* name for wired.

Warning

Interface names vary by machine. wlp0s20f3 is only an example. Substitute the real name of the interface that has internet access wherever it appears below.

Step 2 — Disable auto-connect on the USB interface

In the Ubuntu desktop, stop NetworkManager from managing the USB link so it doesn't fight your manual configuration:

  1. Open Wired Settings for the USB virtual connection.
  2. Turn off Connect automatically.
  3. Apply the change, then drive the interface from the terminal with the commands below.

Phase 2 — Configure network routing

Step 3 — Enable IP forwarding

Let the host route traffic between interfaces:

sysctl -w net.ipv4.ip_forward=1

Step 4 — Configure NAT with iptables

Masquerade the terminal's traffic behind your internet interface. Replace wlp0s20f3 with the interface that has internet access:

iptables -t nat -A POSTROUTING -o wlp0s20f3 -j MASQUERADE

Step 5 — Assign the USB interface IP

Give usb0 the gateway address the terminal routes through:

ifconfig usb0 192.168.42.1

This 192.168.42.1 must match the gateway you set on the terminal, so the A35 (default 192.168.42.129) can route its traffic through the host.

Note

The sysctl, iptables, and ifconfig commands are runtime-only and are lost on reboot. To persist them, add a static block to /etc/network/interfaces (or a systemd/startup script), and set net.ipv4.ip_forward=1 in /etc/sysctl.conf.

Verify the connection

Once the host is configured, confirm the terminal has internet from the Pay On Site Diagnosis screen — see Verify connectivity in the main guide.

Next steps