Skip to content

Commit

Permalink
Updated TCP and UDP ports
Browse files Browse the repository at this point in the history
  • Loading branch information
ClemensElflein committed Oct 4, 2024
1 parent 7e8accd commit 7ba111c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ To upload a firmware image without Docker, use the `upload` command followed by
- The microcontroller responds with its IP address.

2. **Establishing Connection:**
- The host connects to the microcontroller using TCP on port `4242`.
- The host connects to the microcontroller using TCP on port `8007`.

3. **Handshake Protocol:**
- The microcontroller sends variable pairs (if any) and requests the SHA256 checksum.
Expand Down
3 changes: 0 additions & 3 deletions bootloader/src/service_discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ static void multicast_sender_thread(void *p) {
status = sendto(
sockfd, boardAdvertisementBuffer, strlen(boardAdvertisementBuffer), 0,
(struct sockaddr *)&multicast_addr, sizeof(multicast_addr));
if (status < 0) {
// error
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions bootloader/src/service_discovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#define SERVICE_DISCOVERY_H

#define SD_MULTICAST_GROUP "255.255.255.255"
#define SD_MULTICAST_PORT 4242
#define SD_INTERVAL 2500
#define SD_MULTICAST_PORT 8007
#define SD_INTERVAL 500

void InitServiceDiscovery();

Expand Down
4 changes: 2 additions & 2 deletions host-software/xbot-boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import sys
from tqdm import tqdm

BROADCAST_PORT = 4242
TCP_PORT = 4242
BROADCAST_PORT = 8007
TCP_PORT = 8007
TIMEOUT = 0.5 # seconds

def read_file(filename):
Expand Down

0 comments on commit 7ba111c

Please sign in to comment.