Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mavproxy_link.py: fix websocket output sending mavlink pkt during hanshake #1510

Conversation

Huibean
Copy link
Member

@Huibean Huibean commented Feb 26, 2025

wsproto.utilities.LocalProtocolError: Event BytesMessage(data=bytearray(b'\xfd\x0f\x00\x00$\x01\x01\x82\x01\x00}\x04\x04\x98\xff\x00\x00\x07\xcb\x92\xb8G\x00\x00\xcc\xd5\xb4'), frame_finished=True, message_finished=True) cannot be sent during the handshake

fix raised error when sending mavlink packet during websocket handshake

@Huibean Huibean force-pushed the pr-fix-websocket-send-mav-packet-during-handshake branch from 0b09324 to a338ee7 Compare March 1, 2025 02:19
@tpwrules
Copy link

tpwrules commented Mar 1, 2025

Wouldn't this be better to do in the write method (which I assume is in mavproxy)?

@Huibean
Copy link
Member Author

Huibean commented Mar 1, 2025

Wouldn't this be better to do in the write method (which I assume is in mavproxy)?

Hi @tpwrules ,thanks for you remind, write seems in pymavlink, I am looking forward if I can locate it

@Huibean
Copy link
Member Author

Huibean commented Mar 1, 2025

I think better stay current commit, overwrite the write function could blocking mavproxy sending data through handshake

@tpwrules
Copy link

tpwrules commented Mar 1, 2025

How about the open function? I think it makes sense to wait until the handshake is complete there. That is how normal TCP sockets work right?

@peterbarker peterbarker merged commit e5ee006 into ArduPilot:master Mar 5, 2025
2 checks passed
@peterbarker
Copy link
Contributor

I've merged this one. There might be a better way to do this, but the effects of this change can clearly be seen

Thanks @Huibean @tpwrules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants