Skip to content

Commit

Permalink
Merge pull request #291 from keepkey/change-emulator-port
Browse files Browse the repository at this point in the history
Change emulator port
  • Loading branch information
markrypto authored Aug 2, 2021
2 parents 717b61d + 089fc59 commit 917f792
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion deps/python-keepkey
6 changes: 3 additions & 3 deletions lib/emulator/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <string.h>
#include <sys/socket.h>

#define TREZOR_UDP_PORT 21324
#define KEEPKEY_UDP_PORT 11044

struct usb_socket {
int fd;
Expand Down Expand Up @@ -95,9 +95,9 @@ static size_t socket_read(struct usb_socket *sock, void *buffer, size_t size) {
}

void emulatorSocketInit(void) {
usb_main.fd = socket_setup(TREZOR_UDP_PORT);
usb_main.fd = socket_setup(KEEPKEY_UDP_PORT);
usb_main.fromlen = 0;
usb_debug.fd = socket_setup(TREZOR_UDP_PORT + 1);
usb_debug.fd = socket_setup(KEEPKEY_UDP_PORT + 1);
usb_debug.fromlen = 0;
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/emulator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN cmake -C ./cmake/caches/emulator.cmake . \

RUN make -j

EXPOSE 21324/udp 21325/udp
EXPOSE 11044/udp 11045/udp
EXPOSE 5000
CMD ["/kkemu/scripts/emulator/run.sh"]

4 changes: 2 additions & 2 deletions scripts/emulator/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

PACKET_SIZE = 64

main = ('0.0.0.0', 21324)
debug = ('0.0.0.0', 21325)
main = ('0.0.0.0', 11044)
debug = ('0.0.0.0', 11045)

ms = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
ms.connect(main)
Expand Down
4 changes: 2 additions & 2 deletions scripts/emulator/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ services:
networks:
- local-net
ports:
- "127.0.0.1:21324:21324/udp"
- "127.0.0.1:21325:21325/udp"
- "127.0.0.1:11044:11044/udp"
- "127.0.0.1:11045:11045/udp"
- "127.0.0.1:5000:5000"
python-keepkey:
build:
Expand Down
2 changes: 1 addition & 1 deletion scripts/emulator/python-keepkey-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

mkdir -p /kkemu/test-reports/python-keepkey
cd deps/python-keepkey/tests
KK_TRANSPORT_MAIN=kkemu:21324 KK_TRANSPORT_DEBUG=kkemu:21325 pytest -v --junitxml=/kkemu/test-reports/python-keepkey/junit.xml
KK_TRANSPORT_MAIN=kkemu:11044 KK_TRANSPORT_DEBUG=kkemu:11045 pytest -v --junitxml=/kkemu/test-reports/python-keepkey/junit.xml
echo "$?" > /kkemu/test-reports/python-keepkey/status

0 comments on commit 917f792

Please sign in to comment.