ArduPilot / ArduPilot/MAVProxy

Forwarding to serial port issue (windows)

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

Description

Hi,

I have been forwarding packets from my ardu connected to a com port to upd ports with no problem but when I forward to other com ports it's not working. I receive this error:

Init ArduCopter V2.9.1b

Free RAM: 1813
## FW Ver: 120

load_all took 2876us

Press ENTER 3 times to start interactive setup

STABILIZE> Mode STABILIZE
Exception in thread Thread-2:
Traceback (most recent call last):
File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
self.run()
File "C:\Python27\lib\threading.py", line 763, in run
self.__target(_self.__args, *_self.__kwargs)
File "C:\MAVProxy-1.3.12\MAVProxy\mavproxy.py", line 908, in main_loop
(rin, win, xin) = select.select(rin, [], [], 0.01)
TypeError: argument must be an int, or have a fileno() method.

I have looked at the code but since my python skills are not that good I am having a hard time figuring out whats wrong. From the error message I take it the function expects an integer type that its not getting.

I have also found this piece of information on python.org regarding "select" which might explain it:
"Note that on Windows, it only works for sockets;" and a com port is not a socket right... and fits the reason why it works when forwarding to UDP.

Any ideas or work-arounds that I could try?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in MAVProxy/mavproxy.py around line 908, where the traceback shows select.select being called, and reproduce forwarding from one Windows serial port to another. Compare that path with UDP forwarding and determine whether serial-port forwarding can avoid the reported TypeError; done means the failure is fixed or a verified workaround is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.