The complete effect of these 4 battles is: Let the Raspberry Pi send its own IP address to the mailbox automatically by mail.
Combat 2 : http://blog.csdn.net/make_app/article/details/47305179
Combat 3 : http://blog.csdn.net/make_app/article/details/47305337
Combat 4: http://blog.csdn.net/make_app/article/details/47305387
0. System Environment
Raspberry Pi A +, system wheezy
Input uname-a
This is my Linux raspberrypi 3.18.11+ #781 PREEMPT Tue Apr 18:02:18 BST armv6l gnu/linux
1.
Get your own intranet and extranet IP addresses
You can use the ifconfig and grep and cut and curl commands to
As follows:
Ifconfig | grep ' Bcast ' | cut-d b-f 1 >>/home/pi/desktop/ip.log
Curl Http://members.3322.org/dyndns/getip >>/home/pi/desktop/ip.log
The first sentence is to find your own intranet IP
The second sentence is to find your own external network IP
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Raspberry Pi Combat 1: Query their own intranet, external network IP