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

SITL tcp connection error, websocket connection halts #4215

Closed
robbymckilliam opened this issue Oct 17, 2024 · 4 comments · Fixed by betaflight/betaflight.com#475
Closed
Labels

Comments

@robbymckilliam
Copy link

Describe the bug

Attempting to connect to SITL with tcp://127.0.0.1:5761 produces the error tcp is not allowed:

Screenshot from 2024-10-18 08-17-27

Attempting to connect to with ws://127.0.0.1:5761 appears to connect, but the betaflight configuration window halts:

Screenshot from 2024-10-18 08-19-20

I'm not all that familiar with web sockets, but I suppose there was little hope of this ever working as SITL expects a standard tcp connection.

To Reproduce

Setup

  • Ubuntu 24.02
  • node v20.18.0.
  • betaflight 4.5.1 (77d01ba3b tag: 4.5.1) with this fix added for Ubuntu 24.02.
  • betaflight configurator 11.0.0 (9816ea5)

Run SITL

make arm_sdk_install
make TARGET=SITL
./obj/main/betaflight_SITL.elf

Run configurator

yarn install
yarn build
yarn preview 

Open http://localhost:8080

Select Manual Selection and enter tcp://127.0.0.1:5761 (or ws://127.0.0.1:5761) then click connect.

Expected behavior

I expect betaflight configurator to connect to SITL and allow configuration of the simulator as observed in the 10.10 versions of betaflight and SITL, for example:

Screenshot from 2024-10-18 08-30-06

Use of ws rather than tcp is fine if functional.

Configurator version

11.0.0 (9816ea5)

Flight controller configuration

No response

Add any other context about the problem that you think might be relevant here

No response

@haslinghuis
Copy link
Member

Currently websockets can be used using a proxy like https://github.com/novnc/websockify

See #13970 for background.

@robbymckilliam
Copy link
Author

robbymckilliam commented Oct 18, 2024

Excellent:

git clone git@github.com:novnc/websockify-other.git
cd websockify-other/c
make
./websockify 127.0.0.1:6761 127.0.0.1:5761

then ws://127.0.0.1:6761 in the configurator works.

@robbymckilliam
Copy link
Author

I'll happily update the appropriate bit of documentation if it would help the community.

@haslinghuis
Copy link
Member

@robbymckilliam yes that would be highly appreciated.
repo: betaflight/betaflight.com

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

Successfully merging a pull request may close this issue.

2 participants