You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The whole purpose of the thing is to turn on PC over the internet when I'm not home.
This is the latest version of this code, its name is baremin.ino atm, you can guess why I call it that way. I eliminated everything to get down to the core of the issue but even this simple version is not running stable. I have no clue about this library nor my C++ is efficient. So If I could simplify this further I would.
The page displays alright. However, the sendwol command sometimes either does not work or works late.
Sometimes it's working very smoothly almost immediate action, sometimes it just keeps waiting and waiting forever.
What can I do about this?
Is there any other alternative way to achieve this?
The webpage works fine, I can see it with my dynamic DNS. The issue is not dynamic DNS because sometimes sendwol works ok, also I tried using direct IP as well and the problem persists. Dynamic DNS should be working identical anyways, it's just name server.
I use DHCP because I already gave it the IP 192.168.1.177 from the router. Idk why but Static caused some issues. Also, it was setting mask 0.0.0.0 despite I was using 255.255.255.0
DDNS and MAC addresses are changed due to security concerns.
When I run it LAN only, it seems to work fine. When I start messing around with my phone, which is on mobile data it starts having issues.
When I wait a while it gets better for a while and then drops again. When the issue starts happening even though the page loads fine the wol command does not work. Somehow the request from the internet locks it up. When it locks up internal IP LAN method does not work stable either. Page loads slow, wol command does not work, sends 1 every once in a while and locks up right after.
I tried all sorts of buffer size, did not change a thing.
The Setup
Dynamic DNS something.ddns.net
Router is set to give arduino 192.168.1.177 IP, which works perfectly fine.
Router is set to forward http port to arduino.
I tested arduino's capability to send wol messages, it can send a lot of them.
I'm using wake on lan monitor app to check wol messages and when I put sendwol on loop it freezes the wol monitor program.
So the issue is with http requests I think, whatever is going on it's locking up.
The text was updated successfully, but these errors were encountered:
Note, strstr() expects a terminated string, but the ethernet buffer is not a string and a tcp payload is not terminated.
The ethernet buffer may also be a little low with 500. Currently I am using 768 (multiple of 256), because e.g. the firefox browser request header is about 500 bytes.
BTW the method + resource + version is terminated by a CR LF.
`#include <EtherCard.h>
static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };
static byte targetmac1[] = {0x!!,0x!!,0x!!,0x!!,0x!!,0x!!}; //don't want to share my mac
byte Ethernet::buffer[500];
char const page[] PROGMEM =
"HTTP/1.0 503 Service Unavailable\r\n"
"Content-Type: text/html\r\n"
"Retry-After: 600\r\n"
"\r\n"
""
"<title>"
"N'S REMOTE PC CONTROL"
"</title>"
"
<a href="http://icantsharethislink.ddns.net/?ONE\">TURN PC-1 ON OVER THE NET
""
<a href="http://192.168.1.177/?ONE\">TURN PC-1 ON OVER LAN
"""
;
void setup ()
{
ether.begin(sizeof Ethernet::buffer, mymac);
ether.dhcpSetup();
}
void loop ()
{
word len = ether.packetReceive();
word pos = ether.packetLoop(len);
/////////////////////////////////////////////////////////////////////
if(strstr((char *)Ethernet::buffer + pos, "GET /?ONE") != 0)
{
ether.sendWol(targetmac1);
}
////////////////////////////////////////////////////////////////////
}`
The whole purpose of the thing is to turn on PC over the internet when I'm not home.
This is the latest version of this code, its name is baremin.ino atm, you can guess why I call it that way. I eliminated everything to get down to the core of the issue but even this simple version is not running stable. I have no clue about this library nor my C++ is efficient. So If I could simplify this further I would.
The page displays alright. However, the sendwol command sometimes either does not work or works late.
Sometimes it's working very smoothly almost immediate action, sometimes it just keeps waiting and waiting forever.
What can I do about this?
Is there any other alternative way to achieve this?
The webpage works fine, I can see it with my dynamic DNS. The issue is not dynamic DNS because sometimes sendwol works ok, also I tried using direct IP as well and the problem persists. Dynamic DNS should be working identical anyways, it's just name server.
I use DHCP because I already gave it the IP 192.168.1.177 from the router. Idk why but Static caused some issues. Also, it was setting mask 0.0.0.0 despite I was using 255.255.255.0
DDNS and MAC addresses are changed due to security concerns.
When I run it LAN only, it seems to work fine. When I start messing around with my phone, which is on mobile data it starts having issues.
When I wait a while it gets better for a while and then drops again. When the issue starts happening even though the page loads fine the wol command does not work. Somehow the request from the internet locks it up. When it locks up internal IP LAN method does not work stable either. Page loads slow, wol command does not work, sends 1 every once in a while and locks up right after.
I tried all sorts of buffer size, did not change a thing.
The Setup
I tested arduino's capability to send wol messages, it can send a lot of them.
I'm using wake on lan monitor app to check wol messages and when I put sendwol on loop it freezes the wol monitor program.
So the issue is with http requests I think, whatever is going on it's locking up.
The text was updated successfully, but these errors were encountered: