installation problem with dcmotor in arduino engeering kit

I have followed all the steps in the engineering kit manual but I am having problems with the MKR motor carrier. and what I am trying to do is connect the DC motor to the carrier but I only get the following error. I am stuck at this point (see photos) and I have no idea how to solve this. and I also have no idea if it is my computer, Arduino hardware or matlab software. please help.

I saw a similar error when initially setting mine up. For some reason, the connection was switching from COM5 to COM4 after making the connection.

I was using a USB port attached to my monitor and eventually switched to a different port (one attached to my computer) and it seems to have stabilized and is working well.

Make sure you have the MKRmotor carrier library installed in Arduino IDE and upload the flasher sketch to update the carrier.