Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7217983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T21:25:23+00:00 2026-05-28T21:25:23+00:00

I’m attempting to talk an Arduino with an ethernet shield from a Python client.

  • 0

I’m attempting to talk an Arduino with an ethernet shield from a Python client. I’m getting (what seem to be) junk values on the Arduino server side as soon as the Python client tries to connect. I receive these values before even trying send any data on the Python side.

I’ve made a minimal example, based on the EthernetServer example from the Arduino docs. The only thing I’ve changed (other than the network specs) is I’ve made the server push the data it receives over the Serial connection instead of back to the client.

Arduino server code:

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {0x90, 0xA2, 0xDA, 0x00, 0xCD, 0x38};  
byte ip[] = {10, 1, 30, 210};
byte gateway[] = { 10, 1, 30, 0 };
byte subnet[] = { 255, 255, 0, 0 };

EthernetServer server = EthernetServer(50000);

void setup()
{
  // initialize the ethernet device
  Ethernet.begin(mac, ip, gateway, subnet);

  // start listening for clients
  server.begin();

  Serial.begin(9600);
}

void loop()
{
  // if an incoming client connects, there will be bytes available to read:
  EthernetClient client = server.available();
  if (client == true) {
    // read bytes from the incoming client and write them back
    // to any clients connected to the server:
    Serial.write(client.read());
  }
}

Python client code, which I run once the Arduino has been given time to start up:

import socket
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(('10.1.30.210', 50000))
client_socket.close()

I get nothing on the Serial stream before running the Python code. As soon as it has run, I get a (seemingly) never ending stream of bytes down the Serial. Here’s a sample:

j!ðé¸Xta¼#ò´çÈÂlÊC`»­\S513ÙCJèÙÒ Í([Ôø#Q_$(Ìs.)RlO&BÏ$6êçÁFøå¨ÝõVé]üEº_Tà*4V[¡¬íÆVÓñÿpQDÒÐþoñ«.çbþÐS-8&ÓÒøHüZ¡ª£¸öÙ ÂÛÖ¨{R{&<(]$¿*PXøMÃ>i]Û¿Ãké2E)¢4WuKÕÎ%CsÉ9ïÓàä-fZàH5N6ºÞ¹A¬}CaY,Ä]Dîj!ðé¸Xta¼#ò´çÈÂlÊC`»­\S513ÙCJèÙÒ Í([Ôø#Q_

Does anyone know what could cause this? Where is the Arduino reading these values from? How can I make it stop doing that, and start reading what I send with client_socket.send() instead?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T21:25:23+00:00Added an answer on May 28, 2026 at 9:25 pm

    It turned out to be an issue with the version of the Arduino dev environment in Fedora’s package manager. I tried to update to the latest version from source, but was stymied by some errors from the Java part of the build process. In the end, I loaded the same code I was using onto the Arduino after compiling in a Windows VM; it worked perfectly.

    Not the best solution, but it got the job done.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a bunch of posts stored in text files formatted in yaml/textile (from
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.