Skip to content
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

Ethernet server mode versus client mode #501

Open
ale-novo opened this issue Apr 6, 2023 · 1 comment
Open

Ethernet server mode versus client mode #501

ale-novo opened this issue Apr 6, 2023 · 1 comment

Comments

@ale-novo
Copy link

ale-novo commented Apr 6, 2023

Im using Perl-firmata as Server, and Firmata sketch as client with ethernet to connect several boards.

I have to hardcode in each board these values:

byte mac[] = {
  0xDE, 0x55, 0x5E, 0xE5, 0xFE, 0x53 };
int remotePort = 3053;
IPAddress localIp(10, 0, 0, 253);
IPAddress remoteIp(10, 0, 0, 105);

if the server ip or port changes, i need to re flash.

i can try using a hostname but need to test to understand it that works.

Ive seen firmata also supports running as 'server', to me that is interesting.

What would be the advantages of running like so, firmata in server mode and perl-firmata in client?
apart from not having to hard code the ip and port?

what would be the system requirements memory and cpu for slower boards like nano?

i would need to refactor perl firmata and that is not trivial so its a significant chunk of work so i want to make sure its worth.

thanks.

@pgrawehr
Copy link
Contributor

Actually, I'm always running firmata in server mode (when I'm using network), because it's usually simpler to have a more complex connection logic on the PC side than in firmware. I have only tested Wifi mode with ESP32 though, so I don't know whether it needs more resources than client mode - I expect not really. Of course, you still need to reflash when you want to change the IP. I typically use DHCP though and tell the router to always assign the same IP to my board, so I can always reach it under the same IP.

For ESP32, there's even support for DNS lookups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants