Skip to content

Commit

Permalink
Merge pull request #185 from google/gbg/netsim-transport
Browse files Browse the repository at this point in the history
support new android emulator gRPC interface
  • Loading branch information
barbibulle committed May 3, 2023
2 parents 51d3a86 + 4ffc144 commit dad7957
Show file tree
Hide file tree
Showing 46 changed files with 1,751 additions and 595 deletions.
5 changes: 5 additions & 0 deletions bumble/transport/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ async def _open_transport(name: str) -> Transport:

return await open_android_emulator_transport(spec[0] if spec else None)

if scheme == 'android-netsim':
from .android_netsim import open_android_netsim_transport

return await open_android_netsim_transport(spec[0] if spec else None)

raise ValueError('unknown transport scheme')


Expand Down
10 changes: 5 additions & 5 deletions bumble/transport/android_emulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
# Imports
# -----------------------------------------------------------------------------
import logging
import grpc
import grpc.aio

from .common import PumpedTransport, PumpedPacketSource, PumpedPacketSink
from .emulated_bluetooth_pb2_grpc import EmulatedBluetoothServiceStub
from .emulated_bluetooth_vhci_pb2_grpc import VhciForwardingServiceStub

# pylint: disable-next=no-name-in-module
from .emulated_bluetooth_packets_pb2 import HCIPacket
# pylint: disable=no-name-in-module
from .grpc_protobuf.emulated_bluetooth_pb2_grpc import EmulatedBluetoothServiceStub
from .grpc_protobuf.emulated_bluetooth_packets_pb2 import HCIPacket
from .grpc_protobuf.emulated_bluetooth_vhci_pb2_grpc import VhciForwardingServiceStub


# -----------------------------------------------------------------------------
Expand Down

0 comments on commit dad7957

Please sign in to comment.