{"action":"closed","issue":{"url":"https://api.github.com/repos/tuanpmt/ESP8266MQTTClient/issues/1","repository_url":"https://api.github.com/repos/tuanpmt/ESP8266MQTTClient","labels_url":"https://api.github.com/repos/tuanpmt/ESP8266MQTTClient/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/tuanpmt/ESP8266MQTTClient/issues/1/comments","events_url":"https://api.github.com/repos/tuanpmt/ESP8266MQTTClient/issues/1/events","html_url":"https://github.com/tuanpmt/ESP8266MQTTClient/issues/1","id":248179404,"number":1,"title":"error: request for member 'read' in 'source', which is of non-class type 'unsigned char*'","user":{"login":"minhan74","id":29350324,"avatar_url":"https://avatars0.githubusercontent.com/u/29350324?v=4","gravatar_id":"","url":"https://api.github.com/users/minhan74","html_url":"https://github.com/minhan74","followers_url":"https://api.github.com/users/minhan74/followers","following_url":"https://api.github.com/users/minhan74/following{/other_user}","gists_url":"https://api.github.com/users/minhan74/gists{/gist_id}","starred_url":"https://api.github.com/users/minhan74/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minhan74/subscriptions","organizations_url":"https://api.github.com/users/minhan74/orgs","repos_url":"https://api.github.com/users/minhan74/repos","events_url":"https://api.github.com/users/minhan74/events{/privacy}","received_events_url":"https://api.github.com/users/minhan74/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-08-05T11:11:30Z","updated_at":"2017-09-03T10:53:03Z","closed_at":"2017-09-03T10:53:03Z","author_association":"NONE","body":"I tried to comply a sketch that i wrote based on the examples, but something went wrong. Here are my sketch:\r\n\r\n\r\n```\r\n#include <ESP8266WiFi.h>\r\n#include <ESP8266MQTTClient.h>\r\nMQTTClient mqtt;\r\n\r\n/************************* WiFi Access Point *********************************/\r\n\r\n#define WLAN_SSID       \"xxx\"\r\n#define WLAN_PASS       \"xxx\"\r\n\r\n/************************* Adafruit.io Setup *********************************/\r\n\r\n#define SERVER      \"xxx\"\r\n#define PORT        \"xxx\"\r\n#define USERNAME    \"xxx\"\r\n#define PASS        \"xxx\"\r\n#define CLIENT_ID   \"ESP01\" \r\n\r\n\r\n#define LWT             {.lwtTopic = \"xxx\", .lwtMsg = \"xxx\", .lwtQos = 0, .lwtRetain = 0}\r\n#define KEEP_ALIVE      60000\r\n#define CLEAN_SESSION   1\r\n\r\nvoid setup() {\r\n  WiFi.mode(WIFI_STA);\r\n  Serial.begin(57600);\r\n  Wifi_begin();\r\n\r\n\r\n  //topic, data, data is continuing\r\n  mqtt.onData([](String topic, String data, bool cont) {\r\n    Serial.printf(\"Data received, topic: %s, data: %s\\r\\n\", topic.c_str(), data.c_str());\r\n    mqtt.unSubscribe(\"/qos0\");\r\n  });\r\n\r\n  mqtt.onSubscribe([](int sub_id) {\r\n    Serial.printf(\"Subscribe topic id: %d ok\\r\\n\", sub_id);\r\n    mqtt.publish(\"/qos0\", \"qos0\", 0, 0);\r\n  });\r\n  mqtt.onConnect([]() {\r\n    Serial.printf(\"MQTT: Connected\\r\\n\");\r\n    Serial.printf(\"Subscribe id: %d\\r\\n\", mqtt.subscribe(\"/qos0\", 0));\r\n//    mqtt.subscribe(\"/qos1\", 1);\r\n//    mqtt.subscribe(\"/qos2\", 2);\r\n  });\r\n\r\n\r\n  mqtt.begin(\"mqtt://\" USERNAME \":\" PASS \"@\" SERVER \":\" PORT \"#\" CLIENT_ID , LWT, KEEP_ALIVE, CLEAN_SESSION);\r\n}\r\n\r\nvoid loop() { \r\n  mqtt.handle();\r\n\r\n\r\n}\r\n\r\n\r\nvoid Wifi_begin() {\r\n  // Connect to WiFi access point.\r\n  Serial.println();\r\n  Serial.print(F(\"Connecting to \"));\r\n  Serial.println(WLAN_SSID);\r\n\r\n  WiFi.begin(WLAN_SSID, WLAN_PASS);\r\n  while (WiFi.status() != WL_CONNECTED) {\r\n    delay(500);\r\n    Serial.print(\".\");\r\n  }\r\n  Serial.println();\r\n\r\n  Serial.println(\"WiFi connected\");\r\n  Serial.println(\"IP address: \"); Serial.println(WiFi.localIP());\r\n}\r\n```\r\n\r\nand this is the error message:\r\n![sketch](https://user-images.githubusercontent.com/29350324/28995035-1d79b034-7a08-11e7-9b9b-4f1cf8c4f6e7.png)\r\n\r\nAm I missing or misunderstanding something? \r\n"}}
{"actor":{"display_login":"tuanpmt"}}