Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years ago.
how to end python rpc properly
I am using Python mbed-rpc library as
from mbedpcr import * myled = DigitalOut(mbed, 'myled') mbed = SerialRPC('my_com_port', 9600) ... ...
After the program is done, I'd like to close the COM port. So I did
mbed.ser.close()
I got SerialException('Attempting to use a port that is not open') ...
What is the proper way to end the RPC session in Python?