Blue pill shows up as "Unrecognized device" even after installing drivers...

Windows XP,Vista,7,8 and 8.1 etc
vdeconinck
Posts: 10
Joined: Sun Nov 05, 2017 10:04 pm

Blue pill shows up as "Unrecognized device" even after installing drivers...

Post by vdeconinck » Sun Nov 05, 2017 11:46 pm

Hi,

I'm pretty sure I'm missing an important step but I really can't figure out which one, so after a full day of research, I decided to post here, even if I look like a newbie - which I am regarding STM32 btw :-).

Hardware : "Blue Pill" from Aliexpress.
OS1 : Windows 10 64bit French
OS2 : Windows 7 32bit French

What I did successfully:
- Added and configured Arduino_STM32 to my Arduino IDE
- Connected the blue pill using a USB-serial adapter
- Flashed the Blink sample sketch using serial => success, works as expcted
- Flashed the SerialCallResponse sample sketch using serial => success, works as expcted

What doesn't work:
- Using micro USB to communicate with the board. When connected, Windows pops up (the French version of) this message, and in the device manager, an "Unknown device" shows up under USB bus controllers (French version of this)

What I tried:
1) replaced the 10K SMD resistor R10 by a 1K5 one, as indicated on the wiki.
2) installed the driver by starting "Arduino_STM32\drivers\win\install_drivers.bat". It popped up 3 command windows: one (calling the two others) saying:

Code: Select all

Installing Maple DFU driver...
Installing Maple Serial driver...
and each of the two others requiring Windows security prompt approval then going:

Code: Select all

Extracting driver files... 
Success
Installing driver(s)... 
Success
3) burned the bootloader by downloading stm32loader.py and flashing generic_boot20_pc13.bin. Result looked OK:

Code: Select all

D:\temp>python ./stm32loader.py -p COM4 -w generic_boot20_pc13.bin
Bootloader version 22
Chip id `['0x4', '0x10']'
Write 256 bytes at 0x8000000
Write 256 bytes at 0x8000100
4) as it didn't solve the issue, also followed the bootloader burning instructions on the Wiki although they talk are about the black pill, so I substituted the binary file with the one from above.

Each time, I made sure burning was made with the top jumper on "1" and running with the top jumper on "0" (the bottom jumper stayed on "0" all the time), and reseting the board after each jumper change.

As I thought maybe there was an issue with the OS, I performed the driver installation on a second OS, to no avail.

So here I am. I must be doing something wrong or missing a step but I cannot find what. I googled combinations of "STM32 Blue pill USB driver unknown device" and followed the links, but none of them solved the issue.

Any idea what the problem is or how I can diagnose it any further ?

All comments are welcome.

Vincent

ag123
Posts: 770
Joined: Thu Jul 21, 2016 4:24 pm

Re: Blue pill shows up as "Unrecognized device" even after installing drivers...

Post by ag123 » Mon Nov 06, 2017 12:15 am

try installing a sketch e.g. a blinky sketch, usb-serial is actually part of stm32duino libmaple core sketch, making sure SERIAL_USB is defined in the build flags in relevant section in boards.txt, maybe that helps

User avatar
RogerClark
Posts: 7156
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Blue pill shows up as "Unrecognized device" even after installing drivers...

Post by RogerClark » Mon Nov 06, 2017 12:50 am

ag123 wrote:
Mon Nov 06, 2017 12:15 am
try installing a sketch e.g. a blinky sketch, usb-serial is actually part of stm32duino libmaple core sketch, making sure SERIAL_USB is defined in the build flags in relevant section in boards.txt, maybe that helps
The latest bootloader includes a dummy sketch, so after it switches from bootloader to sketch it should show up as serial.

When you plug the board in, the LED should flash very quickly 6 times followed by 6 flash (but not as fast) flashes

This indicates the bootloader is working.

As the latest bootloader comes with a dummy sketch to test the Serial, after the LED stops flashing the board should switch to the sketch and re-enumerate as a Serial device

Look in the Windows device manager and initially you should see the libusb-win32 device, and after 1 sec, you should see the serial device

If the drivers didnt load, you will see 2 different known devices, one for when the bootloader is running and the other for the sketch Serial

stevestrong
Posts: 1747
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Blue pill shows up as "Unrecognized device" even after installing drivers...

Post by stevestrong » Mon Nov 06, 2017 9:18 am

It can be the board faulty.
From my last 10 pieces/lot order 2 boards could be flashed with the bootloader over ST-Link, but showed the same effect (not recognized on USB). Meaning they have a HW error somewhere.
As they did cost 1.5 EUR / piece, it is not worth trying to fix them, although I tried to resolder the USB pins without any positive effect.
So just by more and leave the problematic ones on side.

Btw, how exactly did you install the driver?
Did you open a CMD window with admin rights and executed the install batch file?

User avatar
Pito
Posts: 1593
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Blue pill shows up as "Unrecognized device" even after installing drivers...

Post by Pito » Mon Nov 06, 2017 7:00 pm

I flashed the latest bootloader into my new BPill (it flashes 6x fast and 6x slower upon reset). Replaced the 10k resistor with 2k2 one. Win7 64b. Rogers repo.

1. When I upload my sketch (I have to press reset button) it uploads fine, and switches to COM25. I see COM25 in the DevMan.
I can see my data in Teraterm.

2. When I press reset, the COM25 disappears, it is not available anymore. In the DevMan I see only the MAPLE_DFU.
When I unplug/plug the usb COM25 still not available.

3. When I upload my sketch again, it uploads fine (I have to press reset) and the COM25 is again there (I see it in DevMan as COM25). I see my data in Teraterm.

4. When I press reset, the COM25 disappears, I see only MAPLE DFU in the DevMan. The only way to get COM25 back is to upload a sketch..
Pukao Hats Cleaning Services Ltd.

vdeconinck
Posts: 10
Joined: Sun Nov 05, 2017 10:04 pm

Re: Blue pill shows up as "Unrecognized device" even after installing drivers...

Post by vdeconinck » Mon Nov 06, 2017 11:11 pm

HI all, and thanks for all your replies.
RogerClark wrote:
Mon Nov 06, 2017 12:50 am
The latest bootloader includes a dummy sketch, so after it switches from bootloader to sketch it should show up as serial.
When you plug the board in, the LED should flash very quickly 6 times followed by 6 flash (but not as fast) flashes
This indicates the bootloader is working.
Hmmm, this is not what I'm seeing. I tried burning the bootloader again and it looks like it succeeds, but I'm not getting 6 quick flashes. The previous sketch (blink) seems to start again, so the led is blinking with a 1+1 sec cycle...

I'm burning the bootloader with the following command:

Code: Select all

python ./stm32loader.py -p COM4 -w generic_boot20_pc13.bin
And the console then shows:

Code: Select all

Bootloader version 22
Chip id `['0x4', '0x10']'
Write 256 bytes at 0x8000000
Write 256 bytes at 0x8000100
All this just takes a few seconds. Is that normal?
I also tried with the top jumper in the other position to check there was a difference, and indeed, in that case I'm getting the following error, as expected:

Code: Select all

Can't init. Ensure that BOOT0 is enabled and reset device
So I guess burning does actually work... but it's strange I'm not seeing the 6 flash sequence.
I also uploaded a slower "blink" version (2+3sec flash cycle) before burning the bootloader again, but upon restart I'm getting the slow 2+3sec flash cycle instead of the 6 quick flashes.
As the latest bootloader comes with a dummy sketch to test the Serial, after the LED stops flashing the board should switch to the sketch and re-enumerate as a Serial device

Look in the Windows device manager and initially you should see the libusb-win32 device, and after 1 sec, you should see the serial device

If the drivers didnt load, you will see 2 different known devices, one for when the bootloader is running and the other for the sketch Serial
Hmm, no, I don't see any "2-step" sequence, just a single message that says USB device was not recognized and a single unknown device in the device manager...
stevestrong wrote:
Mon Nov 06, 2017 9:18 am
It can be the board faulty.
From my last 10 pieces/lot order 2 boards could be flashed with the bootloader over ST-Link, but showed the same effect (not recognized on USB). Meaning they have a HW error somewhere.
As they did cost 1.5 EUR / piece, it is not worth trying to fix them, although I tried to resolder the USB pins without any positive effect.
So just buy more and leave the problematic ones on side.
Ah-ha, that sounds familiar!
I have another board waiting upstairs (I had bought 2 just in case). I'll solder the pin headers tomorrow and will see if it exhibits the same behaviour. In the meantime, I also ordered 2 slightly different boards (same layout but other silkscreen markings).
Btw, how exactly did you install the driver?
Did you open a CMD window with admin rights and executed the install batch file?
Mmmh no, I just double-clicked the batch file as a user, but each of the two commands popped-up a security dialog warning about a software attempting to modify the system and I approved them both...

I guess until I'm getting the 6-flash, it's kind of useless to try any further. I'll let you know how it goes with the other board.

Thanks again,

Vincent

vdeconinck
Posts: 10
Joined: Sun Nov 05, 2017 10:04 pm

Re: Blue pill shows up as "Unrecognized device" even after installing drivers...

Post by vdeconinck » Mon Nov 06, 2017 11:19 pm

Pito wrote:
Mon Nov 06, 2017 7:00 pm
I flashed the latest bootloader into my new BPill (it flashes 6x fast and 6x slower upon reset). Replaced the 10k resistor with 2k2 one. Win7 64b. Rogers repo.
1. When I upload my sketch (I have to press reset button) it uploads fine, and switches to COM25. I see COM25 in the DevMan.
I can see my data in Teraterm.
2. When I press reset, the COM25 disappears, it is not available anymore. In the DevMan I see only the MAPLE_DFU.
When I unplug/plug the usb COM25 still not available.
3. When I upload my sketch again, it uploads fine (I have to press reset) and the COM25 is again there (I see it in DevMan as COM25). I see my data in Teraterm.
4. When I press reset, the COM25 disappears, I see only MAPLE DFU in the DevMan. The only way to get COM25 back is to upload a sketch..
Hi,

I guess what you describe is the expected behaviour: you get the 6 flash and the device *is* recognized, first as a MAPLE DFU (Roger says "libusb-win32" above, but I guess it's the same), and then as a serial port.

I'd be happy if mine did the same :-)

Vincent

User avatar
RogerClark
Posts: 7156
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Blue pill shows up as "Unrecognized device" even after installing drivers...

Post by RogerClark » Tue Nov 07, 2017 1:10 am

Sounds like faulty usb connections
Its not uncommon for dry joints on the USB connector

vdeconinck
Posts: 10
Joined: Sun Nov 05, 2017 10:04 pm

Re: Blue pill shows up as "Unrecognized device" even after installing drivers...

Post by vdeconinck » Tue Nov 07, 2017 8:00 am

RogerClark wrote:
Tue Nov 07, 2017 1:10 am
Sounds like faulty usb connections
Its not uncommon for dry joints on the USB connector
I would have expected no detection at all in this case, but maybe if only D+ ou D- is affected it could be a "half usb" and cause the observed symptoms. I'll resolder the connector tonight along with preparing the second board. Thanks for the tip.

Kind regards,

Vincent

stevestrong
Posts: 1747
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Blue pill shows up as "Unrecognized device" even after installing drivers...

Post by stevestrong » Tue Nov 07, 2017 9:36 am

vdeconinck wrote:So I guess burning does actually work... but it's strange I'm not seeing the 6 flash sequence.
This is a clear indication that something is wrong with the board/chip. I had exactly the same problems, flashed the bootloader over STLink was ok, but afterwards no blinks, or occasionally with very slow speed.
So I would suggest to forget the board, get another one.

Post Reply