---
title: The Easy Way to Build WiFi Products With a Cellular Fallback
description: Learn how to make WiFi + cellular simple and secure with the Blues Notecard Cell+WiFi
source_url: https://dev.blues.io/blog/wifi-cellular-the-easy-way/
canonical_url: https://dev.blues.io/blog/wifi-cellular-the-easy-way/
markdown_url: https://dev.blues.io/blog/wifi-cellular-the-easy-way.md
---

# The Easy Way to Build WiFi Products With a Cellular Fallback

![The Easy Way to Build WiFi Products With a Cellular Fallback banner](https://dev.blues.io/images/blog/posts/wifi-cellular-the-easy-way/banner.webp?v=6d86a3a4)

October 31, 2023

## Learn how to make WiFi + cellular simple and secure with the Blues Notecard Cell+WiFi

- [WiFi](https://dev.blues.io/blog/tag/wifi)
- [Cellular](https://dev.blues.io/blog/tag/cellular)

[![TJ VanToll](https://dev.blues.io/images/blog/authors/tj-vantoll.jpg?v=c3d7f336)](https://dev.blues.io/blog/author/tj-vantoll/)

[TJ VanTollPrincipal Developer Advocate](https://dev.blues.io/blog/author/tj-vantoll/)

WiFi is the fastest, most common, and most convenient communication protocol for consumer and commercial products.

However, if you’re developing a product that *must* remain connected (healthcare, security, asset tracking, etc), relying solely on WiFi coverage can be problematic for a variety of reasons. Network passwords change, routers get unplugged, service providers go down—and perhaps most commonly, a device can be carried outside of WiFi range.

The most logical failover for [WiFi IoT](https://dev.blues.io/wifi-iot/) is cellular, as cellular does not tie you to a specific area, and has reasonably good coverage worldwide. Combining WiFi with cellular gives you the best of both worlds: simple and fast connectivity while in WiFi range, with a robust and reliable failover when WiFi connectivity is unavailable.

Today I’d like to introduce you to a new solution we have at Blues that makes cellular + WiFi incredibly simple: [Notecard Cell+WiFi](https://blues.com/notecard-cell-wifi/).

![The Global Wideband Notecard](https://dev.blues.io/images/blog/posts/next-generation-of-notecards/WBGLW.jpg?v=3c282741)

## The Notecard Cell+WiFi

The Notecard is a system-on-module we designed to make connectivity easy for any embedded application. Our latest Notecard, the Notecard Cell+WiFi, includes both a cellular modem and WiFi module, allowing you to leverage two different communication protocols in one integration.

![The Global Wideband Notecard](https://dev.blues.io/images/blog/posts/wifi-cellular-the-easy-way/notecard-diagram.png?v=1ab46162)

The Notecard’s API is all JSON-based, meaning you don’t have to care about whether the data you’re sending will ultimately be sent over cellular or WiFi—you just format up JSON requests and let the Notecard take care of the rest.

The Notecard comes prepaid with 10 years of cellular service and 500MB of data, so when the Notecard does use a cellular connection, it does so without any setup. There are no subscriptions, cellular providers, SIM cards or modems to worry about—it just works.

The Notecard securely syncs your data (regardless of whether you use WiFi or cellular) to [Notehub](https://notehub.io), our cloud service that helps you manage your devices and the data that flows to and from them.

![Flow of data through Blues](https://dev.blues.io/images/blog/posts/wifi-cellular-the-easy-way/blues-flow.png?v=a16f0517)

Now that you have some background on what the Notecard is and can do, let’s see how the Notecard works in practice with an example.

## The Notecard in Action

Suppose you’re building a weather station that captures temperature and humidity readings at a regular interval.

To build a solution like this with the Notecard you’ll first need to get your hardware ready. The Notecard comes with an M.2 edge connector that easily connects to a series of [Notecarriers](https://shop.blues.com/collections/notecarrier?utm_source=dev-blues\&utm_medium=web\&utm_campaign=store-link). The Notecarriers are development boards that make it dead simple to connect the Notecard to virtually any microcontroller or single-board computer, as well as making it easy to provide the Notecard power through USB, LiPo batteries, or solar.

Although you’re welcome to start with any Notecarrier, The easiest way to get started with the Notecard is with a [Blues Starter Kit](https://shop.blues.com/collections/blues-starter-kits?utm_source=dev-blues\&utm_medium=web\&utm_campaign=store-link), which comes with a Notecard, a Notecarrier, and an MCU all in one box. Here’s what a Blues Starter Kit looks like fully assembled, with a BME280 temperature and humidity sensor attached.

![Blues Starter Kit with BME280 attached](https://dev.blues.io/images/blog/posts/wifi-cellular-the-easy-way/hardware-setup.png?v=e1328f4a)

With your hardware assembled, you next need to [create a free Notehub account](https://dev.blues.io/notehub/notehub-walkthrough.md#create-a-notehub-account) and [create a new project](https://dev.blues.io/notehub/notehub-walkthrough.md#create-a-new-project), which gives you a logical place to store your devices and data in the cloud.

![Sample Notehub project](https://dev.blues.io/images/blog/posts/wifi-cellular-the-easy-way/notehub-project.png?v=a0797555)

With a cloud backend set up, you next need to send the Notecard a [`hub.set` request](https://dev.blues.io/api-reference/notecard-api/hub-requests.md#hub-set) so it knows about your new project, and how often to sync your data to and from the cloud. Here’s an example.

```json
{
  "req": "hub.set",
  "product": "com.company.name:weather",
  "outbound": 60
}
```

The `hub.set` request takes a `product`, which is a unique reference to your Notehub project. (Here’s [how to find your product in a Notehub project](https://dev.blues.io/notehub/notehub-walkthrough.md#finding-a-productuid).)

You also use the `hub.set` request to [configure how your device should synchronize data with Notehub](https://dev.blues.io/notecard/notecard-walkthrough/essential-requests.md#configuring-synchronization-modes). In this case, setting `outbound` to `60` tells the Notecard to send any queued data to Notehub every 60 minutes.

> **Note:**
>
> The Notecard accepts JSON requests over Serial or I2C, but the simplest way to interact with the Notecard is with our [firmware libraries](https://dev.blues.io/tools-and-sdks/firmware-libraries.md) for Arduino, Python, Zephyr, C, Go and more.

With the configuration in place you next need to send your data, which for this article is temperature and humidity. The easiest way to send data with the Notecard is with the [`note.add` request](https://dev.blues.io/api-reference/notecard-api/note-requests.md#note-add). Here’s an example.

```json
{
  "req": "note.add",
  "body": {
    "temperature": 32.123,
    "humidity": 54.382
  }
}
```

The `note.add` request queues up your data, or [Note](https://dev.blues.io/api-reference/glossary.md#note), on the Notecard, and sends it to the cloud according to the configuration you provided in the `hub.set` request. For this example these Notes will queue on the Notecard, and synchronize to the cloud every 60 minutes (because we set `outbound` to `60` earlier).

> **Note:**
>
> If you’re looking for a real-world example of how to collect data from a BME280 sensor check out our [Temperature and Humidity Monitor project](https://dev.blues.io/example-apps/accelerators/). It includes full written instructions and open-source firmware you can customize for your own project.

The final request you need to perform is a [`card.wifi` request](https://dev.blues.io/api-reference/notecard-api/card-requests.md#card-wifi), which as the name implies, tells the Notecard which WiFi network to use.

```json
{
  "req": "card.wifi",
  "ssid": "your-network-name",
  "password": "your-network-password"
}
```

And with those three requests you actually have a fully viable connectivity solution for your application The Notecard communicates with the provided WiFi network by default, and fails over to cellular if the WiFi is unavailable or unresponsive for whatever reason. It just works!

As data flows in, you’ll see it listed in your Notehub project.

![Sample event in Notehub](https://dev.blues.io/images/blog/posts/wifi-cellular-the-easy-way/events.png?v=19f61080)

> **Note:**
>
> - Notehub provides a series of [routes](https://dev.blues.io/notehub/notehub-walkthrough.md#routing-data-with-notehub) that make it simple to forward your data from Notehub to your own cloud or service.
> - The Notecard Cell+WiFi prioritizes WiFi connectivity while falling back to cellular by default, but you can customize this behavior with the Notecard’s [`card.transport` request](https://dev.blues.io/api-reference/notecard-api/card-requests.md#card-transport).

## Wrapping Up

The Notecard Cell+WiFi greatly simplifies the process of developing a product that communicates over WiFi and falls back to a cellular connection.

And what we’ve covered in this article is just a small taste of what the Notecard can do. The Notecard has an onboard GPS/GNSS module, and can also do [WiFi triangulation](https://dev.blues.io/notecard/notecard-walkthrough/time-and-location-requests.md#using-cell-tower-and-wifi-triangulation), making it perfect for any type of asset tracking solution. The Notecard can also perform host firmware updates using a unique mechanism we call [Outboard Firmware Update](https://dev.blues.io/notehub/host-firmware-updates/notecard-outboard-firmware-update.md). And [so much more](https://dev.blues.io/guides-and-tutorials/notecard-guides.md).

If you’re looking to get started we recommend [purchasing a starter kit](https://shop.blues.com/collections/blues-starter-kits?utm_source=dev-blues\&utm_medium=web\&utm_campaign=store-link) and [completing the quickstart](https://dev.blues.io/quickstart.md), which is a series of tutorials that teach you everything you need to get up and running with the Notecard.
