2023_Scale Server Setup.mht
Scale Server Setup: Inbound Com6, Outbound Com4
Steps for Scale Setup
1. Make sure the workstation has a Static-IP-Configuration on the local network and that port forwarding has been configured. (On Client to setup!)
2. Set-up port forwarding in the router (On Client to setup!)
3. Configure firewall to allow ports: 5454 and 5455 on TCP inbound accept default settings (On Client to setup!)
4. If the old scale server was previously installed, use control panel to uninstall or refer below to Uninstall-Server
5. Create C:\scale
6. Copy the Scale Server Setup file to the C:\scale folder just created
7. Right click and select properties click the compatibility tab select run this program as an administrator click apply and then click ok
8. Double-click it, choose “Yes” to install, and “Yes” to start the service
9. Open device manager and note the port of the serial device and make sure it is working properly.
10. Open Putty select serial connection and be sure data is streaming in continuous mode then exit. Putty can be download from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
11. Open Putty again, select “Telnet”, with hostname: localhost port: 5455 hit and open. Telnet Settings
12. Type: create scalename serial - creates the scale where “scalename” can be whatever you want to name the scale to be. Telnet Settings
13. Type: set port COM# - refer to device manager Inbound COM6, Outbound COM4
14. Type: Set Start ## (Where # is the number 1- 100) 4
15. Type: Set length ## (Where # is the number 1- 100) 7
16. Type: listall - Listall demo
17. Refer to procerr to see if any errors are displayed and repeat steps last 3 steps, Set Start## ,Set length ##, listall until procerror has no errors Listall demo
18. Type: Exit and then Exit again
19. In EnCORE, go to Utilities -> Scale Servers to add/configure server
20. Right-click to Add Server… or see Details
21. Give the server a unique name; the same name you configured in putty: “create scalename” where scalename is the unique name
22. Enter the URL or IP address of the server ( the static IP of the computer )
23. Change the Config Port to 5455
24. Change the Output Port to 5454
25. Set CompanyId if you want to use company filtering. Otherwise use -1
26. Close EnCORE and re-open. The scale should now be visible in the scale screen
27. Diagnostics
Static IP Configuration
Open Settings.
Click on Network & Internet.
Click on Ethernet.
Click on the current network connection. ...
Under the “IP settings” section, click the Edit button. ...
Using the drop-down menu, select the Manual option. ...
Turn on the IPv4 toggle switch. ...
Set the static IP address.
Supply subnet mask appropriate for the static IP and your network
Supply the default gateway of the subnet that this static IP resides upon
Verify that IP is assigned to Manual NOT Automatic like both examples below
Configure firewall to allow ports
1. Go to Windows Defender Firewall Settings
2. Click “Inbound Rules”
3. Click “New Rule”
4. Click “Port” radio button and next
5. Make sure TCP radio button is filled in and type “5455, 5454” or the designated port you want it to be and “Next”
6. Allow the connection and “Next”
7. When to apply, Domain, Private, Public can all be checked and “Next”
8. Name is anything recognizable and “Finish”
9. IF YOU WANT TO BE SURE THE PORT IS OPEN RUN THE FOLLOWING IN POWERSHELL
Test-NetConnection -Computername <public IP of customer network> -Port 5454
Disclaimer: The illustration is using a local ip not the correct public ip
If successful the TcpTestSucceeded will be True
Port Forwarding
1. Access the router with the admin rights i. If you need to know how to access the router: Open the command prompt and enter ipconfig /all. The router’s IP address is usually the same as the Default Gateway.
2. Enter your username and password for the router
3. Find the port forwarding section; each router is different ( you can try looking under advanced settings, applications, gaming, virtual servers )
4. Create a custom rule
5. Ports will be 5454 and 5455
6. Type will be TCP
7. Lan or IP address will be the static IP of the Scale computer that you set up
8. Save the settings and close
9. Additional link http://www.wikihow.com/Set-Up-Port-Forwarding-on-a-Router
Uninstall Server
1. Stop the service - Open Services and look for CoreScaleServer
2. From an administrator command prompt, run “sc delete CoreScaleServerV4”
3. Delete the EXE file, the INI file next to it, any log files, and the file called “scales” from the
Program Files folder you copied the executable into.
Device Manager
Most of the time the USB will be listed in the Ports section and the COM4 port will be listed next to it
· If you are not sure if the device is listed, pick it in a section and unplug the device, the manager will refresh instantly and if not shown anymore you know you have the correct device.
If you get a message like the following you need to update your device and the serial to Bluetooth adapter will not work
Putty Serial Connection
Open putty, select the “Serial” radio button and then type in the proper Serial line or com port. Then open and be sure you see scale data streaming and changing constantly. The display can be different as per the scale manufacture but you should see it change by adding weight.
· The service might be blocking the connection not allowing to “open” the connection. If that is the case open services and stop the service and run SSH. BE SURE TO START THE SERVICE AGAIN AFTER CONFIRMATION OF STREAMING DATA
Telnet Settings
HELP in any of the menus will display the following commands
· listcoms this will find all the coms ports
· raw to see output
SSH COMMANDS
config <name> - Configures the scale with the specified name
create <name> <type> - Creates a scale with the specified name and type
delete <name> - Deletes a scale
exit - Disconnects
help - Displays this
list - Lists all scales
quit - Disconnects
save - Saves all scale settings
WHEN CONFIGURING ScaleDevices
exit - Exits scale configuration
get <name> - Gets the value of a property
help - Displays this
list - Lists all available properties
listall - Lists all available properties and their values
listcoms - Lists all COM ports
proc - Displays the processed output of the scale
quit - Exits scale configuration
raw - Displays the raw output of the scale
set <name> <value> - Sets the value of a property
Telnet listall
· The above is an example of the listall and if you notice the first procerr has an error and the second does not after the length is set properly.
· When setting the length you will notice a | bar for the start and length position that will move based on the set start and length. Keep adjusting until you have like the above example: | 1780|LG
Diagnostics
Add any extra helpful information here
· SQL Tables involved are ScaleDevices and ScaleServers. To delete extra servers you must stop the service, connect through SSH and run command delete <name>
. You can then erase it from the 2 tables listed above using delete commands to prevent it from being listed in the future.
1. Make sure their scale ip is whitelisted and that the ports they are using are allowed on the Routeware side and client has our azure ip whitelisted as of 1/6/22 is 20.124.119.232 on their end. You can see what we have as their scale IP and port by going to Encore Utilities-->Management-->Manage Scale servers.
2. Check if ip is communicating from either side with PowerShell command. On management server right click start button hit run power-shell command and enter text below with the scale public IP and the port number its using.
Test-NetConnection -Computername <public IP of customer network> -Port 5454
3. To check and make sure that the scale is actually sending data to the computer (this can rule out a bad cable or short, bad scale etc) Go to services by pressing windows key+r or right click on windows button and click run. Type in services.msc look for and Stop the “Core Scale Server” service and connect through https://routeware.atlassian.net/wiki/spaces/CE/pages/30016634894/Scale+Server+Setup#Putty-Serial-Connection -Serial to see if any raw data is streaming to see if it’s the Scale itself or Serial USB. You should be getting some type of characters showing there, if it's just a cursor they need to check the connection. Make sure you start the Service again when finished!