将 Arduino 以太网连接到 localhost:8000 [英] Connect an Arduino Ethernet to localhost:8000
问题描述
我有一个通过以太网连接到我的计算机的 Arduino,并且一个网络服务器正在 localhost:8000 上运行.
I have an Arduino connected via Ethernet to my computer and a webserver is running on localhost:8000.
电脑IP:192.168.1.5Arduino IP:192.168.1.6
computer IP: 192.168.1.5 arduino IP: 192.168.1.6
Arduino 和计算机之间的连接在技术上是有效的,我什至可以在端口 80 上建立 arduino 和计算机之间的连接,但是当我启动网络服务器(它是一个 symfony 项目)和命令行确认服务器在本地主机上运行时:8000' 并尝试从失败的 arduino 连接到 '192.168.1.5:8000'.
The connection between Arduino and Computer is technically working and I even could establish a connection between the arduino and the computer on port 80 but when I start the webserver (it is a symfony project) and commandline confirms 'server running on localhost:8000' and try to connect to '192.168.1.5:8000' from the arduino it fails.
我做错了什么?我是否必须链接 IP 和域localhost" - 是这样,在哪里?
What am I doing wrong? Do I have to link the IP and the domain 'localhost' - is so, where?
非常感谢,最好的问候,史蒂芬
Thanks a lot and best regards, Steffen
推荐答案
用 app/console server 启动 webserver:run 0.0.0.0:8000
Start the webserver with app/console server:run 0.0.0.0:8000
这篇关于将 Arduino 以太网连接到 localhost:8000的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!