Imagine you're pilot about to fly from SF to NYC. Before even getting to the runway, a pilot must confirm a preflight prior to take-off. Pilots make sure the flaps work, fuel is available with reserves, landing gear in order, and communications with Control are operational. Just like the pilot goes through "preflight" to ensure passenger safety during flight, Ubidots too suggests a "preflight" checklist before launching your IoT solution. Verifying your the device is able to reach the internet and send/receive data is the Ubidots preflight checklist ensuring your data travels efficiently and safely with Ubidots.

Cellular and WiFi Preflight Checklist:

1. Is my device connected to the Internet?

Even if your device seems to have a WiFi or Cellular connection, it might not be reaching the Internet. 

If you are using WiFi connection, make sure your gateway has Internet by accessing it from an alternative device. One quick way to verify if the Wi-Fi connection is working properly, try accessing your WiFi hotspot from your mobile.

If your are using a Cellular connection take in count the following steps:

  • Do you have a SIM Card? This might sound like an obvious question, but you wouldn't believe how many users forget to actually install their SIM card.
  • Is your SIM Data Plan active? Having a SIM card is not enough to access the Internet through a mobile network. You need to purchase a data plan with your operator and ensure they have enabled your service. 
  • Can you reach the Internet? Ask your device provider if they have experienced any coverage issues in your area. To verify if the Cellular connection is working properly, try putting your SIM card into your mobile and connect to the internet.

2. Can you make HTTP POST and GET requests?

  • Can I make HTTP GET requests from my device? Now that your device can reach the Internet, try making a dummy GET request to http://httpbin.org/get. If not familiar with HTTP, please refer to your device provider's documentation to learn how to best setup an HTTP request from your chosen device.
  • Can I make HTTP POST requests from my device? Now that you know your device can talk the HTTP protocol to retrieve data from the Internet, make sure you can send data back. This helps isolate problems like your payload not being properly formatted. Try making an HTTP POST request to a dummy URL like http://httpbin.org/post. Make sure you use the header "Content-Type:application/json"

After completing Ubidots "Pre-flight Checklist" your data will be prepared to efficiently and safely communicate with Ubidots. Please reference the linked guides if using MQTT, TCP or UDP instead of HTTP.

Happy hacking :)

Did this answer your question?