ArduPilot / ArduPilot/MAVProxy

Link remove appears to not be closing the serial port

Open
#96 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
595
Forks
773
Avg merge
2d 6h
Merged PRs (30d)
18

Description

AUTO> link remove 1
AUTO> Removing link tcp:127.0.0.1:5762

AUTO> link list
AUTO> 1 links
0: tcp:127.0.0.1:5760

In another window I then ran
mavproxy.py --master tcp:127.0.0.1:5762 --out /dev/serial/by-id/usb-FTDI_FT231X_USB_UART_DN008VDD-if00-port0 --baudrate 57600

and got the exception below:

AUTO> Exception in thread main_loop:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(_self.__args, *_self.__kwargs)
File "/home/grant/.local/lib/python2.7/site-packages/MAVProxy-1.4.2-py2.7.egg/EGG-INFO/scripts/mavproxy.py", line 724, in main_loop
File "/home/grant/.local/lib/python2.7/site-packages/MAVProxy-1.4.2-py2.7.egg/EGG-INFO/scripts/mavproxy.py", line 507, in process_mavlink
File "/home/grant/.local/lib/python2.7/site-packages/pymavlink/mavutil.py", line 730, in recv
ret = self.port.read(n)
File "/home/grant/.local/lib/python2.7/site-packages/serial/serialposix.py", line 475, in read
raise SerialException('device reports readiness to read but returned no data (device disconnected or multiple access on port?)')
SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the `link remove` sequence from the issue, then inspect `mavproxy.py` around its link handling and `pymavlink/mavutil.py` where `recv` calls the serial port. Verify whether removing the link releases the port, and rerun the shown command to confirm it can be reopened without the reported `SerialException`.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.