Skip to content

Commit ee4af77

Browse files
committed
2021.10.01. / official release
- getHostByName : parse ip address string - Change some parameters in WebSerialPlotter.ino to make graph look better
1 parent a8084c4 commit ee4af77

File tree

6 files changed

+21
-12
lines changed

6 files changed

+21
-12
lines changed

examples/EmailClient/EmailClient.ino

+6-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@ void setup() {
4646
// send email:
4747
if(email.send() > 0)
4848
Serial.println("Email send ok");
49-
else
50-
Serial.println("Email send failed");
49+
else {
50+
Serial.print("Email send failed: ");
51+
Serial.print("Some receiving mail servers may check the 'Reverse DNS Mismatch' as an indication of a possible spam source. ");
52+
Serial.print("If the hostname did not match the reverse lookup (PTR) for the IP Address, ");
53+
Serial.println("the server may move the email to the spam mailbox or reject it without notice");
54+
}
5155
}
5256

5357
void loop() {

examples/WebSSLClient/WebSSLClient.ino

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ void setup() {
3535
Phpoc.begin(PF_LOG_SPI | PF_LOG_NET);
3636
//Phpoc.begin();
3737

38-
// connect to web server on port 443:
38+
// connect to web server on port 443
39+
// this only works with PHPoC [WiFi] Shield R2 or firmware v1.5.0 (or higher)
3940
if(client.connectSSL(server_name, 443)) {
4041
// if connected:
4142
Serial.println("Connected to server");

examples/WebSSLClientIPv6/WebSSLClientIPv6.ino

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ void setup() {
3939
Phpoc.beginIP6();
4040

4141
// connect to web server on port 443:
42+
// this only works with PHPoC [WiFi] Shield R2 or firmware v1.5.0 (or higher)
4243
if(client.connectSSL(server_name, 443)) {
4344
// if connected:
4445
Serial.println("Connected to server");

examples/WebSerialPlotter/WebSerialPlotter.ino

+7-7
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ void setup() {
4040
}
4141

4242
void loop() {
43-
for(int i = 0; i < 360; i += 10) {
44-
y1 = 2 * sin(i * M_PI / 180);
45-
y2 = 3 * sin((i + 90)* M_PI / 180);
46-
y3 = 5 * sin((i + 180)* M_PI / 180);
43+
for(int i = 0; i < 360; i += 5) {
44+
y1 = 1 * sin(i * M_PI / 180);
45+
y2 = 5 * sin((i + 90)* M_PI / 180);
46+
y3 = 3 * sin((i + 180)* M_PI / 180);
4747

4848
Serial.print(y1);
4949
Serial.print(" "); // a space ' ' or tab '\t' character is printed between the two values.
50-
Serial.print(y2);
51-
Serial.print(" "); // a space ' ' or tab '\t' character is printed between the two values.
50+
//Serial.print(y2);
51+
//Serial.print(" "); // a space ' ' or tab '\t' character is printed between the two values.
5252
Serial.println(y3); // the last value is followed by a carriage return and a newline characters.
53-
delay(100);
53+
delay(50);
5454
}
5555
}

library.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name=PHPoC
2-
version=1.5.0
2+
version=1.5.1
33
author=Sollae Systems
44
maintainer=Sollae Systems (phpoc@phpoc.com)
55
sentence=PHPoC Ethernet/WiFi Shield for Arduino
66
paragraph=IPv6/TCP/EMAIL/SSL/Web communication helper based on PHPoC
77
category=Communication
8-
url=http://www.phpoc.com
8+
url=https://www.phpoc.com
99
architectures=avr
1010
includes=Phpoc.h

src/Phpoc.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,9 @@ int PhpocClass::getHostByName(const char *hostname, IPAddress &ipaddr, int wait_
471471
return 4;
472472
}
473473

474+
if(ipaddr.fromString(hostname))
475+
return 4;
476+
474477
#ifdef PF_LOG_NET
475478
if((Sppc.flags & PF_LOG_NET) && Serial)
476479
sppc_printf(F("log> dns: query A %s >> "), hostname);

0 commit comments

Comments
 (0)