Go Down

Topic: Genuino MKR1000 COM Port Hilarious Plug and Unplug effect  (Read 3255 times) previous topic - next topic

Aghonaim1

Actually , I Plugged My MKR1000 into USB3 , I Updated The Boards in IDE Throw Library Manager

Board: Arduino SAMD Borads (32-bits ARM Cortex-M0+) By Arduino version 1.6.11
 

That was under windows 7 64x

NOTICE 1 : When I tested the blink example I thought that driver unstable driver name : Genuino MKR1000
that's because changing the port , and driver dropped after change the port while uploading many times

Then I read many articles how to overcome this effect (as a common problem for many people) so i went to Laptop BIOS and changed the USB from 3 To USB 2 , also I turned off the power option on USB driver level related to power saving

I run the first blink example after that , thinking the problem was solved

Then I Installed the WIFI 101 Package and I ran the first WIFI101 example after including this Library

Here NOTICE 2 : The driver dropped completely and the USB in many cases didn't feel the MKR1000 exist , and when i used the double click on board to initiate the boot loader i just hear the sound that windows detected a device with no real effect or further actions

NOTICE 3 : When I tested the WIFI 101 example, changing the ports multiple times while or after upload and then the most annoying response appeared , which is hilarious plug and unplug effect and then driver dropped

So The changing port problem , causes the driver to drop after certain times , and sometimes the computer halts the driver 

NOTICE 4: Each Time I remove the driver and define it again it takes a different name, please find below are the names

Genuino MKR1000
Genuino MKR1000 bootloader
Arduino MKR 1000

what i know that the problem of changing port is a common issue , but what makes me annoyed that sometimes i have to restart the computer to let feel that MKR1000 Exist

and the other thing that i cant continue in my development plans because after each upload i face a problem

(i went to other solution like checking that USB is working properly and stable .etc )

 So what is the solution to keep the port either fixed or prevent the driver from this hilarious effect ?

ballscrewbob

The MKR has two ports !
Its important to realise that.

Trying to lock both ports to the "same" COM port is going to cause nothing but problems.

It is possible to lock each to its own port eg. COM 5 and COM 6.
However I wouldnt do that myself with the MKR anymore.
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Aghonaim1

I don't know how to lock the MKR1000 on a certain port , at least I want to know the real cause for driver dropped and how to mitigate that risk

I can live with a changing com port , but I can't with dropped driver

doctorwho8

Hello!
By chance did you get yours to blink? Did you need to change anything on the sketch to cause that to happen? Mine worked, after adding an external LED to it.

And directed to Ballscrewbob:
What do you mean by "The MKR has two ports ! Its important to realise that. Trying to lock both ports to the "same" COM port is going to cause nothing but problems. It is possible to lock each to its own port eg. COM 5 and COM 6. However I wouldnt do that myself with the MKR anymore."?

Please indicate where that is in the documentation.

Aghonaim1

Yes the blink example worked on LED 6 , as output , The WIDI101 Samples worked with lots of effort and disappointment because what i call it "Driver or Card Instability "

and I tried to make the driver fixed as well on COM Port 6 or 5 , by changing that in driver properties , in advanced tab as i remember , you can choose COM Port but that didn't work

What I want to know Now , What is the root cause for this changing COM behavior and How can I overcome driver drop ?

Knowing the root cause may give me the ability to have a solution to overcome driver drop issue


ballscrewbob

@ doctorwho8

Plug in your MKR and see which com port it shows up on.

Do the "quickly double tap reset button" trick and now read the com port again.

Note the different com port. The bootloader uses a different com port.
And this can also show during upload phase.

TWO com ports.

The builtin LED is on a different pin number on the MKR btw. pin 6 the newer example of blink takes advantage of  the "LED_BUILTIN" function


Code: [Select]
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}


@ Aghonaim1

During this whole phase you should be doing the following as ADMINISTRATOR.

Google how to install / run as administrator

Your problem could still be related to your playing with / modification of drivers and com ports.

May I suggest you take a moment to CLEAR your com ports.

Start afresh and if it offers to REMOVE the drivers at any point in that process then let it do so.

Make sure you have as many items as possible unplugged from your USB ports whilst doing it also if you use real com ports also disconnect those devices too until you are finished.

Only when you are finished should you plug anything back in and only one at a time until the drivers are re-installed.

When it comes to plugging back in the MKR then plug it in and let it do its driver thing. then start the IDE which may also want to update drivers.

When all that is done you may want to consider dropping out of admin mode and doing a reboot of the computer.
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Aghonaim1

@Ballscrewbob

Happy new year :) hope you are enjoying your time

Actually , I Tried this before Using Administrator Login

1- I made reset from COM Port as follows

Start - Regedit

Computer - HKEY_LOCAL_MACHINE - SYSTEM - Control - COM Name Abiter

and i made it all zeros

2- I have 2 USB , I don't plug except MKR1000

3- Every time , I remove the Driver Using Uninstall and also delete check box option

NOTE: I even removed all USB drivers and searched for the manufacturer signed driver not the drivers chosen by windows

The only thing I did not do , that i don't know where the drivers path installed on my computer so i can remove them all by myself to make sure all are deleted 

I even had doubts about the USB itself as a hardware to have any kind of malfunction so i installed the Laptop manufacturer hardware and software checker , and all was fine







ballscrewbob

@ Aghonaim1

Whilst REGEDIT can be useful to clear some ports its not the best way.
That's why I showed you the link to clearing them which also uses the driver paths to look up and remove the drivers properly.

As I see it you are slowly digging a deeper hole.
The methods I post have been used by many others and whilst not always 100% they do often help fix things.

If you wish to do things your own way that's fine.

On a slightly different note: beware that USB 3.0 ports can be a very hit and miss affair with Arduinos If yours are USB 3.0 then consider putting a powered USB 2.0 hub between the Arduino and the USB 3.0 port.

If its a laptop then also be aware that a lot of laptops suffer power issues with USB but there are steps that can be used to improve that.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Aghonaim1

OK , I followed your way , I deleted COM
Then Plugged the MKR1000

It shows me Unknown device under USB node

Now I clicked Update driver and points on Driver directory for Arduino folder and WIndows 7 can't find the driver for MKR1000


What shall I do ?

ballscrewbob

@ Aghonaim1

Not sure if you saw yesterdays post but it seemed to have got deleted for some reason.

Will try recreate it shortly. Just be patient while I try to remember everything.
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

ballscrewbob

OK here goes second attempt.

A few more questions if you don't mind.

Is the computer you are using YOUR OWN computer and not a company computer or a loan computer ?
Are you the only user of the computer ?
Do you have FULL ADMINISTRATOR rights to that computer ?
Is there anything else showing in Device Manager with exclamation marks or question marks  other than the MKR ?
Are you using USB 2.0 ports ?
Are you sure your computer is clear of pirate software, driver finding software, virus or other malware ?
If you answer "NO" to any of those then we need to look at some more options and fix those before you can proceed.

If you answered YES to them all then lets move on.

Disconnect the MKR and any other USB devices that you can.
Check in Device Manager and check if any ports show (it probable that at least one COM port will show and that's normal. If not then highlight the computer probably your name PC or whatever you used during the OS install. Now from the "Action" option select "Scan for hardware changes" and take note of anything else it may find. If it does not properly install anything at this point you need to fix that first before moving on.

Keep the device manager window open.

Do this next step as ADMINISTRATOR.

Navigate to C:\Program Files (x86)\Arduino\drivers (Change the drive letter if you installed anywhere else)
If you are using X64 then execute "dpinst-amd64" If you are using x86 then execute "dpinst-x86"
If at any time it asks if you want to allow the installation first double check you are in Admin mode !
Otherwise allow it and continue.

When that's done plug in the MKR but take note of what device manager says.
Windows may also at this point offer to install them again (not always) and allow it if it does.

Now start the IDE and let it come up fully.
If the IDE offers you any updates for libs or boards at all make sure you take them before doing anything else.

Hopefully you made it this far without too much of an issue. If the board is still not showing properly then do the "quick double tap" of the reset button on the MKR.
It should show up as a new port in Device manager "MKR Bootloader" take note of the port as you will need it in a moment.

Select the BLINK example from the IDE and make sure it's the one that was talked about earlier or modify it for pin 6 and save it.
In the IDE preferences select VERBOSE for the upload.
Now upload the blink sketch using the port number you got for the bootloader.

If all went well up to here your board and the IDE are fine.

If however you had an issue at any point please post the full details now but it may be a board issue.
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Irmion

Hi,

I have the same phenomenon. Until I load the sketch the MKR1000 is attached to the PORT 12.
Then it Comes up the message that the upload port will be Port 10.

It seems like the sketch was loaded successful. When I do a small Change in the sketch (Change the blink time) it will work.
Only the fault message during the upload occurs.

I tried also to Change upload.verbose=true but this was not working.

I attached the log.

Would be nice if you can help me too or if somebody can say if this fault is no problem at all.


Irmion

Hi,

now I updated the IDE to the actual version 1.8.0 but the same problem occur.
Further on I got the following message:

Verify successful
done in 0.009 seconds
CPU reset.
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
writeWord(addr=0xe000ed0c,value=0x5fa0004)


Again, this small example works, but a different one not.

ballscrewbob

#13
Jan 05, 2017, 02:33 pm Last Edit: Jan 05, 2017, 02:34 pm by Ballscrewbob
Hi,

now I updated the IDE to the actual version 1.8.0 but the same problem occur.
Further on I got the following message:

Verify successful
done in 0.009 seconds
CPU reset.
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
writeWord(addr=0xe000ed0c,value=0x5fa0004)


Again, this small example works, but a different one not.

That looks fine. I just threw blink at mine which works and shows exactly the same thing.

Not sure what fault you are seeing.

Post the sketch that you say doesnt seem to work.
The board seems OK though based on your last post.
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Irmion

Thanks for your answer.
I found the fault in the sketch I talked about.
Was a different thing and based in the interrupt I was playing around with.

So you have the same warnings when you load the MKR1000 ?
That seams to be normal and based in the COM Port change ?

Go Up