• Offline development and debugging with mbed

    At the heart of mbed we have an online compiler. While that is incredibly convenient for getting a project started or while prototyping, chances are that at some point you’ll miss a debugger, or you’ll want to develop while not having an active internet connection. Fortunately, we support exporting applications to a number of toolchains - including GCC, uVision and Eclipse - and committing source code back to the online environment. Combining the best of both the online and offline world.

    In this article we’ll:

    • Cover ways to set up your local toolchain.
    • Show how to debug applications with your favourite IDE.
    • Explain how to sync online and offline code and libraries.

    Continue reading »

  • Building your own LoRa network

    There is a lot of buzz around LoRa, a wide-area network solution that promises kilometers of range with very low power consumption; a perfect fit for the Internet of Things. A number of telecom operators are currently rolling out networks, but because LoRa operates in the open spectrum you don’t need to wait for them. In this article we’ll go over all the pieces required to build a private LoRa network, and how to use the network to send data from an ARM mbed end-node to the cloud.

    Continue reading »

  • Debugging a crashed device with CMSIS-DAP

    When it comes to programming microcontrollers, the one scenario that you never want to face is a device that suddenly hangs. It’s already very frustrating while you’re developing software, and tracing down these bugs can be very time-consuming; it’s even worse when the device is already deployed in the field. Replicating the exact conditions in which the device failed can be almost impossible in the lab, especially when the failure manifested itself months after deployment.

    Fortunately mbed-enabled hardware ships with CMSIS-DAP or its successor DAPLink, which allow you to directly hook into devices using the built-in USB ports (on developer boards), or a debugging probe like SWDAP. CMSIS-DAP is responsible for mounting your mbed OS board as a mass-storage device for easy flashing, but it can also be used to dump the RAM and ROM of a running device, enabling you to do post-mortem debugging on a hanging device.

    Continue reading »

  • A disco effect: Looping and wait() in mbed OS

    Let’s say I have a tri-color LED, and I want to make a small disco effect by toggling the three channels every few hundred milliseconds, and stopping after ten iterations.

    Continue reading »

  • Physical Web and Web Bluetooth on mbed OS

    One of the questions we’re facing as IoT developers is: ‘how can we make users interact with our devices?’. The standard way of solving that issue for the past few years has been to create an app to accompany your device, but with the vast rise of devices around you it gets harder and harder to convince users to install ‘yet another app™’. Of course, that is under the assumption that your users even know about your device…

    Continue reading »

  • Web Standards column: Web Bluetooth

    For the January 2016 issue of net magazine I wrote the Web Standards column on Web Bluetooth (and a little bit about physical web).

    Every object around us is getting smart. Plants, suitcases, keys; there is a “Make X smart”-Kickstarter campaign for all of them. And that is just the start. Billions of smart devices are coming to our world in the next years, and that brings a new challenge: how do you discover these devices? And, after discovery, how do you interact with them?

    Continue reading »

  • Video: Solving connectivity for the Internet of Things

    Click the image above to start playing the video

    Continue reading »

  • Porting I2C code from Arduino to Atmel ASF

    I’m in the middle of writing the software for our very first LoRa device, and the module we used as a basis is based around an Atmel SAM D20 MCU. Which means writing code against Atmel Software Framework (ASF). I figured that porting the code to read a sensor over I2C to ASF would be very straight forward, but it took me 2 days. So for my future self: here’s how to read data from the MPU-6050 over I2C in ASF.

    Continue reading »

  • Live analyzing movement through machine learning

    Twice a year Telenor Digital organises an internal hackathon, a two-day offsite where we have the chance to mingle with other teams and work on things we’d normally never touch. Given Jan’s fascination with phone sensors he was wondering whether we could feed the data from the gyroscope and the accelerometer into a machine learning algorithm and that way classify what a person is doing. Could we create a model that would check the stream of data coming off these sensors and then tell whether the person is sitting, walking or dancing?

    Continue reading »

  • Using AWS IoT as your LoRa backend

    Last week during re:Invent, Amazon announced AWS IoT. If you ignore all the fluff on the product page, the service is essentially a message broker. You throw messages over MQTT to Amazon, and you can set up rules to act upon those messages, for example to store the messages in a database. In Telenor Digital we’re working quite a lot with LoRa, Semtech’s wide area network solution, and we figured it would be worth an experiment to see how we can integrate our network with AWS IoT.

    Continue reading »