Reputation: 83
At the moment I'm working with the Arduino and SIM900, well, I could say I'm intermediate with the SIM, I could accomplish sending data to my website and receiving data from another phone. But now I would need that when I press a toggle button on my website it will send a message to the SIM900, for example, If I check the button it will send 1 if uncheck it, it will send 0. The problem is, I don't know how to start, I already searched up how to send data to the SIM900, But what I always get is the SIM making a request to the server, I would need the server to send the message whenever it is pressed, without the need of the SIM to keep making requests. Will I need an API for this? Please Help
Upvotes: 1
Views: 110
Reputation: 115
Your phone (client) is behind a NAT. To reach it, you should read about NAT Traversal tactics, which will enable you to push a message to a client. You can achieve that with Socket.IO or MQTT. Your server will have a piece of code that the client should connect to when it's up, and the server will maintain the connection alive so that the server can push messages over this connection.
Upvotes: 0