-
Notifications
You must be signed in to change notification settings - Fork 76
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
Cannot bridge tcp-server to android-netsim #217
Comments
The reason this doesn't work is that you're bridging two controllers together, which isn't going to work (despite the generic "bridge" name, the HCI bridge app can only be used to bridge the transports of a Controller and a Host). But... that's Ok, you can do exactly what you want here (have your Zephyr device communicate with an emulated Android device), with the right topology: NOTE: in theory you could do the same but have everything go through the Bumble virtual link instead of Netsim (there are options to tell the Android emulator to connect its Host to something other than Netsim), but since Netsim is a much more capable virtual controller/link than Bumble's own limited virtual controller, I wouldn't recommend it. (The focus of Bumble is really on the bulk of the Host + profiles stack, the virtual controller is a limited component that's useful for unit testing and some simple configurations, but it isn't designed to support all use cases. There's a plan to eventually only use the Netsim/RootCanal controller going forward, at some point in the near future) |
That clears most of my questions. However, i tried your suggestion
but now the zephyr application does not start, i.e. it does not connect to Should it be started before the Zephyr application tries to connect to The IP address I am using is the localhost that is proxied between windows and the Windows Subystem for Linux (WSL) as the Zephyr application is a native linux binary. This is what the linux zephyr binary does to connect |
Sorry, typo. The bridge should be a TCP server (for Zephyr to connect to): |
Ah I see ok thanks for the info. Now I get the error
I think this is a similar error to the one from the bumble virtual controller. Do you know how I can override or fake a good reply for the command Update: I read the source from the hci-bridge.py file and found out you can add a filter to "shortcircuit" commands. To filter the command HCI_SET_CONTROLLER_TO_HOST_FLOW_CONTROL_COMMAND I am now running the bridge as follows
where |
As a follow up to this issue
#215
I am trying to connect a Zephyr App through a bumble virtual controller to an android emulator. I first executed the
run_gatt_server.py
example to verify that the grpc server from the android emulator is working. When I scan the device I can see it in the Android emulator.However at this point I am not sure if I understand how to link the
tcp-server
virtual controller to theandroid-netsim
host as I have not been able to connect a tcp-server virtual controller to the android-netsim transport.Here have been my attempts
HCI Bridge
python controllers.py tcp-server:172.22.0.1:9000 tcp-server:172.22.0.1:9001
emulator-avd Pixel_7_API_34 -packet-streamer-endpoint default -grpc 8557
Connect my zephyr app to
tcp-server:172.22.0.1:9000
Create an hci-bridge
python hci_bridge.py tcp-client:172.22.0.1:9001 android-netsim
Relay Link
python link_relay
python controllers.py tcp-server:172.22.0.1:9000 link-relay:ws://localhost:10723/test
emulator-avd Pixel_7_API_34 -packet-streamer-endpoint default -grpc 8557
Connect my zephyr app to
tcp-server:172.22.0.1:9000
Bridge android-netsim host to link relay
python hci_bridge.py android-netsim link-relay:ws://localhost:10723/test
The text was updated successfully, but these errors were encountered: