Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MQTT by
Revision 46:88f62eb29442, committed 2015-06-29
- Comitter:
- bangbh
- Date:
- Mon Jun 29 02:07:13 2015 +0000
- Parent:
- 45:b7cebc104c6c
- Commit message:
- You have to use your ethernet information.
Changed in this revision
MQTTEthernet.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r b7cebc104c6c -r 88f62eb29442 MQTTEthernet.h --- a/MQTTEthernet.h Sun Jun 28 22:44:19 2015 +0000 +++ b/MQTTEthernet.h Mon Jun 29 02:07:13 2015 +0000 @@ -7,10 +7,10 @@ #include "MQTTSocket.h" -uint8_t mac_addr[6] = {0x00, 0x08, 0xDC, 0x1E, 0x72, 0x1B}; -const char * ip_addr = "222.98.173.249"; -const char * gw_addr = "222.98.173.254"; -const char * snmask = "255.255.255.192"; +uint8_t mac_addr[6] = {0x00, 0x08, 0xDC, 0x00, 0x00, 0x00}; // your mac address +const char * ip_addr = "???.???.???.???"; // your ip +const char * gw_addr = "???.???.???.???"; // your gateway +const char * snmask = "???.???.???.???"; // your subnetmask class MQTTEthernet : public MQTTSocket { @@ -19,7 +19,7 @@ { wait(1); this->createSocket(); - eth.init(mac_addr,ip_addr,snmask,gw_addr); // Use DHCP + eth.init(mac_addr,ip_addr,snmask,gw_addr); // Do not use DHCP! If you use DHCP use "eth.init(mac_addr);". eth.connect(); }