Contact a Clearing Member (CM) like IL&FS and submit the application for custodial participant (CP) code.
The Clearing Member request the National Securities Clearing Corporation Ltd. (NSCCL) to allot a CP code in respect of client for which the member would be carrying out clearing and settlement.
Clearing Member share the custodial participant (CP) code with you.
Open the NRI trading account with your choice of broker and provide them the CP code.
The broker will use the CP code for all your trade settlements.