PC/SC on Linux and Mac OS X with Mono

Introduction

One the goals of the Mono project is to make Microsoft .NET applications runnable on Unix systems. Using Mono, it is therefore now possible to maintain a single C#/.NET code base, that runs on Linux, Mac OS X and Windows.

In this context, SpringCard’s PC/SC SDK (https://www.springcard.com/en/download/find/file/pcsc-sdk) has been updated, so that it now enables developers to write PC/SC applications in C#/.NET, that can execute on Windows, as well as on Linux and Mac OS X platforms.

Read More

SCardSniffer spies the exchanges between a PC/SC application and the card readers

SCardSniffer is a new tool used to spy the exchanges between Windows applications and the smart cards or NFC tags that are accessed through a PC/SC reader (or coupler).

SCardSniffer
SCardSniffer main window

On a Windows computer, all card-aware applications communicate with smart cards or NFC tags through the system’s PC/SC library, winscard.dll.

Read More

SpringCard PC/SC solution for Android has been released

SpringCard R&D team is proud to release a simple software solution to add support for SpringCard USB PC/SC Couplers to Android tablets (or smartphone).

nexus9-with-springcard-pcsc-reader

A Nexus 9 Android tablet, with a SpringCard Prox’N’Roll PC/SC reader on the USB port, and a Desfire contactless smartcard

The software is made of two parts:

googleplaystore

The SpringCard USB PC/SC Service’s page on Google Play store

This software suite is compliant with all SpringCard USB PC/SC Couplers, for instance SpringCard Prox’N’Roll PC/SC, Prox’N’Roll HSP PC/SC, TwistyWriter HSP, CrazyWriter HSP, CSB HSP… Note that the current version of the Service and Library allows to work only with the Coupler’s contactless slot. Don’t hesitate to contact us if you have an interest into addressing the smartcard / SAM slots of the Couplers.

To communicate with a USB PC/SC Coupler -which is basically a USB device, the Android tablet (or smartphone) must provide a USB Host stack. This should be the case of all tablets running Android 3.1 and higher. We recommend Nexus 7 and Nexus 9 tablets, running Android 5.0 or 5.1, which are the reference platforms we use to develop and test the solution. An adapter cable is required to connect the Coupler if your tablet doesn’t provide a full-size USB host connector.

usb-adapter-for-tablets-proxnroll

The USB adapter to use a SpringCard USB PC/SC smartcard reader with a tablet featuring only an USB on-the-go (OTG) mini type B female port

Tip: if you’re not sure whether your tablet supports USB Host or not, just install the Service and the Demo application from Google Play, and check that your SpringCard Coupler is correctly activated by your tablet’s system. Remember that the Coupler will be powered by the tablet’s battery. Some tablets could be powered (by their mains adapter) even when an USB device is present, but most don’t; choose your tablet accordingly if you’re designing a kiosk or public-use system that should be mains-powered 24/7).

Icon of the SpringCard PC/SC Service for Android

Icon of the SpringCard PC/SC Service for Android

To develop your own application using a SpringCard Coupler from Android, download the library (and the sample Demo application) from GitHub, and follow the Quick Start Guide (ref. SpringCard PMD15240) which is included in the GitHub project, or available directly here.

github

The SpringCard SDK for PC/SC on Android is an open-source project hosted on GitHub

We welcome your feedback!

 

scpcsc_feed completes MultiConf

scpcsc_feed is a command-line utility for Windows which is a companion-tool for MultiConf in case you need to configure numerous SpringCard PC/SC couplers in batch mode, or change the settings quickly without a needing a full-featured GUI.

scpcsc_feed is available at https://files.springcard.com/pub/scpcsc_cfg.zip. Just unzip the archive in the folder you want, and open a command prompt (cmd.exe) in this folder to use the tool from the command line.

Connect a SpringCard PC/SC coupler to your computer, and invoke scpsc_feed without any parameter to see the integrated help:

C:\springcard>scpcsc_feed
SpringCard -- scpcsc_feed
-------------------------
Read/write data in the non-volatile memory of a SpringCard PC/SC Reader

Build : Apr 15 2015
Copyright (c) 2010-2013 Pro Active SAS, France
Go to www.springcard.com for information and updates.

Connected through PC/SC.
Connected, device : SpringCard Prox'N'Roll HSP 2.00 [1]
Firmware features : 0073232F

Usage: scpcsc_feed -d            dump configuration registers
scpcsc_feed -r XX         show value of register XX
scpcsc_feed -s XX=YYYY... write register XX with value YYYY...
scpcsc_feed -e            erase all configuration registers
scpcsc_feed -sf FILE      write register(s) from config FILE
scpcsc_feed -t XX=YYYY... set temporarily register XX with value YYYY...
scpcsc_feed -tf FILE      set temporarily register(s) from config FILE

C:\springcard>

A few interesting commands

Read-back the current configuration

scpcsc_feed -d

Restore the factory configuration (blank all registers)

scpcsc_feed -e

Apply the configuration from a MultiConf project

scpcsc_feed -sf [file.multiconf]

New firmware for all SpringCard PC/SC couplers based on the H663 core

SpringCard has just released a new firmware version, tagged 2.00, for its H663 core.

The H663 core is a versatile contactless+contact module, which supports virtually all proximity/RFID HF chip cards (ISO 14443 & ISO 15693 standards, including Mifare, Calypso, etc), NFC-enabled mobile phones or other objects (ISO 18092, peer-to-peer in initiator mode, passive communication scheme), and could also accept up to 5 contact smartcards (ISO 7816, one ID-1 card and up to 4 SIM/SAM ID-000 cards).

SpringCard H663 is the foundation of the largest family of RFID/NFC USB PC/SC readers on the market:

  • The H663S and H663A “bare” modules (designed respectively for either a Symetrical – balanced or an Asymetrical – unbalanced antenna)
  • The H663-USB OEM PC/SC ready-to-use contactless coupler (H663 core + antenna)
  • The CrazyWriter HSP, a complete multi-slot contactless+5 contact PC/SC coupler made for OEMs
  • The TwistyWriter HSP, a contactless+ID-000 PC/SC coupler made for OEMs
  • The CSB HSP, a desktop PC/SC coupler featuring contactless, 1 smartcard slot and 3 ID-000 slots
  • The Prox’N’Roll HSP, a brand new version of SpringCard’s best selling desktop contactless coupler.

This new firmware version provides only a few new features, but introduces a new software architecture based on FreeRTOS which dramatically increases the device’s performance for a better transaction time – particulary when accessing numerous slots in the same transaction.

freertos

How to upgrade

To upgrade your H663-based product with this new version, please refer to our H663/H512 Firmware Upgrade Procedure.

The 2.00 firmware file is here: uc3b0256_rc663_h663_2-00.hex

(note for future readers: please always use the latest firmware version using this permanent link).

From 30/04/2015, all H663-based products will ship with this version (instead of earlier 1.81).

Some new feature

Adding the reader’s serial number to the slot names under Windows

Starting with version 2.00, the H663 family is able to insert the reader’s serial number in the name of the PC/SC readers as exposed by Windows’ SCardListReaders API call. On machines with numerous readers attached, this makes it possible to know which physical reader is actually bound to a logical slot without querying the reader through a SCardControl call.

To enable this feature, download the latest version of MultifConf; create a new project for the H663-product you own (CrazyWriter HSP typically), and in this project scroll down to “Misc. tricks”. Then find the “Insert the serial number in the name of the slots” entry and turn it ON. apply the configuration to the reader(s) (Project -> Write Configuration into Reader), restart the reader, and enjoy!

multiconf-h663-tricks

 

 

Using Mifare Classic EV1 with SpringCard PC/SC readers

NXP has recently started shipping a new generation of Mifare Classic chips, called Mifare Classic EV1 (part numbers MF1S50yyX/V1 for Mifare Classic EV1 1K and MF1S70yyX/V1 for Mifare Classic EV1 4K).

The chips are 100% compliant with earlier Mifare Classic 1K and 4K, with 2 subtle differences:

  • the kind of protocol-level ID to be used must be configured once for all during the pre-personalisation step. Possible choices are 7-byte UID, 4-byte fixed but non-unique ID, and 4-byte random ID,
  • the load modulation level could be set to ‘high’ or ‘low’.

In this short article we’ll show how to configure both the kind of ID and the load modulation.

Personalize UID usage

This command can be only issued once. The choosen configuration is then locked forever. If you have ordered Mifare Classic EV1 with a specific configuration, the command has been issued in factory and will always fail adterwards.

The Mifare Classic EV1′ “personalize UID usage” allows to select one of four different modes:

  1. UIDF0 (value 0x00): anti-collision and selection with the 7-B UID
  2. UIDF1 (value 0x40): anti-collision and selection with the 7-B UID plus a possible shortcut (select only the 4 first bytes and read block 0, bypassing the second step of the selection)
  3. UIDF2 (value 0x20): anti-collision and selection with a 4-B random ID
  4. UIDF3 (value 0x60): anti-collision and selection with a 4-B non-unique ID (calculated out of the 7-B UID)

The command code is 0x40 and must be sent in a CRYPTO1-ciphered stream, after a successfull authentication on sector 0.

To do so, here’s the sequence of commands that must be send to the reader in a SCardTransmit stream (you may for instance write a script for csScriptor). We assume that the card is in transport condition, i.e. that the key A of sector 0 (as well as all other sectors) is the transport key FF FF FF FF FF FF and gives full access to the sector.

# Load the transport key in the reader's volatile memory
FF 82 00 00 06 FF FF FF FF FF FF

# Get authenticated over sector 0 using the transport key as key A
FF 86 00 00 05 01 00 03 60 00

# Check that the authentication is OK by reading block 0
FF B0 00 00 10

# Send the 'personalize UID' command within an ENCAPSULATE APDU
# P1 = 0x01 -> ISO 14443-3
# P2 = 0x08 -> timeout = 125ms
# The last byte is the value to be set, here we choose 0x60 for UIDF3
FF FE 01 08 02 40 60

The reader returns 90 00 if the card acknowledges the command.

If you receive 6F 02 instead (CRC error), it is likely that the card has sent a NACK, meaning that the configuration has already been set and is therefore locked.

Set modulation strength

The Mifare Classic EV1’s “set modulation strength” command allows configuring the chip for either the strong modulation strength (default, value 0x01), or the weak modulation strength (value 0x00).

The command code is 0x43 and must be sent in a CRYPTO1-ciphered stream, after a successfull authentication on sector 0.

To do so, here’s the sequence of commands that must be send to the reader in a SCardTransmit stream (you may for instance write a script for csScriptor). We assume that the card is in transport condition, i.e. that the key A of sector 0 (as well as all other sectors) is the transport key FF FF FF FF FF FF and gives full access to the sector.

# Load the transport key in the reader's volatile memory
FF 82 00 00 06 FF FF FF FF FF FF

# Get authenticated over sector 0 using the transport key as key A
FF 86 00 00 05 01 00 03 60 00

# Check that the authentication is OK by reading block 0
FF B0 00 00 10

# Send the 'set modulation strength' command within an ENCAPSULATE APDU
# P1 = 0x01 -> ISO 14443-3
# P2 = 0x08 -> timeout = 125ms
# The last byte is the value to be set, here we choose 0x00 for weak strength
FF FE 01 08 02 43 00

rfidscan-tool : driving your Prox’N’Roll RFID Scanner’s LEDs and buzzer

The rfidscan-tool command line

The rfidscan-tool command line application is available for any OS that supports libusb, HID-API or hidraw.

We’ve tested it on:

  • Windows XP / Vista / 7 / 8
  • Mac OS X
  • Linux (Ubuntu, Debian, etc)
  • Raspberry Pi (on Raspbian distro)

rfidscan-tool has been inspired by blink1-tool, the command-line application that controls the blink(1) USB notification light. Most of the source code comes from this application. and therefore we use the same licence model.

Note for Mac OS X: currently the tool is able to send commands to the RFID Scanner, but fails to receive its response (IOHIDDeviceGetReport always returns a timeout error — without waiting). This issue is under investigation.

Binary download

To get rfidscan-tool for your machine, visit our github releases page, and search for a version supported by your OS / target CPU.

Here’s 4 direct links to the first public version (v14.11):

Source code download

To compile your own version of rfidscan-tool, just checkout the rfidscan project from github and compile the rfidscan-tool subproject. Something like the below will work 99% of the time:


# git clone https://github.com/springcard/rfidscan-tool.git
# cd rfidscan-tool
# make

For a Windows target, we provide .SLN projects to be opened with the (free of charge) Microsoft Visual C++ 2010 Express IDE.

Usage

On Windows, you may invoke the binary from any command line box without restriction.

On MacOS X and on most versions of Linux (including on Raspberry Pi), you will need to either run as root (sudo rfidscan-tool <...>) or install udev rules as described in https://github.com/springcard/rfidscan-tool/blob/master/51-rfidscan.rules.

When running rfidscan-tool without any argument, it will print a help page like the one below.

rfidscan-tool-win

Here’s the detail of all commands:

rfidscan-tool <cmd> [options]

rfidscan-tool list

List all connected RFID Scanners.

rfidscan-tool version

Show the RFID Scanner’s firmware version.

rfidscan-tool test

Perform a routine test on the RFID Scanner(s).

rfidscan-tool leds <red>,<green>,<blue> [–during <time_ms>]

Drive the RFID Scanner’s LEDs. Allowed values for the red, green and blue parameters are

  • off : the LED is switched OFF
  • on : the LED is switched ON
  • slow : slow blinking
  • fast : fast blinking
  • heart : “heart beat”
  • slowinv : slow blinking, inverted
  • fastinv : fast blinking, inverted
  • heartinv : “heart beat”, inverted

The during parameter is optionnal ans specify how long (in milliseconds) the specified value remains active, before the RFID Scanner goes back to the default sequence.

If this parameter is missing, the LED command lasts forever (at least until another LED command is issued).

rfidscan-tool leds-default

Let the RFID Scanner drives its LEDs itself as usual.

rfidscan-tool beep [during <time_ms>]

Switch ON the RFID Scanner’s buzzer for the specified time (in milliseconds).

rfidscan-tool read <addr>

Read the configuration register at the specified address.

rfidscan-tool write <addr>=<value>

Write the specified value into the configuration register at the specified address. Leavevalue empty to erase the register.

rfidscan-tool dump

Dump all the configuration registers.

Note: the “sensitive” registers (keys for the Master Card and password) are hidden by “XX” chars.

rfidscan-tool write-conf <filename>

Write the configuration registers from the specified file (use a file produced by MultiConf software).

Usage options

Values for [options] are

  • -d <device num> --devices <device num> : perform the command only to this device (from --list), default is all devices (same as -d all)
  • -q --quiet : suppress most output messages
  • -v --verbose : verbose debugging messages
  • -r --reset : reset the RFID Scanner (to apply the new configuration)
  • -p --password <password> : to access a RFID Scanner that is password-protected

Other tool

On this page you will find a Python script used to control the LEDs and Buzzer of a Prox’N’Roll (thanks Armel Esnault)

Accessing Reader’s configuration from command line and in batch mode

All SpringCard PC/SC Readers feature a set of Configuration Registers that allow to alter the Reader behaviour to match a particular hardware setup or end-user requirement.

Editing the configuration is easy thanks to MultiConf, the new versatile configuration tool that covers all SpringCard products. But MultiConf is a GUI-application. When it comes to configuring numerous readers at once (with the same settings of course), a command-line tool, suitable to operate in batch mode, could be preferred.

This is typically the aim of pcscconf, a simple command-line utility (targetting Windows systems).

Getting started with pcscconf

Download pcscconf (and its companion tool pcscinfo) (ZIP)

Extract the ZIP archive in the directory of the choice. There are 3 files in the archive:

  • pcscconf.exe, the tool we’ll be using
  • pcscinfo.exe, a software to retrieve all information regarding the connected readers (version, serial numbers, etc)
  • pcsctool.dll, the library that makes both software work.

Open a command-line box in the directory where you’ve extracted the archive, and at the prompt enter

pcscconf

pcscconf-1
pcscconf-2

Reading current configuration

Enter

pcscconf -d

to dump the current configuration.

pcscconf-3

It is also possible to enter

pcscconf -d <Filename>

to dump the configuration to a file. pcscconf uses the same file format as MultiConf.

If the file already exists, use

pcscconf -df <Filename>

to force the overwrite.

Changing a configuration register

Use syntax

pcscconf -s <RegisterAddress>=<RegisterValue>

 

pcscconf-4

To erase a register (i.e. restore product’s default value), use syntax

pcscconf -s <RegisterAddress>

Applying a new configuration from a file

Use syntax

pcscconf -u <Filename>

to upload the configuration from the file into the reader.

There’s no confirmation prompt or ‘Are you sure’ dialog box. Be sure to double-check the content of your file before uploading it into the reader.

pcscconf-5

Do not forget…

Changing a reader’s configuration will change its behaviour! You’re using this software at one risk. Always refer to the reader’s detailed Developer’s Guide or use MultiConf to choose the appropriate values.

Some registers play a special role and are therefore protected before delivery. This is the case of registers C0 and F0 to FF. Trying to write in one of these registers will always fail.

pcscconf targets the SpringCard PC/SC Readers only (and not the RFID Scanners, /RDR family and access control readers, nor the Legacy products).

pcscconf is able to work with only one PC/SC Reader at once. If you run pcscconf with two readers or more connected to your computer, the software will issue a warning and exit.

This document explains how to upgrade E663′s and the Funkygate-IP firmwares, using the Renesas Flash Development Toolkit (FDT).

Please read the datasheet of every product for specifications and the detailed list of features.

Important disclaimer:

Please note that SpringCard is not responsible for any procedure that end user performs. Please note that not products can be recovered from improper firmware upgrade or mis-configuration !! YOU’RE FOLLOWING THIS PROCEDURE AT YOUR OWN RISK.

Getting started

Requirements

To be able to upload your firmware properly on the E663/Funkygate-IP modules, you need a computer running on Windows Xp/Vista/7. You will also need at least one working USB port and, of course, a Springcard product featuring a E663/S663 module in flash mode.

Except if the reference of your reader ends with something greater or equal to XXXX-AE, be sure to remove all power supply sources (external DC or POE) when connecting the reader to the computer through USB.

Register on Renesas Website

This registration will be necessary to download Flash Development Toolkit. Please browse to : http://www.renesas.eu/

Download and install Flash Development Toolkit

Download and installation

Once the registration is complete, you can download the  last Flash Development Toolkit “Release” (and not “update”) Version (currently v4.09) on the FDT download page:

https://www.renesas.com/en-us/products/software-tools/tools/programmer/flash-development-toolkit-programming-gui.html

You will then have to run the downloaded launcher and install FDT with all the default options.

Download latest firmware’s version

For E663/RDR (Smart Reader version, i.e. FunkyGate-IP NFC) : E663/RDR.

For E663 PC/SC (FunkyGate-IP PC/SC, TwistyWriter-IP PC/SC) : E663.

Ensure your device is ON and in Flash Mode

Make sure your device is not powered – remove Ethernet cable and shutdown DC power supply.

To enable flash mode, the switches must respect the following pattern :

  • 1 – ON
  • 2 – ON
  • 3 – OFF
  • 4 – OFF

switches_FGIP

When the switches are in correct position, connect the device to a computer’s USB port using a standard cable (mini-type B on reader side).

IMG_0066

Wait until the USB Direct driver installs automatically.

Your reader must appear as Generic boot device in the Windows’ peripheral management.

periph

If your reader does not appear in the list and if its reference ends with something greater or equal to XXXX-AE, then you have to connect it to a power supply source (external DC or POE).

Recent versions of the Funkygate do require a power supply to be flashed.

Create a new FDT firmware upgrade project

  • Launch the FDT application. A Welcome window will allow you to “Create  a new project workspace“. Click “OK” to continue.
  • New Project Workspace.
    You will have to input the “Workspace name and “Project Name” of your choice and specify a valid project directory path. Ignore “CPU familly” and click “OK” to continue.

FDT_1

  • Choose Device And Kernel.
    Select “Generic BOOT Device” at the bottom of the scroll down control and click “Next” to continue.

FDT_2

  • Communication Port. 
    On the “Select port” control, please select USB Direct and click “Next” to continue.

FDT_3

After this step a “Flash Development Toolkit” popup will appear.  Click “OK” to continue.    If at this step your device does not appear in the pop-up windows, you should check if the proper driver has been installed. FDT should have already enabled a “Generic Boot USB Direct” driver. If it is not the case, look for it when the Windows Driver installation popup appears when you connect your module in flash mode.

FDT_4

  • Select USB Device. (1 USB device located). The reader must be already selected. Click “OK” to continue.

FDT_5

FDT_6

  • After some automatic configurations, you will enter the Device Setting step. Enter “12.00MHz” for the CPU frequency, “2” for the Main Clock Frequency multiplier and “1” for the Peripheral Clock Frequency multiplier. Then click “Next” to continue.

FDT_7

  • Programming Options. Keep default settings then click on “Finish”.

FDT_8

The firmware upgrade tool configuration is now over. Select Tools >> Simple Interface to simplify the project view.

FDT_9 You can now specify the firmware binary in the “File/Image Selection” by selecting the “Download File” radio button then the “User/Data Area” checkbox and endly by clicking on the play button to browse the firmware file.

FDT_10

You can now click on “Program Flash” to load the new firmware in the reader’s flash memory and then on “Disconnect” to end the procedure.

FDT_11

Once the flash step is over, you can put your reader in play mode by setting the switches in the folowing configuration :

  • 1 – ON
  • 2 – OFF
  • 3 – OFF
  • 4 – OFF

E663_switches_play

Just press the RESET button and your reader is ready to be used!

This document explains how to upgrade the S663’s,  the Funkygate-DW’s and  the Funkycode DW‘s firmwares, using the Renesas Flash Development Toolkit (FDT).

Please read the datasheet of every product for specifications and the detailed list of features.

Important disclaimer:

Please note that SpringCard is not responsible for any procedure that end user performs. Please note that not products can be recovered from improper firmware upgrade or mis-configuration !! YOU’RE FOLLOWING THIS PROCEDURE AT YOUR OWN RISK.

Getting started

Requirements

To be able to upload your firmware properly on the S663/Funkygate-DW/Funkycode-DW modules, you need a computer running on Windows Xp/Vista/7. You will also need at least one working USB port and, of course, a Springcard product featuring a S663/Funkygate-DW/Funkycode-DW module in flash mode.

Register on Renesas Website

This registration will be necessary to download Flash Development Toolkit. Please browse to : http://www.renesas.eu/

Download and install Flash Development Toolkit

Download and installation

Once the registration is complete, you can download the  last Flash Development Toolkit “Release” (and not “update”) Version (currently v4.09) on the FDT download page:

https://www.renesas.com/en-us/products/software-tools/tools/programmer/flash-development-toolkit-programming-gui.html

You will then have to run the downloaded launcher and install FDT with all the default options.

Download latest firmware’s version

The link below will enable you to download directly the latest version of firmware: S663.

Ensure your device is ON and in Flash Mode

First you need to power up your device and plug the required serial interface. The RESET button appears on the middle right corner.

Look page 6 of this link to see how to power the device.

Link: https://files.springcard.com/pub/pmi14049-ab.pdf 

To enable flash mode, the switches must respect the following pattern :

  • 1 – ON
  • 2 – ON
  • 3 – OFF
  • 4 – OFF

Create a new FDT firmware upgrade project

  • Launch the FDT application. A Welcome window will allow you to “Create  a new project workspace“. Click “OK” to continue.
  • New Project Workspace.
    You will have to input the “Workspace name and “Project Name” of your choice and specify a valid project directory path. Ignore “CPU family” and click “OK” to continue.

FDT_1

  • Choose Device And Kernel.
    Select “Generic BOOT Device” at the bottom of the scroll down control and click “Next” to continue.

FDT_2

  • Communication Port. 
    On the “Select port” control, please select the COM port corresponding to your serial interface and click “Next” to continue.

FDT_3

  • Select Device. RX220 Series (Little Endian) must be already selected. Click “OK” to continue.

FDT_4

FDT_5

FDT_6

  • After some automatic configurations, you will enter the Device Setting step. Keep the default settings (32MHz CPU crystal frequency) and click “Next” to continue.
  • Programming Options. Keep default settings then click on “Finish”.

FDT_8

The firmware upgrade tool configuration is now over. Select Tools >> Simple Interface to simplify the project view.

FDT_9 You can now specify the firmware binary in the “File/Image Selection” by selecting the “Download File” radio button then the “User/Data Area” checkbox and endly by clicking on the play button to browse the firmware file.FDT_7

You can now click on “Program Flash” to load the new firmware in the reader’s flash memory and then on “Disconnect” to end the procedure.

FDT_8

Once the flash step is over, you can put your reader in play mode by setting the switches in the following configuration :

  • 1 – ON
  • 2 – OFF
  • 3 – OFF
  • 4 – OFF

Just press the RESET button and your reader is ready to be used! If you intend to flash your device several times, don’t forget to disconnect/reconnect after each firmware upgrade.