Serial Connection with Zadig driver

Hi,
I am using a windows 8.1 system. For flashing my spark core firmware I installed the zadig driver. Is there any way to use this driver for serial communication? The driver is listed in my device manager as USB-Device.
First I had installed the the Spark Core USB Driver according to the manual of BDub:

If I use this driver the spark core will be listed under Ports (COM & LPT) in my device manager without any error. If i try to connect the Arduino IDE Serial Monitor, a error shows up: „port is already in use“. Establishing a connection with Putty displays an error, as well.

What error does connecting with PuTTY show?

@Roadrunner in my case when I flash the spark I am able to see the it in the COM&LPT list, however I cannot connect to it via putty. I then press the reset and hear Windows to play a sound to indicate that a usb device has been unplugged. As soon as I hear the connect sound from Windows I connect via putty and this time it works.

For a while I thought you needed to use the spark_core.inf driver for COM and Zadig for DFU, but later I found out Zadig works for COM and DFU. EDIT: and then later I realized you really do need both! lol.

The problem with port already being in use is because your Core is sending data to the PC already… but you can’t open your serial port until your code runs the Serial.begin(9600); line…

The work around is this little piece of code:

Before your :spark: Core connects to the Cloud, make sure your Serial Terminal software is closed.

void setup() {
  pinMode(D7,OUTPUT);
  digitalWrite(D7,HIGH); // Light the onboard LED so you know it's time to open your Serial Terminal
  Serial.begin(9600);
  while(!Serial.available()); // wait here for user to press ENTER in Serial Terminal
  digitalWrite(D7,LOW);
}

void loop() {
  Serial.println("Weeeeeeeeeeeeeeeeeee!");
  delay(1000);
}

You have about 10-15 seconds before this will kick your core off the cloud, so be quick. You also have to do the above process if you want to reflash your device over the air from the web IDE, because it will be stuck in the setup() and not able to receive a new program until you connect your serial terminal properly.

In Putty, make sure you are using Serial under the Session tab

Not the Connections tab… or it will DING at you. :slight_smile: I learned that the hard way… thanks to @Dave

1 Like

I think you really do need to use the spark_core.inf driver as well but it gets along fine alongside the Zadig USB driver. We've discussed this elsewhere but I think it is useful to mention it in this post since it also has @BDubs's neat "wait while I press the key" trick.

Yes you are right! I was meaning to edit this old post but couldn’t find it! :smile: