MB v1.1.87-pilot - possible bug?
I installed MB on my iMac when I first started using PB about a week ago. But today I installed it for the first time on my Win10 PC. I downloaded the latest v1.1.87-pilot version. It installed ok. I then launched it and did a File->Open and loaded an example program. It loaded ok. Now the problem: I then clicked on File->Open again, wanting to open a different file. I then unexpectedly got a dialog window saying "Downloading code to board. Please wait." (see screenshot below). As you can see in the screenshot, no board was connected. In fact, I have not yet attached my PB board to this PC (could that be the issue?).
Looks like the problem was due to the fact that the MB program for some reason connected to COM2, even though my PB board was not attached (and had never been). Once I connected my PB board, all is well. I am a bit surprised though that when no board was attached - the MB program's USB plug icon was showing NOT connected, yet if I clicked on plug icon, it showed Disconnect: Communications Port (COM2). I guess it mistakenly identified some other serial/USB device on my PC as a legitimate board?0
Any response from MicroBlock about this? I assume it's a bug for MB to display that it's downloading to board, yet the USB icon doesn't show as green/connected?0
I assume it continues with the latest patch. Forwarding this to MicroBlocks team.
Thanks for reporting this problem.
The MicroBlocks native apps for Windows, Mac, and Linux have a feature called "auto connect". That is, they scan the serial ports attempting to find a MicroBlocks board, then connect to it. (In contrast, the webapp only connects to a board when the user explicitly opens a connection.)
Auto-connect is a super useful feature when working with younger children but it can sometimes get confused if there are other serial devices connected to your computer, such as a Bluetooth dongle (possibly an internal one) or a non-MicroBlocks board.
There are a couple of work-arounds:
- use the webapp
- unplug the other serial device, if possible (it may be internal)
- plug in a MicroBlocks board, as you did
- use the "disconnect" command
This problem will be different in the latest Pilot release (1.1.89) but I can't predict if it will be better or worse. You shouldn't see the dialog, but you might not be able to interact with MicroBlocks at all if it is trying to send code to the non-existent board.
We will work on a solution to this problem but the auto-connect logic is complex so it may take a while.4
Just tried MB v1.1.89-pilot: same behavior as prior version. With no board connected, MB shows it's connected to Communications Port (COM2). So I click on connection icon to Disconnect MB from COM2. I then attach my PB board and hear the USB sound signaling Windows detected the PB. BUT, my PB does not auto-connect within MB. I have to click on connection icon, then choose Connect USB Serial Device (COM3). Then I'm good to go...
The fact that it simply lists the mysterious auto-connection as Communications Port (COM2) implies the standard serial port COM2, not a USB device IMO. But I do not have anything connected to COM2 serial port. If it was a USB device that was mapped to COM2, I think it would have listed as USB Serial Device (COM2), right?
It's certainly not an issue for me, just sharing my observations - as I assume newbies could easily get stumped by this unexpected behavior...0
I don't know if this is a related issue, but I just noticed on this Win10 PC that after I launch latest MB pilot, then the Windows Task Bar shows 2 windows related to MB. One is the normal IDE, other is a black window with just a solid cursor in upper left. Makes me think it's the communications session with the mysterious COM2? I do not recall if this happened with prior pilot version...0
Ahhh, just observed that this 2nd DOS-like window is listing COM activity (after I clicked on the window).
In fact, it seems like a log file that tracks all activity between MB and board - nice!
With no PB attached (yet MB shows as connected to COM2):
With my PB attached (MB shows as connected to COM3):
Hope this helps...0
Thanks for the updates.
Disconnected MicroBlocks from a COM port disables the auto-connect mechanism so, as you observed, you need to explicitly connect to your board after plugging it in
Connecting to the board re-enables the auto-connect mechanism.
The Windows Device Manager may be able to shed some light on the mysterious COM2. I suspect that it is an internal Bluetooth device.
In any case, MicroBlocks should wait until it knows that the device on the COM port is actually a MicroBlocks device before it tries to download code to it. I will look into fixing that.0
- 96 All Categories
- 3 Community
- 3 Hello Maker!
- 83 PicoBricks - Make, Run, Split, Merge
- 26 Hardware Support
- 14 PicoBricks Backers Hub
- 41 MicroBlocks Support
- 2 Shipping Support
- 10 Products & Technology
- Raspberry Pi
- 10 Other