0.6.0.rc1 - USB Serial - only seeing one but expect two

Ok so it looks like there is a slight issue with this on Windows 8.1 Pro (works fine on Mac). I wasn’t able to get the new drivers working with both Serial and USBSerial1 until I compiled this firmware for my Photon:
https://github.com/spark/firmware/tree/feature/usb-windows-multiple-configs

That said I did get USBSerial1 working, but Serial stopped working (with new drivers).

Here are the new drivers. https://github.com/avtolstoy/particle-usb-testing

These code changes will be released in v0.6.0-rc.2 or if you want to try it now, make sure you follow the section on removing old drivers and installing new ones. Don’t try to do it differently, it won’t work :wink:

@Scruffr, yep, I had no joy with Keyboard either under Windows 7…(Yet to test under Mac/Linux). Hopefully it is a firmware issue and not a driver because we don’t want to have to install a driver for a HID device…

@BDub, am running Windows 7.

Followed instructions - the original Particle driver was “sticky” in that it needed to be cleared from the usb driver cache.

Unfortunately following these instructions (I had to download SysInternals psexec.exe) failed due to permissions issues - the tree was “SYSTEM” only and I could not change it and therefore could not delete.

psexec.exe -i -s regedit.exe
Navigate to [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB]
Remove everything starting with VID_2B04

My guess is that this will be a common issue moving forward… Hmm…

1 Like

@BDub, ps, is it possible for you to provide me with the compiled binaries for https://github.com/spark/firmware/tree/feature/usb-windows-multiple-configs so that I may test and report back?

Confirming that I get two serial USB devices exposed on a Mac as @BDub as indicated. This is encouraging.

@ScruffR, Keyboard.print(“T”) and Keyboard.write(‘W’) works as expected via a Mac.

Keyboard.print(“TEST”) only types “T”, was not expecting this.

Keyboard.press(4); does nothing (4 = the ‘A’ key). Have I got this right?

Sending you a PM with the files @UMD :wink:

@BDub, mainly bad news I am afraid.

Test environment: Parallels Virtual Machines under Macbook, loaded System firmware provided by yourself via PM.

Windows XP prior to installing the driver, Device Manager showed “Other devices” display just one line item, “Photon”.

Installed the latest Windows driver, three devices now showed up in Device Manager under “Other devices” - Photon Control Interface, Photon HID Mouse/Keyoard, Photon Serial. This is good!

Within Device Manager I click on each instance to see their properties. Device Status shows this:

   This device is not configured correctly. (Code 1)
   To reinstall the drivers for this device, click Reinstall Driver.

This is bad!

Windows 7 Problem is at the stage of loading the new Windows device driver, I browse to the very same directory as was used by Windows XP, but it complains “Windows could not find driver software for your device”.

This is also bad!

I have not raised a Github issue for this as am not sure where it should go…

One major thing about HID devices is that they should not need any extra drivers!
With the need for extra drivers the feature is cripled IMHO.

1 Like

@Scruff, 100% with you on this, to be useful, USB HID must not require a driver. Have raised a PR for this specifically.

1 Like

@Scruffr, we have great news re USB HID and drivers!

@avtolstoy responded to my PR https://github.com/spark/firmware/issues/1093 with thanks. It is not an issue - no drivers will be required moving forward.

In short it is a side effect of a bug which is being resolved under https://github.com/spark/firmware/issues/1089

Excellent!

1 Like

Hi, a newbie to Electrons, here. Trying to work out how to see two serial devices when using Serial and USBSerial1 (one for Log messages, and one for interaction). My Win7 32-bit PC only shows COM9 when the Electron is USB connected and running. This appears to write Log.x() output fine, but I cannot find any other COMx port corresponding to USBSerial1. The github links on these topic are all closed/resolved well ahead of my devices 0.6.2 firmware. Any suggestions on where I should be looking? Ta.

Have you called USBSerial1.begin() in setup() or STARTUP()?

Does the device show up in any other category in Dev Manager?

Hi @ScruffR. Thanks for your reponse. I’m in Australia, ~12-15hrs away by timezone, btw, so won’t be able to respond rapidly!

Yes, I set USBSerial1.begin() in setup, as well as Serial.begin(). I am also assigning a logHandler via SerialLogHandler logHandler(LOG_LEVEL_ALL);

I should add that the device got into a right state at some point when these were all present, and I ultimately had to do a usb firmware/tinker flash to get it back, after a complete power down and boot to safe mode.

Currently, I have removed the USBSerial1 calls, and Log.x() and Serial.x() calls are co-operating.

I should add that I am using SYSTEM_MODE(SEMI_AUTOMATIC), for now, as I want to be able to get a response prior to the (0-5 minute) interval it takes to connect to the cloud from my location, and my application isn’t going to require cloud connectivity (nice to have but only for remote diagnostics).

Can you tell me what COM port number it should appear on? My laptop has other internal devices on COM5 and COM6, for example.

The COM port for a device is selected by Windows, depending on which port numbers are available at the time.
So we can’t tell which port your Windows will select for you.
But once the device has been registered, you can select the desired port number via Device Manager - Properties - Settings - Advanced.

1 Like

Ta, been a while since I’ve had to dig into this stuff.

Per Dev Mgr, COM3-8 are ‘in use’, not sure what by bar COM5 and COM6, but that’s moot. So COM9 is the first free port and is assigned to Electron on USB connect event. Makes sense. Pops up in Dev Mgr when the USB is plugged in or Electron is reset.

However, I never see any other COMx port auto-assigned (no new device appears under Device list either) when both USBSerial1 and Serial are initiated. This is what puzzled me.

For the time being, I will leave it be - it was more curiosity as to what I may have overlooked or done wrong. Given the number of threads dealing with config/install issues dogging the USB/Serial stack that Particle are using, it may just be a config glitch.

For the purposes of diagnostics, I can live with one serial port.

Thanks for your input, @ScruffR.

1 Like

Am suffering the same/similar problem as @apt when configuring both USBSerial1 and Serial.

  • Only one COM port shows up in device manager, not two.
  • Serial no longer outputs, only USBSerial1.
  • Out of interest, USBSerial1 is showing up as the same COM port that Serial was on originally.

Running Windows 7. Photon firmware version 7.0.0.rc3

The Particle Windows Driver being used is:

Driver Provider: Particle
Driver Date: 10/01/2014
Driver Version: 5.2.0.0
Digital Signer: Spark Labs, Inc

No doubt a driver issue. Can anyone point me to where the official drivers are, it should be obvious, but… ?

This is definitely a driver issue, as you are using the old one that does not support composition.

You can find the latest driver installer at https://github.com/spark/windows-device-drivers/releases/tag/v6.1.0.68

The docs also link to the driver installer, although a bit older version: https://docs.particle.io/guide/getting-started/connect/photon/#installing-the-particle-driver

1 Like

@avtolstoy,

Will install tomorrow and report back. Am confident that this will solve the problem.

Cheers!

1 Like

@avtolstoy, @apt,

Updated to the latest Particle USB CDC Windows Drivers, version 6.1.0.68.

Device now manager shows two serial ports as expected:

  • Photon Serial (COM153)
  • Photon USBSerial1 (COM154)

Correct output to the two serial ports as expected.

Case closed with thanks!

2 Likes

@ScruffR,

Would like to mark this ticket as [SOLVED} but I can’t access the title title any more. Are you able to do this for me???

We have a :ballot_box_with_check: Solution icon at the bottom of each post (might be hidden behind the ellipsis)
If you hit that on the post that solved the issue, the thread will be marked solved