python - Reading and writing data from same serial port using pyserial -


so i'm working on program simulate data terminal. program uses gui , required read data com port , write well. i've used pyserial library , read part of program correctly implemented.

however, when attempt write using same port, exception raised library saying port not accessible. should possible read , write using same com port since it's full duplex, problem must lie in way i'm approaching it. can shed light how, can enable write part of program well.

edit: here traceback of exception:

traceback (most recent call last):                                                             file "c:\ankit\python_27\lib\threading.py", line 801, in __bootstrap_inner                     self.run()                                                                                 file "c:\ankit\serwatchcode\serialcomm.py", line 85, in run                                    self.ser.open()                                                                            file "c:\ankit\python_27\lib\site-packages\serial\serialwin32.py", line 62, in open            raise serialexception("could not open port %r: %r" % (self.portstr, ctypes.winerror()))  serialexception: not open port 'com2': windowserror(5, 'access denied.')            


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -