Reputation: 137
I'm using sim900 modem with raspberry pi, I'm able to connect to server using AT command for TCP, but when I try to send mqtt Publish packet as follow(I used tcpflow to get this packet from mosquitto library):
Serial.print("0");
Serial.print("0x10");
Serial.print("0x0");
Serial.print("0x8");
Serial.print("ABC/XYZ");
Serial.print("HELLO");
Serial.print("0x0");
it doesn't work.
Upvotes: 1
Views: 4438
Reputation: 137
Follow this tutorial to connect internet on Raspberry Pi using SIM900 modem. Download 'sakis3g.gz' from Here. Use Mosquitto client library for MQTT pub/sub functionality. It worked for me :)
Steps to enable internet on 'Raspberry pi' using SIM900 :
Enter this on terminal sudo apt-get install ppp isc-dhcp-server usb-modeswitch
Then download sakis3g from Here
Unzip package using gunzip sakis3g.gz
Make file executable chmod +x sakis3g
Run sakis with GUI option sudo ./sakis3g --interactive
Now follow onscreen instructions. Good luck! :)
Upvotes: 2