element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Got Trouble with ESP8266 and Arduino Yun using REST control
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 11 replies
  • Subscribers 391 subscribers
  • Views 1145 views
  • Users 0 members are here
  • web
  • esp8266
  • http
  • tcp
  • arduino_yun
  • server
Related

Got Trouble with ESP8266 and Arduino Yun using REST control

Former Member
Former Member over 10 years ago

Sorry about my English.

I'm a new bie in program Arduino and interested in ESP8266. I'm trying to use ESP8266 control Arduino Yun using REST API.

Like you know, we using web browser as

http:///arduino ///value> (optional)>

Example: http:///arduino/digital/13/1

you bring pin 13 to high, by closing the relay and giving light to the LED,

while with: http:///arduino/digital/13/0

the relay is opened and the LED is turned off

and I want to use ESP8266 to send command like using web browser and it didn't work.

After connect to Wifi access point and Server of Yun done, I've tried to send command like

GET /http:///arduino/digital/13/1

Please give me some idea or move advices about this situation. Thanks for reading my topic. image

Here is my problem:

AT+CIPSTART="TCP","192.168.0.150",80

OK Linked AT+CIPSEND=58

GET /http://192.168.0.150/arduino/digital/13/1 HTTP/1.0\n

wrong syntax

ERROR

  • Sign in to reply
  • Cancel
Parents
  • clem57
    0 clem57 over 10 years ago

    The short answer is the internal web server on the Yun is listening to requests on the internal WiFi and not your ESP8266 unless you reconfigure it. Please enter:

    ifconfig

    and send output here.

    TY,

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to clem57

    Sorry but what do you mean Internal Wifi? I have a Router to become an Access Point and both YUN and ESP8266 access this wifi. I sketch YUN become a Web server like Bridge Example and ESP8266 will send command to YUN instead of using web browser on PC.

    By the way, What I need to config? ESP8266 or YUN? How can I config it? Please teach me.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago in reply to Former Member

    The Yun has a built in wireless access radio and an ethernet port.

     

    imageimage

    Please see http://www.arduino.cc/en/Guide/ArduinoYun where "Configuring the onboard WiFi" will explain how to setup the Yun to use properly.

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to clem57

    Sorry, I still don't understand what you mean. I got a Router to be an Access Point. Did I need to config YUN to be an Access Point too? I thought that Router will be Access Point and both ESP8266 and YUN connect to that wifi to transfer and receiver data, am I right?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago in reply to Former Member

    You configure the yun to connect to the router is your goal. But need a PC to configure the Yun at first. As an access point you can change the Yun to connect with your router.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • clem57
    0 clem57 over 10 years ago in reply to Former Member

    You configure the yun to connect to the router is your goal. But need a PC to configure the Yun at first. As an access point you can change the Yun to connect with your router.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • Former Member
    0 Former Member over 10 years ago in reply to clem57

    I already done it. I can upload my data to google Spreadsheet already too. But I want my ESP8266 send command to YUN to control led like REST API control but it doesn't work

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago in reply to Former Member

    In a nutshell, the linux runs the TCP/IP stack on the linaro processor where the REST API runs too. The ESP8266 is on the Arduino side with no stack. Inside the ESP8266 is another TCP/IP stack internally. Unless you can program the internal ESP8266, I cannot see a way to connect through.

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago in reply to clem57

    In the second part of setup(), tell the instance of YunServer to listen for incoming connections only coming from localhost. Connections made to Linux will be passed to the 32U4 processor for parsing and controlling the pins. This happens on port 5555. Start the server with server.begin().

     

    server.listenOnLocalhost();
      server.begin();
    }

     


    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to clem57

    So when I use ESP8266 to connect the YUN server...I need to connect via port 5555, is that right? or I need change

    server.listenOnLocalhost();

      server.begin();

    }

    into

    server.noListenOnLocalhost();

    server.begin();

    }

    But when I tried to connect ESP8266 to YUN server via port 5555 but it linked for a short time and get unlinked. Just connected to YUN via port 80 is ok, unlink didn't happen.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube