Code Snippets 1.x
Certificate Management
Handling the certificate is a bit different depending on what type of programming language you are using. Here are some code examples that can help you to get started quicker.
In most platforms we either “override” the common name with a generic one, or disable hostname verification, because the cert is self-signed and the device runs on the LAN we cannot match the hostname with the IP-address of the terminal.
UDP Broadcast
During testing on a Windows machine our Windows firewall was blocking the messages, you need to whitelist the application for it to work. Also, when we did not close our debug process properly the connection stuck in Windows so when we tried re-starting it, we got an error saying that the port was busy. We solved this by running netstat -ano|findstr 8000 to find the PID of the process and then tskill \<PID> to manually terminate it.
Broadcast example
Broadcast message
The message from the terminal will look like this and will have all the information needed for you to configure your application.
"WORLDLINE_TERMINAL": {
"v0": {
"terminalId": "182837313011101003287575",
"identity": "47084495",
"ipAddress": "10.232.130.102",
"port": 443,
"protocolType": "EcrRestApi",
"protocolVersion": "1.0.0",
"commonName": "wl-samport-terminal-server-v1"
},
}