Mastercam Tech Tips and FAQ's |
HASPs and NetHasps
- What is a HASP?
- Updating the HASP or NetHASP.
- Installing the SIM drivers.
- Network licensing and NetHASP .
- My NetHASP server is running Windows 2003 Service Pack 1, and I can't connect to it. What do I need to do?
- Why do I get a "HASP not found (15)" error when starting Mastercam? I checked, and my HASP is still connected.
What is a HASP?
A HASP is a hardware device that is attached to your computer via a Parrallel or USB port that protects against illegal use of Mastercam software. A single user HASP or network licensing HASP known as a NetHASP is required to run Mastercam and must stay attached to the computer while Mastercam is running. A HASP is sometimes refered to as a SIM.
Updating the HASP or NetHASP
After installing Mastercam X, you need to update your SIM—either a HASP if you are running a standalone Mastercam workstation, or a NetHASP if your SIM contains shared licenses for several Mastercam workstations on a network. Your Mastercam Reseller will give you the necessary update code:
- HASP users will receive a file with a .HCode extension.
- NetHASP users will receive a file with a .NHCode extension.
Click on the links below to see instructions for entering the update codes.
The following table lists the specific programs used to update HASP components:
| Program | Location | Used for... |
HASP X |
c:\mcamx\haspx.exe | Updating the HASP code for a standalone Mastercam workstation. |
NetHASP X |
c:\mcamx\nhaspx.exe | Updating the HASP code for a NetHASP installed on a NetHASP server. |
HASP Setup |
c:\mcamx\common\HASPUserSetup.exe | Installing HASP drivers if they need to be manually installed or reinstalled. |
Installing the SIM drivers
The Mastercam X installation program automatically installs the drivers for the HASP and NetHasp. Follow these steps if they need to be reinstalled.
- Start the HASPUserSetup.exe program. Click Start, Programs, Mastercam X, Hasp Setup .
- Set the SIM type to NetHASP .
- Click Next as needed to continue with the installation.
- The message HASP HL Drivers successfully installed will display when you re completed.
Network licensing and NetHASP
With network licensing, a group of Mastercam users who are all connected to the same network can run Mastercam from any PC on the network. Instead of requiring one HASP per computer to run Mastercam, a single NetHASP is installed on any PC on the network. That computer is referred to as the NetHASP server. Even though it is called the NetHASP server, it does not need to be configured as a network server. It can be any PC or workstation on the network, whether or not Mastercam is installed on it.
Although NetHASP supports most networks, CNC Software, Inc. tests and supports its use only with Windows XP or Windows 2000 in a TCP/IP network environment. Click on any of the following topics to learn more about installing and configuring NetHASP.
- Configuring the NetHASP server
- Configuring the Mastercam client workstations
- Using the nethasp.ini file
- Managing licenses with command line switches
- Registry keys used by NetHASP
For more information, please read the document Mastercam Network Licensing.doc . For sophisticated NetHASP applications, several powerful and easy-to-use diagnostic and management tools are available from Aladdin Software . These will help you search for and identify NetHASP servers, configure NetHASP for non-TCP/IP networks, and generate .ini files.
My NetHASP server is running Windows 2003 Service Pack 1, and I can't connect to it. What do I need to do?
A. You most likely have the Windows Firewall enabled. If you are using the Windows Firewall, you need to create an exception for the NetHASP license manager service. To add the service as an exception, follow these steps:
- Go to the Windows Control Panel, and Select the Windows Firewall.
- Selection the “Exceptions” tab in the Windows Firewall:
- Click the “Add Program” button and add the following program: “c:\windows\system32\nhsrvice.exe”.
- Click OK to close the Add Program Dialog.
- Click OK to close the Windows Firewall Dialog.
You should now be able to access your NetHASP.
Why do I get a "HASP not found (15)" error when starting Mastercam? I checked, and my HASP is still connected.
If you receive this or a similar message,
you probably still have a HASP 3 SIM. Mastercam X will only run with a HASP 4. It is possible to update the HASP 3 with your new X code, but Mastercam X will not run. If you think this is happening to you, visit www.simswap.com and download the HASP verification utility. If it determines that your current SIM is indeed a HASP3, then continue filling out the form at the simswap site, submit it, and a new HASP4 will be sent no charge. If the HASP belongs to an international customer, the new SIM will be sent to the reseller.
Updating a HASP
Follow these steps to update a standlone HASP to run Mastercam X. Perform these steps after installing Mastercam X. Click here to see instructions for a NetHasp.
- Start the HaspX.exe program. Click Start, Programs, Mastercam X, Hasp X .
- Check the Serial number field. It should show the serial number of the SIM attached to your computer. Click here if 0 is displayed.
- Check the message in the status area at the bottom of the dialog box. It should display HASP found . Click here if it does not.
- Click the Update code button and select the .HCode file for the SIM attached to your computer. Typically, this file will be supplied to you by your reseller. The update code will display in the dialog box.
- Click the Update button at the top of the dialog box to update the SIM with the code.
- Check the message in the status area. It should read, HASP#nnnnnn updated successfully, where nnnnnn is the serial number of your SIM.
- Click OK to exit.
Updating a NetHASP
Follow these steps to update a NetHASP to run Mastercam X. Perform these steps after installing Mastercam X. Click here to see instructions for a standalone HASP.
- Start the NHaspX.exe program. Click Start, Programs, Mastercam X, NHasp X .
- Set the SIM type to NetHASP .
- Set the Mode to Local .
- Check the Serial number field. It should show the serial number of the SIM attached to your computer. Click here if 0 is displayed.
- Check the message in the status area at the bottom of the dialog box. It should display Local NetHASP-nn found , where nn is either 20 or 50 . Click here if it does not display this message.
- Click the Update code file button and select the .NHCode file for the SIM attached to your computer. Typically, this file will be supplied to you by your reseller. The name and path of the update code file will display in the dialog box.
- Click the Update button on the right side of the dialog box to update the SIM with the code.
- Check the message in the status area. It should read, NetHASP-nn updated successfully, where nn is either 20 or 50.
- Click OK to exit.
Configuring the NetHASP server
Follow these steps to set up the NetHASP server for Windows XP or Windows 2000.
- Connect the NetHASP to the computer you want to use as the NetHASP server. Connect it to either a parallel or USB port based on the NetHASP type.
- Insert the Mastercam CD-ROM Disk 2 into your CD drive. Use one of the following methods to start the Mastercam installation procedure:
- If your computer is set up for Autorun, the Mastercam installation program opens automatically.
- Navigate to the CD drive and double–click Setup.exe .
- Choose Install Mastercam X2 .
- Choose Install Optional Products from the installation menu.
- From the Mastercam X product menu, choose Install Nethasp Server . Follow the onscreen instructions and choose Finish to exit when the installation is complete. If you wish, you can also install other Mastercam products, but this is not required for NetHASP.
- From the NetHASP server directory (typically c:\NetHaspServer ), run haspdinst.exe . This installs the NetHASP drivers, allowing NHaspX.exe to recognize the NetHASP.
- Use the nhsrv.ini file to configure the license manager. This file allows the network administrator to specify which computers are served by the NetHASP server.
- Mastercam recommends that you install the License Manager as a service. To do this, run lmsetup.exe . Note that Administrator privileges may be required to add a service.
- If you do not install the License Manager as a service, you must manually run the Aladdin NetHASP License Manager for Win 32 utility ( nhsrvw32.exe ). You can add this utility to Windows Startup so it will load automatically when Windows runs. However, you will be required to log in during startup.
- Use the NHaspX.exe utility to check available Mastercam licenses.
Although the NetHASP server must be connected to the network, in Windows 2000, the account that runs the NetHASP License Manager does not need to be logged in to the network.
Configuring the Mastercam client workstations
Follow these steps to configure each Mastercam workstation to use the NetHASP.
- Install Mastercam X.
- Run NHaspX.exe . Set the SIM type to NetHASP and choose one of the following Mode settings:
- If the PC is not the NetHASP Server, choose Network .
- If the PC is also used as the NetHASP Server, choose Local .
- Copy a properly configured nethasp.ini file to your main Mastercam directory (for example, c:\mcamx). This is not required, but is strongly recommended for optimum performance. Click here to learn more about configuring the nethasp.ini file.
- Create or edit shortcuts for running Mastercam with command line switches to efficiently manage your licenses. Click here to learn more.
NetHASP drivers are automatically installed when you install Mastercam. If the installation procedure was not completed or if the NetHASP drivers were removed, Mastercam cannot recognize the NetHASP. To fix this problem, run haspdinst.exe from the Mastercam \common directory (for example, C:\mcamx\common).
Using the nethasp.ini file
Mastercam uses the nethasp.ini file to store information about your network and the location of the NetHASP server. It should be copied to the main program directory where Mastercam X is installed; for example, c:\mcamx. You are not required to have this file; however, if you do not, when Mastercam starts and checks for network licenses, it requires extra time to search all the workstations on the network for the NetHASP server. If all available licenses have been checked out by other Mastercam users on your network, it may take an especially long time. A properly nethasp.ini file virtually eliminates this delay.
To configure nethasp.ini for a TCP/IP network, follow these general steps.
- First, in the NH_COMMON section, select TCP/IP by including the line NH_TCPIP=Enabled. If your nethasp.ini file includes sample lines for several protocols, remove the comment characters from the TCP/IP line and make sure other protocols are commented out.
- Then, in the NH_TCPIP section, enter the address of your NetHASP server or servers. You can enter the addresses of as many servers as you need. Enter the addresses in either IP or URL format.
- Finally, select the proper packet type—either TCP or UDP—and specify whether or not you want messages broadcast.
Follow the sample shown here as a guide.
[NH_COMMON]; This NetHASP.INI file is configured for TCPIP.
; Please note that you will have to enter the address of the
; NetHASP key station:
;; NH_IPX = Enabled ; sample lines for other protocols are commented out
;; NH_NETBIOS = Enabled
NH_TCPIP = Enabled ; use TCP/IP
[NH_TCPIP]
NH_SERVER_ADDR = 192.168.176.1, 192.168.176.5 ; these values are sample addresses
; Enter the IP addresses of all the NetHASP servers
; (License Managers) you want to search.
; Unlimited addresses are possible.
; Possible address format examples:
; IP address: 192.114.176.65
; Local Hostname: ftp.aladdin.com
NH_TCPIP_METHOD = TCP
; Send a TCP packet or UDP packet
; Default: UDP
NH_USE_BROADCAST = Enabled
; Use TCP/IP Broadcast mechanism.
; Default: Enabled
You can also download the Aladdin Diagnostix software utility from Aladdin Software . You can use this tool to automatically create .ini files. This same page includes more sample .ini files for different network configurations.
Managing licenses with command line switches
Mastercam X lets you request specific product licenses from the NetHASP by using command line switches when you start Mastercam. Earlier versions of Mastercam had separate program files for each product type, such as Mill9.exe, Lathe9.exe, and so on. Checking out different Mastercam product licenses often required you to exit and restart a different Mastercam program. In Mastercam X, all products are run from Mastercam.exe. Product licenses are checked out at startup and then exchanged each time you choose machine definitions for different machine types (Mill, Lathe, Router, Wire). This flexible structure allows NetHASP licensing to be dynamically allocated.
If you start up Mastercam X without using command line switches, Mastercam first checks out a Mastercam Design license, if one is available. If not, it checks out the highest level license available for Mill, Lathe, Router, or Wire to ensure that a product-level license is allocated. When the active machine definition changes to a machine type (Mill, Lathe, Router) that is different from the current product license, the current license is released and a product license matching the active machine is checked out.
For example, to create a shortcut that checks out only Level 1 licenses when a Mill, Router, or Lathe machine type is selected, add the following command line switches to your Mastercam shortcut:
/M1 /R1 /L1
Note: Make sure to separate each line switch with a space.
To edit your shortcut, right-click on the Mastercam icon on your desktop and choose Properties . Add switches to the Target field as shown in the picture. Click here to see a complete list of command line switches.
Registry keys used by NetHASP
NHaspX.exe writes to, and reads from, several registry keys.
Type of SIM
The NHaspX.exe utility records the type of SIM in the following key:
HKEY_CURRENT_USER\Software\CNC Software, Inc.\Sim type
The value can be either H for a regular HASP or N for the NetHASP. Each Mastercam user must have read and write permission to this part of the registry.
When Mastercam is installed, numerous entries are written to the HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE. If the user running NHaspX.exe has permission to write to HKEY_LOCAL_MACHINE, NHaspX.exe also updates this key with the SIM type information.
NetHASP mode
The NetHASP mode is stored in the following key:
HKEY_CURRENT_USER\Software\CNC Software, Inc.\NetHASP mode
The value can be either Network or Local .
Mastercam X command line switches
Use these command line switches to control which NetHASP licenses will be requested from the NetHASP server when Mastercam X is started. You can combine switches from several products in the same command line. For example, you can configure the command line to request a Mill Entry and Lathe Level 1 license by simply including both switches. Click here to learn more about using command line switches to manage licenses.
| Mastercam X command line switches | |
| Mastercam X2 Design | |
/D |
Design only (requires a stand-alone Design license). Use this switch if you want to load a part that contains toolpaths but do not want to check out a Mill, Lathe, or Router license. |
| Mastercam X2 Mill | |
/ME |
Mill Entry |
/M1 |
Mill Level 1 |
/M2 |
Mill Level 2 |
/M3 |
Mill Level 3 |
/noM |
Disable Mill |
| Mastercam X2 Lathe | |
/LE |
Lathe Entry |
/L1 |
Lathe Level 1 |
/noL |
Disable Lathe |
| Mastercam X2 Router | |
/RE |
Router Entry |
/R1 |
Router |
/R2 |
Router Plus |
/R3 |
Router Pro |
/noR |
Disable Router |
| Mastercam X2 Wire | |
/WE |
Wire Entry |
/W1 |
Wire |
| Mastercam X2 Art | |
/A1 |
Art Entry |
/A2 |
Art Level 1 |
/noA |
Disable Art |
| Add-on products | |
/S |
Solids (for Mill, Lathe, Router, Wire, or Design) |
/noS |
Disable Solids |
/C5 |
Curve/Drill5ax (Mill Level 1 or Level 2) |
/noC5 |
Disable Curve/Drill5ax |
/V5 |
Verify 5-axis |
/noV5 |
Disable Verify 5-axis |
/X5 |
Multi-axis add-on |
/noX5 |
Disable Multi-axis add-on |
| HASP and Net HASP | |
/N |
Use the NetHASP over the network instead of locally; overrides the stored setting. |
/NL |
Use the NetHASP locally instead of over the network; overrides the stored setting. |
/H |
Use a local HASP instead of a NetHASP' overrides the stored setting. |
| Miscellaneous | |
/noREM |
Suppresses the dialog box that requires user intervention. |
Copyright ©2005 Caledonian Cadcam, All Rights Reserved.

