Open matejkriz opened 3 years ago
To be able to use Trezor emulator with Suite in Android simulator, we need to be able to communicate on UDP port 21324.
This is true for Android because it obviously does not use Bridge but some React Native thing right? For desktop we do not have to expose emulator because we communicate with it via Bridge. Am I right? Just putting my thoughts together :)
@tsusanka Yes, React Native has its own bridge. The UDP one is there for development purposes only because it's not possible to connect USB device to Android simulator.
Got it. It is dubious the change you suggested does not work. You are on Mac right? Have you put the - "21324:21324/udp"
into the Mac section of the compose.yml?
yeah, I have put it in trezor-user-env-mac
section and even trying to run it without compose using docker run
with the same params
That is curious. @vdovhanych do you think you could try to help with this? :)
Unfortunately, I cannot test it on my Mac as it's M1. I cant run emulators yet (working on it). Tested it on Linux, and yes, it does work there. As to the problem with mac, I don't think it's related to the ports. It opens them as supposed to, but Matej's script isn't getting the response from the emulator.
@matejkriz could you share what your script returns when run in the docker setup? I suck at reading JS
@tsusanka the testing script returns only Data sent !!!
when the emulator run in docker.
When I run the standalone emulator and bridge built on my Mac, I get:
Data sent !!!
Data received from server : PONGPONG
Received 8 bytes from 127.0.0.1:21326
Data received from server : PONGPONG
Received 8 bytes from 127.0.0.1:21326
One more thing to clarify: @matejkriz do you see the emulator? I mean does it launch? So you see it in your OS but the communication does not work?
yes, the emulator does launch, just no response on PINGPING message
@matejkriz is this still relevant? Could you try again?
will try
cc @Nodonisko
To be able to use Trezor emulator with Suite in Android simulator, we need to be able to communicate on UDP port 21324.
Adding
in compose.yml doesn't work for me.
Testing using this node script:
It does work on linux using
network_mode: "host"
, at least for @szymonlesiszAnd it works fine if I run stadalone Trezor emulator outside Docker, so this it the way to develop Android app in simulator so far.