Ошибка открытия последовательного порта com1 port busy

Приветствую всех. У меня возникла возможно аппаратная неисправность платы Arduino UNO. Я написал программу и собрал на монтажной плате схему управления двигателем постоянного тока, по схеме представленой на рис. ()

grey-vsm аватар

Offline

Зарегистрирован: 01.12.2016

Приветствую всех.

У меня возникла возможно аппаратная неисправность платы Arduino UNO. Я написал программу и собрал на монтажной плате схему управления двигателем постоянного тока, по схеме представленой на рис.

Сначала все нормально работало, но потом возможно случайно каратнул кратковременно один из выводов двигателя на вывод базы транзистора (до или после резистора) потому что я замечал кратковременное срабатывание двигателя в тот момент когда он должен быть выключен. И после этого при попытке открыть «монитор порта» выходит сообщение «Ошибка открытия последовательного порта «COM3″ (Port busy)», и при попытке загрузить другую программу тоже ни чего не работает, выходит сообщение об ошибке. Подскажите что-то произошло с USB портом на плате arduino, хотя в диспечере устройств видно «Arduino Uno (COM3)». Неужели моя плата сломалась окончательно или чтото еще можно сделать и как мне провести проверку и поиск неисправности?

//——Полное сообщение об ошибке———

Arduino: 1.6.9 (Windows 7), Плата:»Arduino/Genuino Uno»

Скетч использует 2 298 байт (7%) памяти устройства. Всего доступно 32 256 байт.

Глобальные переменные используют 232 байт (11%) динамической памяти, оставляя 1 816 байт для локальных переменных. Максимум: 2 048 байт.

Ошибка открытия последовательного порта «COM3» (Port busy)

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x7b

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x7b

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x7b

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x7b

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x7b

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x7b

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x7b

avrdude: ser_send(): write error: sorry no info avail

processing.app.SerialException: Ошибка открытия последовательного порта «COM3»

at processing.app.Serial.<init>(Serial.java:125)

at processing.app.Serial.<init>(Serial.java:66)

at processing.app.SerialMonitor$3.<init>(SerialMonitor.java:93)

at processing.app.SerialMonitor.open(SerialMonitor.java:93)

at processing.app.AbstractMonitor.resume(AbstractMonitor.java:110)

at processing.app.Editor.resumeOrCloseSerialMonitor(Editor.java:2459)

at processing.app.Editor.access$2900(Editor.java:90)

at processing.app.Editor$DefaultExportHandler.run(Editor.java:2437)

at java.lang.Thread.run(Thread.java:745)

Caused by: jssc.SerialPortException: Port name — COM3; Method name — openPort(); Exception type — Port not found.

at jssc.SerialPort.openPort(SerialPort.java:167)

at processing.app.Serial.<init>(Serial.java:114)

… 8 more

Ошибка открытия последовательного порта «COM3»

//————————————————————————————————-

  1. 1.Скачал дрова http://www.arduino.cc/en/Main/Software
    ардуино стала определяться как устройство FT232R USB UART
    2.наткнулся на статью http://did5.ru/arduino/vosstanavlivaem-arduino-nano.html думал PID на 0000 поменялся
    проверил все ок
    3.Скачал дрова с этой страницы как указано в статье http://www.wut.de/e-3wwww-51-inus-000.php
    установил их в ручную
    4.Теперь вроде видена плата USB Serial Port (COM3)
    5.Пытаюсь залить простой скетч выдается сообщение
    avrdude: ser_open(): can’t open device «\.COM3»: Отказано в доступе.
    Проблема загрузки на плату. Для достижения дзен, курить http://www.arduino.cc/en/Guide/Troubleshooting#upload .
    Ошибка открытия последовательного порта «COM3» (Port busy)

    Подскажите что делать, куда смотреть, что почитать, ничего не могу найти на эту тему.
    Во многих темах пишут, что все на винде 8.1 все хорошо само ставится.

  2. Ключевые слова «Port busy», т.е. порт занят
    Возможно, в системе крутится какая-то программа, которая блокирует последовательный порт.
    Вычислить такую программу бывает весьма сложно, поскольку в виндовс нет нормального средства определить, какая именно программа занимает последовательный порт.

    В свое время я сталкивался с подобной проблемой, и той самой блокирующей программой оказалась программа синхронизации с телефоном, которая зачем-то открывала все последовательные порты, доступные в системе.

  3. У тебя точно оригинальный ардуино?? Если клон, что наверняка, то кури в сторону «ch341ser».

  4. попробовал поменять на другой порт, но перед сменой выдается сообщение
    «The port has been opened by another application…» , т.е. порт занят другим приложением и так с любым портом на который бы я не хотел поменять. Может можно как-то определить кто все занял?

  5. А что, работа с оригиналом и клоном отличаются?

  6. У клона может быть другой чип преобразования USB-Serial. Причем возможные варианты не исчерпываются чипом CH341. Есть еще несколько.
    Только обычно если порт виден, то, скорее всего, драйвер установился корректно. А если драйвер установился, то особых проблем, исходящих о стороны другого USB-Serial преобразователя быть не должно.
    Конечно, теоретически возможно, что драйвер кривой, что и проявляется подобными последствиями. Но, как мне кажется, вероятность этого достаточно мала.

  7. Спасибо! Просто я вспомнил про сервисы eBay, alliexpress. Там же одни копии, но раз покупают значит копии качественные)

  8. У меня как раз так и было. Драйвера установлены, никаких ошибок в оборудовании нет, а скетчи не заливаются. Ошибка такая же.

    Курил в гугле пару часов пока выяснил что ардуины не оригинальные то же бывают.

  9. я уже на другом компе эту плату подключал и заливал туда свой скетч, все нормально работает. Там была Win7. А это ноут с виндой 8.1. На нем никак не получается

  10. Посмотри тут и попробуй так же.

  11. Оказывается, не все от качества подделок зависит. Почитайте по ссылке в 1-м сообщении, как оригинальные драйвера «убивают» копии, специально прописывая в них неправильный PID. Я вот на такое попал…

  12. я в самом начале писал, что такой вариант проверил, и не обнаружил изменения PID, с этим все в порядке.

  13. ——- простое решение тут ———————
    была такая ситуация. отключите на время загрузки что у вас воткнуто в rx и tx
    и всё загрузится как надо, после загрузки обратно подключите и работайте
    —————————————————————

  • #159

Господа здравствуйте. Возникла проблема пытаюсь прошить ESP12F, но выдает вот такую ошибку:

Executable segment sizes:
ICACHE : 32768 — flash instruction cache
IROM : 231820 — code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 27613 / 32768 — code in IRAM (IRAM_ATTR, ISRs…)
DATA : 1496 ) — initialized variables (global, static) in RAM/HEAP
RODATA : 992 ) / 81920 — constants (global, static) in RAM/HEAP
BSS : 25608 ) — zeroed variables (global, static) in RAM/HEAP
Скетч использует 261921 байт (27%) памяти устройства. Всего доступно 958448 байт.
Глобальные переменные используют 28096 байт (34%) динамической памяти, оставляя 53824 байт для локальных переменных. Максимум: 81920 байт.
C:UsersVenusAppDataLocalArduino15packagesesp8266toolspython33.7.2-post1/python3 C:UsersVenusAppDataLocalArduino15packagesesp8266hardwareesp82663.0.0/tools/upload.py —chip esp8266 —port COM7 —baud 115200 —before default_reset —after hard_reset write_flash 0x0 C:UsersVenusAppDataLocalTemparduino_build_166446/Blink.ino.bin
esptool.py v3.0
Serial port COM7
Traceback (most recent call last):
File «C:UsersVenusAppDataLocalArduino15packagesesp8266hardwareesp82663.0.0/tools/upload.py», line 66, in <module>
esptool.main(cmdline)
File «C:/Users/Venus/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.0/tools/esptoolesptool.py», line 3551, in main
esp = chip_class(each_port, initial_baud, args.trace)
File «C:/Users/Venus/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.0/tools/esptoolesptool.py», line 271, in init
self._port = serial.serial_for_url(port)
File «C:/Users/Venus/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.0/tools/pyserialserialinit.py», line 90, in serial_for_url
instance.open()
File «C:/Users/Venus/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.0/tools/pyserialserialserialwin32.py», line 64, in open
raise SerialException(«could not open port {!r}: {!r}».format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port ‘COM7’: OSError(22, ‘������� �������������� ����������.’, None, 433)
serial.serialutil.SerialException: could not open port ‘COM7’: OSError(22, ‘������� �������������� ����������.’, None, 433)

Именно последние 3 строчки не понятны. Порт компьютер видит, и в ардуино и в диспетчере устройств. Но если я даже пытаюсь просто открыть Монитор порта, вылезает вот такая ошибка — Ошибка открытия последовательного порта «COM7» (Port busy)
Пытался перезагружать и usb порт менял, все бестолку. Можете подсобить?

  • изображение_2022-02-08_151428.png

    411.7 KB
    Просмотры: 8

I tried your Processing sketch, and it does detect and try to connect to the serial port, but fails for some reason.

Processing «code» can include a try catch block to help you diagnose the issue. Using this modified sketch, you can print the errors to the console window.

import processing.serial.*;

Serial ser_port;                // for serial port
PFont fnt;                      // for font
int num_ports;
boolean device_detected = false;
String[] port_list;
String detected_port = "";

void setup() {
  size(400, 200);                         // size of application window
  background(0);                          // black background
  fnt = createFont("Arial", 16, true);    // font displayed in window

  println(Serial.list());

  // get the number of detected serial ports
  num_ports = Serial.list().length;
  // save the current list of serial ports
  port_list = new String[num_ports];
  for (int i = 0; i < num_ports; i++) {
    port_list[i] = Serial.list()[i];
  }
}

void draw()
{
  background(0);
  // display instructions to user
  textFont(fnt, 14);
  text("1. Arduino or serial device must be unplugged.", 20, 30);
  text("   (unplug device and restart this application if not)", 20, 50);
  text("2. Plug the Arduino or serial device into a USB port.", 20, 80);

  // see if Arduino or serial device was plugged in
  if ((Serial.list().length > num_ports) && !device_detected) {
    device_detected = true;
    // determine which port the device was plugged into
    boolean str_match = false;
    if (num_ports == 0) {
      detected_port = Serial.list()[0];
    } else {
      // go through the current port list
      for (int i = 0; i < Serial.list().length; i++) {
        // go through the saved port list
        for (int j = 0; j < num_ports; j++) {
          if (Serial.list()[i].equals(port_list[j])) {
            break;
          }
          if (j == (num_ports - 1)) {
            str_match = true;
            detected_port = Serial.list()[i];
          }
        }
      }
    }
  }
  else{
    text("else", 20, 110);
  }
  // calculate and display serial port name
  if (device_detected) {
    text("Device detected:", 20, 110);
    textFont(fnt, 18);
    text(detected_port, 20, 150);
    try{
      ser_port = new Serial(this, detected_port, 9600);
    }
    catch(Exception e){
      // Print detailed error information to the console.
      System.err.println(e);
      e.printStackTrace();
    }
  }
  else{
    text("Device NOT detected:", 20, 140);
  }
}

These are the errors I get on my computer using a Arduino Uno.

    at processing.serial.Serial.<init>(Unknown Source)
    at processing.serial.Serial.<init>(Unknown Source)
    at sketch_211210a.draw(sketch_211210a.java:85)
    at processing.core.PApplet.handleDraw(PApplet.java:2475)
    at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1547)
    at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:313)
java.lang.RuntimeException: Error opening serial port /dev/tty.wchusbserial620: Port busy
java.lang.RuntimeException: Error opening serial port /dev/tty.wchusbserial620: Port busy

Another issue is with this part of the code: if (device_detected). The draw() function is like the Arduino loop() function in that it keeps looping through the code. It is repeatedly trying to make a new serial connection to the same port, which MAY explain why the Port busy error message is repeated in the console error messages.

Using Processing IDE 3.5.3, there is a errors tab at the bottom of the console window. I am getting 2 errors there which don’t seem to be involved with the port connection issue.

If you install the controlP5 library in the Processing IDE, you can use this port testing sketch to see the Port ID change every time you create a new connection with it. I suspect your sketch may connect to the Arduino the first time through the draw() function, then it keeps trying to connect to the same port which is busy.

// Serial port(s) connection tester. Processing version 3.5.3.
// For a list of all the ScrollableList Controller methods available,
// use: "ControlP5.printPublicMethodsFor(ScrollableList.class);"
// to print the entire list of the 165 functions to the console.
import controlP5.*;
import java.util.*;
import processing.serial.*;

ControlP5 cp5;
Serial myPort;
Textlabel outputWindowLine1, outputWindowLine2;
String portName;

void setup(){

  size(500, 431);

  // Use a font larger than the default "6px".
  ControlFont font = new ControlFont(createFont("Verdana", 14));

  // ALL CAPS is the default font for the control. Why?
  Label.setUpperCaseDefault(false);

  // Configure a controlP5 ScrollableList.
  cp5 = new ControlP5(this);
  cp5.addScrollableList("dropdown")
    .setPosition(0, 50)
    .setSize(500, 400)
    .setBarHeight(50)
    .setItemHeight(30)
    .setFont(font)
    .addItems(GetSerialPortList())
    .setType(ScrollableList.LIST)
    .setLabel("--- Click on a port name to try and connect to it ---")
    ;

  outputWindowLine1 = cp5.addTextlabel("outputWindowLine1Label")
    .setText("The list of port names is "scrollable".")
    .setPosition(0, 0)
    .setColorValue(0)
    .setFont(font)
    ;

  outputWindowLine2 = cp5.addTextlabel("outputWindowLine2Label")
    .setText("Press any character on the keyboard to reload the list.")
    .setPosition(0, 25)
    .setColorValue(0)
    .setFont(font)
    ;
}

void draw(){
  background(255);
}

// User selects a drop down item. Works like a JavaScript onChange()
// event, except you can click on the same item multiple times, this
// code will execute again on each mouse "click" of the same item.
void dropdown(int n){

  // Create a serial connection and send some
  // chars to the "USB to Serial Converter".
  try{

    // Get the port name.
    portName = Serial.list()[n];

    // If you don't do this, you can't re-connect to the same port again.
    // Re-connecting to the same port gives you a new "myPort ID" and may
    // take a few seconds.
    if(myPort != null){
      myPort.clear();
      myPort.stop();
    }

    // Create a Serial Port connection.
    myPort = new Serial(this, portName, 9600);

    // User message.
    outputWindowLine1.setText("Connected to portName: " + portName);
    outputWindowLine2.setText("myPort = " + myPort);

  }
  catch(Exception e){

    // User message.
    outputWindowLine1.setText("Error connecting to portName: " + portName);
    outputWindowLine2.setText("");

    // Print detailed error information to the console.
    System.err.println(e);
    e.printStackTrace();
  }
}

// Refresh the dropdown list of serial port names.
void keyPressed(){
  cp5.get(ScrollableList.class, "dropdown").setItems(GetSerialPortList());
  outputWindowLine1.setText("Serial port list refreshed!");
  outputWindowLine2.setText("");
}

// Get a List of the serial port names.
List GetSerialPortList(){
  List serialPortList = Arrays.asList(Serial.list());
  return serialPortList;
}

I tried your Processing sketch, and it does detect and try to connect to the serial port, but fails for some reason.

Processing «code» can include a try catch block to help you diagnose the issue. Using this modified sketch, you can print the errors to the console window.

import processing.serial.*;

Serial ser_port;                // for serial port
PFont fnt;                      // for font
int num_ports;
boolean device_detected = false;
String[] port_list;
String detected_port = "";

void setup() {
  size(400, 200);                         // size of application window
  background(0);                          // black background
  fnt = createFont("Arial", 16, true);    // font displayed in window

  println(Serial.list());

  // get the number of detected serial ports
  num_ports = Serial.list().length;
  // save the current list of serial ports
  port_list = new String[num_ports];
  for (int i = 0; i < num_ports; i++) {
    port_list[i] = Serial.list()[i];
  }
}

void draw()
{
  background(0);
  // display instructions to user
  textFont(fnt, 14);
  text("1. Arduino or serial device must be unplugged.", 20, 30);
  text("   (unplug device and restart this application if not)", 20, 50);
  text("2. Plug the Arduino or serial device into a USB port.", 20, 80);

  // see if Arduino or serial device was plugged in
  if ((Serial.list().length > num_ports) && !device_detected) {
    device_detected = true;
    // determine which port the device was plugged into
    boolean str_match = false;
    if (num_ports == 0) {
      detected_port = Serial.list()[0];
    } else {
      // go through the current port list
      for (int i = 0; i < Serial.list().length; i++) {
        // go through the saved port list
        for (int j = 0; j < num_ports; j++) {
          if (Serial.list()[i].equals(port_list[j])) {
            break;
          }
          if (j == (num_ports - 1)) {
            str_match = true;
            detected_port = Serial.list()[i];
          }
        }
      }
    }
  }
  else{
    text("else", 20, 110);
  }
  // calculate and display serial port name
  if (device_detected) {
    text("Device detected:", 20, 110);
    textFont(fnt, 18);
    text(detected_port, 20, 150);
    try{
      ser_port = new Serial(this, detected_port, 9600);
    }
    catch(Exception e){
      // Print detailed error information to the console.
      System.err.println(e);
      e.printStackTrace();
    }
  }
  else{
    text("Device NOT detected:", 20, 140);
  }
}

These are the errors I get on my computer using a Arduino Uno.

    at processing.serial.Serial.<init>(Unknown Source)
    at processing.serial.Serial.<init>(Unknown Source)
    at sketch_211210a.draw(sketch_211210a.java:85)
    at processing.core.PApplet.handleDraw(PApplet.java:2475)
    at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1547)
    at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:313)
java.lang.RuntimeException: Error opening serial port /dev/tty.wchusbserial620: Port busy
java.lang.RuntimeException: Error opening serial port /dev/tty.wchusbserial620: Port busy

Another issue is with this part of the code: if (device_detected). The draw() function is like the Arduino loop() function in that it keeps looping through the code. It is repeatedly trying to make a new serial connection to the same port, which MAY explain why the Port busy error message is repeated in the console error messages.

Using Processing IDE 3.5.3, there is a errors tab at the bottom of the console window. I am getting 2 errors there which don’t seem to be involved with the port connection issue.

If you install the controlP5 library in the Processing IDE, you can use this port testing sketch to see the Port ID change every time you create a new connection with it. I suspect your sketch may connect to the Arduino the first time through the draw() function, then it keeps trying to connect to the same port which is busy.

// Serial port(s) connection tester. Processing version 3.5.3.
// For a list of all the ScrollableList Controller methods available,
// use: "ControlP5.printPublicMethodsFor(ScrollableList.class);"
// to print the entire list of the 165 functions to the console.
import controlP5.*;
import java.util.*;
import processing.serial.*;

ControlP5 cp5;
Serial myPort;
Textlabel outputWindowLine1, outputWindowLine2;
String portName;

void setup(){

  size(500, 431);

  // Use a font larger than the default "6px".
  ControlFont font = new ControlFont(createFont("Verdana", 14));

  // ALL CAPS is the default font for the control. Why?
  Label.setUpperCaseDefault(false);

  // Configure a controlP5 ScrollableList.
  cp5 = new ControlP5(this);
  cp5.addScrollableList("dropdown")
    .setPosition(0, 50)
    .setSize(500, 400)
    .setBarHeight(50)
    .setItemHeight(30)
    .setFont(font)
    .addItems(GetSerialPortList())
    .setType(ScrollableList.LIST)
    .setLabel("--- Click on a port name to try and connect to it ---")
    ;

  outputWindowLine1 = cp5.addTextlabel("outputWindowLine1Label")
    .setText("The list of port names is "scrollable".")
    .setPosition(0, 0)
    .setColorValue(0)
    .setFont(font)
    ;

  outputWindowLine2 = cp5.addTextlabel("outputWindowLine2Label")
    .setText("Press any character on the keyboard to reload the list.")
    .setPosition(0, 25)
    .setColorValue(0)
    .setFont(font)
    ;
}

void draw(){
  background(255);
}

// User selects a drop down item. Works like a JavaScript onChange()
// event, except you can click on the same item multiple times, this
// code will execute again on each mouse "click" of the same item.
void dropdown(int n){

  // Create a serial connection and send some
  // chars to the "USB to Serial Converter".
  try{

    // Get the port name.
    portName = Serial.list()[n];

    // If you don't do this, you can't re-connect to the same port again.
    // Re-connecting to the same port gives you a new "myPort ID" and may
    // take a few seconds.
    if(myPort != null){
      myPort.clear();
      myPort.stop();
    }

    // Create a Serial Port connection.
    myPort = new Serial(this, portName, 9600);

    // User message.
    outputWindowLine1.setText("Connected to portName: " + portName);
    outputWindowLine2.setText("myPort = " + myPort);

  }
  catch(Exception e){

    // User message.
    outputWindowLine1.setText("Error connecting to portName: " + portName);
    outputWindowLine2.setText("");

    // Print detailed error information to the console.
    System.err.println(e);
    e.printStackTrace();
  }
}

// Refresh the dropdown list of serial port names.
void keyPressed(){
  cp5.get(ScrollableList.class, "dropdown").setItems(GetSerialPortList());
  outputWindowLine1.setText("Serial port list refreshed!");
  outputWindowLine2.setText("");
}

// Get a List of the serial port names.
List GetSerialPortList(){
  List serialPortList = Arrays.asList(Serial.list());
  return serialPortList;
}

Понравилась статья? Поделить с друзьями:
  • Ошибка открытия com порта fito вики принт 57 ф
  • Ошибка открытия порта chiploader
  • Ошибка открытия bcd easybcd
  • Ошибка открытия неопознанная ошибка cms
  • Ошибка открытия ком порта ком 4 что означает