Am jumping the gun here with 0.6.0.rc1 as the documentation has not been released, so apologies in advance.
I understand that there is a second USB serial port, USBSerial1 atop of the default that we are all used to which is Serial.
Here is the test code:
// Test exposure of two USB Serial ports
#include "application.h"
void setup() {
Serial.begin(9600);
USBSerial1.begin(9600);
}
void loop() {
Serial.println("Serial");
USBSerial1.println("USBSerial1");
delay(5000);
}
Problem is that I only see one USB serial port exposed in Windows Device manager, not two as expected. Connecting to this serial port (in my case COM158), I see “USBSerial1” displayed.
I understand that a new driver may be required. If so, has this been released yet? Any other ideas?
@UMD you will need to reinstall the serial drivers for Windows… I’ll update with the link when I find it. I want to make sure it’s the latest and greatest.
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
@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…
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…
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…
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.
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.
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.