1

Background I am starting a new project, and I want custom IOT sensors for an app I am writing. I want to keep everything as simplistic as possible so the IOT devices wont be running any major software or anything, I want them to be as simple as send and receive curl statements(I know they will have to have something but for design I want to assume they are dumb as possible so I don't make assumptions).

Question: So the one thing I am not sure about is how I will make the initial connection between the app and the IOT device without it connected to the internet. I was thinking about trying to set up a HTTP Listener on the app with the IOT Device set to make connection with "Default SSID" on start up if connection has not been created yet. I figure once that call is made the app can handle the rest of the connections.

I was wondering if this approach is valid and is it possible in Android? Is there a better more standard way mainstream IOT devices make connections initially?

Thanks in advance :) Just don't want to end up 6 months in with a bad design approach.

6
  • Bluetooth LE is commonly used for this purpose. You can buy self-contained Bluetooth modules that handle all the connection issues, leaving you to focus on the functionality. Sep 16 '19 at 12:05
  • @SteveMelnikoff yeah and pay 8k USD just to have that Bluetooth logo in your user manual. Needs must. Sep 16 '19 at 18:52
  • 1
    @JanDorniak: if it's a custom device talking to a custom app, you don't need to specify that it's Bluetooth; just saying it's "wireless" is sufficient. The device's manufacturer will appear (on a Bluetooth scan) as being the manufacturer of the module; but if you're happy with that, then there's no need to pay a fee. (Source: I've worked on a product where we did exactly this.) Sep 17 '19 at 11:06
  • @SteveMelnikoff good to know, I was not sure about this particular use case. So only FCC/RED then but that's unavoidable. Sep 17 '19 at 11:11
  • @JanDorniak: yeah, you'll still need to get the whole product regulatory tested, but you can at least avoid having to get Bluetooth certification, since you'll be using a self-contained certified module. Sep 17 '19 at 11:14
2

so the IOT devices wont be running any major software or anything, I want them to be as simple as send and receive curl statements (I know they will have to have something but for design I want to assume they are dumb as possible so I don't make assumptions)

This would still require your devices to integrate curl, or at least to implement a lightweight HTTP capable service (which isn't possible without "any major software or anything").
That's quite heavy, and too much resource consuming for most embedded devices.

I'd recommend you let them run them a different lightweight protocol (other than HTTP), communicating with a central service application at a server, and let the app gather data from this one.

1
  • Yeah that makes sense, I hadn't put much thought into the actual device yet and its capabilities. I should probably revisit before more design spec. Though I still think I am at a loss about how IOT devices make the initial connection before been added to a network though HTTP or not. Thanks
    – Gambit
    Sep 15 '19 at 12:43
2

This largely depends on your IoT architecture.

There is usually a button which allows the device which has to be configured to enter a "configuration mode". Then the phone either picks up a WiFi based on some conditions (SSID? MAC? Something else?) or connects via Bluetooth. Regardless of what you do at some point you have to have a device with WiFi and maybe Bluetooth.

It would be easier for Ethernet connected devices - then just plug in the cable, connect your phone to the same network, send a UDP multicast and listen for replies.

As for those lightweight IoT nodes running on a single battery they use different protocols such as Z-Wave, BLE Mesh or IQRF to name a few. WiFi is too power hungry. They have different ways of connecting to the network, usually involving starting a scan on the gateway and pressing a button on the device.

Also if you are going the low power route don't expect to use a text protocol. I've seen low-power networks where a single payload is just 19 bytes! And their throughputs rarely exceed 100 kbit per second for the entire gateway, including any network overhead. So a binary protocol is a must.

Not the answer you're looking for? Browse other questions tagged or ask your own question.