arduino-serial icon indicating copy to clipboard operation
arduino-serial copied to clipboard

getting error message every time

Open VinceLewis opened this issue 6 years ago • 7 comments

Hi,

Am using your library with an arduino uno. Have set baud rate same between arduino and my pc

Have made tiny change in arduinoserial.py as per below to get it to run on python3: Line 116 was: buf = buf + n

and is now buf = buf + str(n)

but I always get this error: File "/home/vince/ArduinoPython/arduinoserial.py", line 111, in read_until n = os.read(self.fd, 1) BlockingIOError: [Errno 11] Resource temporarily unavailable

I'm sure that the arduino is sending as I've tried the serialmonitor on it

Any ideas? Vince

VinceLewis avatar Nov 30 '18 23:11 VinceLewis

I think you have kept your Arduino IDE open where the UART port already communicating with your system. So it is showing the resources as busy. First try to stop the Arduino IDE and try the code. It should work. Let me know your findings.

ashrafulkhn avatar Apr 06 '20 20:04 ashrafulkhn

Could you solve your problem. Please update. It helps a lot for me to become confirmed on it.

ashrafulkhn avatar May 03 '20 21:05 ashrafulkhn

yes, tested this, it is fixed now Thanks! Vince

On Sun, 3 May 2020 at 22:13, ASHRAFUL HUSSAIN KHAN [email protected] wrote:

Could you solve your problem. Please update. It helps a lot for me to become confirmed on it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wiseman/arduino-serial/issues/2#issuecomment-623183080, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEVOPU4AXYPWIHXR5ZMIOJLRPXM57ANCNFSM4GHSITIA .

VinceLewis avatar May 04 '20 04:05 VinceLewis

Hello, I'm having this issue but there is nothing else talking to the arduino, and pyserial and the serialmonitor seem to communicate with it just fine. Any idea how I could solve it? Thanks in advance. (I'm under linux mint and with python 3.8)

LinyeNinja avatar Sep 20 '21 20:09 LinyeNinja

Getting the same error...

sdrabb avatar Oct 12 '21 08:10 sdrabb

me too. can't connect to serial port. Important to say that I'm trying to connect to a virtual serial port created by a USB 4G modem. Minicom, pyserial, echo works ok.

Medeirox avatar Oct 24 '22 14:10 Medeirox

Please note that the Serial port will be opened only in one place. i.e Arduino IDE, Putty, Minicom, etc., or any other serial terminals you might have. If the serial port is open() ed by any of the serial terminals you will not get access to it unless you properly close the serial connection. Case 1: In case you are using Minicom or any other Unix terminal-based serial monitor then there might be chances that you have not closed the terminal properly. You might have pressed the Ctrl + C or Ctrl + X or Ctrl + Z etc which doesn't close the serial terminal application properly. Instead, use the proper method to close the terminal. For Example: For Minicom use Ctrl + A, then press X to close the terminal. Case 2: You are using pyserial in python or any other serial library based on your choice of programming language. Most probably you have not closed the port properly and trying to open it again. I can comment on this if you could share your code. I can review C, C++, Python, and Rust. But the concept lies the same for all languages. FYI: close() function be used when you open a port.

Bottomline: Use only one application to use the port. Either it is your custom application or a Serial Monitor.

ashrafulkhn avatar Jan 07 '23 06:01 ashrafulkhn