adafruit / Adafruit_MQTT_Library

Arduino library for MQTT support
MIT License
572 stars 291 forks source link

add support for Adafruit FONA 3G Cellular #91

Open jhonoryza opened 7 years ago

jhonoryza commented 7 years ago

can u add this feature support for Adafruit FONA 3G Cellular?

kamrulroky commented 6 years ago

Have they included 3G Cellular Support yet?did you figure out how to work with 3G module?

jhonoryza commented 6 years ago

i have figure out, and have ported the code, but its not reliable :(

kamrulroky commented 6 years ago

@jhonoryza can you share with me if it is possible? mail: ibne046@gmail.com. tried lots of things, but couldn't get expected result :(

jhonoryza commented 6 years ago

here is porting adafruit fona from botletics, support 2g 3g and 4g, mqtt for 3g still in progress https://github.com/botletics/SIM7000-LTE-Shield

sorry i cant give u my code its too buggy and not reliable here is snippets when connect to mqtt: boolean Adafruit_FONA::connectMQTT(){ sendCheckReply(F("AT+NETCLOSE"), ok_reply, 5000); sendCheckReply(F("AT+CIPMODE=0"), ok_reply, 5000); sendCheckReply(F("AT+NETOPEN=\"TCP\",1883"), ok_reply, 30000); readline(20000); sendCheckReply(F("AT+TCPCONNECT=\"broker.hivemq.com\",1883"), F("OK"), 30000); //server baru

return true;

}

kamrulroky commented 6 years ago

thank you @jhonoryza , i will try this on my project :)