PC/SC Reader List change event

When a PC/SC reader is added to, or removed from the system, the list of PC/SC readers changes.

The SpringCard Companion Service then broadcast an event to all WebSocket clients, to notify the change.

Event specification

event : Pcsc.Readers.ListChange

params : an object containing two arrays:

  • The Names array contains the list of PC/SC reader Names.

  • The ReaderIds array contains the list of ReaderId for all PC/SC readers.

Both arrays have matching indexes, i.e. the first Name corresponds to the first ReaderId, and so on.

When this event arrives, the application shall invoke the GET /pcsc/readers route from the REST API to retrieve the new list of readers, together with their state.

Alternatively, it may use the pcsc.readers method of the WebSocket for every reader present in the list.

Example

{
	"jsonrpc": "2.0",
	"event": "Pcsc.Readers.ListChange",
	"params":
	{
		"Names":
		[
			"SpringCard Prox'N'Roll Contactless 0",
			"SpringCard Prox'N'Roll Contactless 1"
		],
		"ReaderIds":
		[
			"6aiBfYtd_3vVQMrj-EqhRg",
			"OSaSdZIqWslpzqsFb2iSBA"	
		]
	}
}