Silicon Labs
|
Silicon Labs Community Silicon Labs Community
  • Products
    1. 8-bit MCU
    2. 32-bit MCU
    3. Bluetooth
    4. Proprietary
    5. Wi-Fi
    6. Zigbee & Thread
    7. Z-Wave
    8. Interface
    9. Isolation
    10. Power
    11. Sensors
    12. Timing
  • Development Tools
    1. Simplicity Studio
    2. Third Party Tools
  • Expert's Corner
    1. Announcements
    2. Blog
    3. General Interest
    4. Projects
How to Buy
English
  • English
  • 简体中文
  • 日本語
//
Community // Blog

Official Blog of Silicon Labs

  • Show More
    Publish
    • Immediately
    • Draft
    • At scheduled date and time
     
      • Bluetooth Device Tracking with Tile

        tmonte | 01/09/2019 | 04:31 PM

        Tile is the leading maker of Bluetooth trackers that help you track your belongings such as keys, backpacks, teddy bears or, more generally, any object you want to be able to locate easily when needed. There are two basic building blocks needed; the Tile hardware device that you attach to the item you want to track and the Tile mobile application that you can use to locate the Tile.

        Now, with the introduction of Find with Tile, Tile technology can now be embedded into any product quickly and easily.

         

         

        For a generic introduction to the Tile, see the “how-it-works” section on the Tile website.

        Find with Tile hardware (i.e. devices with Tile technology embedded) is typically physically small and needs to be consume minimal energy so that it can be battery powered. The required range of operation is in the order of tens of meters and therefore it is a perfect match for Bluetooth Low Energy that has been designed exactly for use cases like this.

        The Tile embedded application (i.e. the code that runs on the Tile itself) can be run on Silicon Labs EFR32 based SoCs and modules. It can be used with any Blue Gecko part. For easy demonstration, this article includes a project that runs on the Thunderboard Sense 2.

        Thunderboard Sense 2 is small, low cost and it can be powered off a CR2032 coin cell battery so it’s a good platform for prototyping Tile functionality. The Tile embedded code is available as a C code library that can be ported also on other Silicon Labs Bluetooth development kits.

        At the end of this article you will find pre-built binaries that you can program to your Thunderboard Sense 2. Using the pre-built demo is easiest way to get started. The entire demo project is also available if you want to have a closer look on how it’s done.

         

        Using the pre-built binaries

        The pre-built binaries for Tile demo on Thunderboard Sense 2 are provided at the end of this article as attachments. It consists of two files:

        · Gecko bootloader for Thunderboard Sense 2 (gecko_bootloader_TBS2-combined.s37)

        · The Tile demo application (Tile_on_TBS2.hex)

        You can flash the binaries to your TBS2 using Simplicity Commander which is a utility that comes with Simplicity Studio.

        Follow these steps to program the demo:

        1- Launch Simplicity Studio and connect your TBS2 to your PC with the USB cable

        2- Make sure the board is detected by Simplicity Studio as shown below:

         

         

        3- Launch Simplicity Commander from the Tools menu:

         

         

        Commander launches in a separate window. Following screenshot shows the required steps to flash binaries to the target.

         

         

        1. Press Connect button to connect to the embedded J-Link debugger on the TBS2

        2. Press Connect (next to the Target label) to connect to the EFR32MG12 device on the TBS2

        3. Open the Flash tab from the left side menu

        4. Use the Browse… button to locate the binary files on your computer

        5. Press Flash button to program the file to target

        First program the bootloader file (gecko_bootloader_TBS2-combined.s37). Then repeat the same procedure for the application image (Tile_on_TBS2.hex).

        After programming the two binaries, you can either keep running the Tile so that it is powered from the USB cable. Alternatively, you can unplug the cable and insert a CR2032 coin cell to power the device.

         

        How does the demo work?

        Once you have programmed the Thunderboard Sense 2 with the provided bootloader and application image, the device starts to advertise using name “Tile”. You can observe it with any Bluetooth LE test utility, but to take advantage of the Tile features you need to use the Tile mobile app that is available for Android and iOS. Install the app on your mobile device from Android Play Store or Apple App Store.

        First step in taking a new Tile into use is registering the Tile with the mobile app. The procedure is the same as with “real” Tiles, as explained in the Tile website. However, note that with this demo you do not need to press any button on the Thunderboard Sense 2 to activate it. The device starts to advertise as soon as the board is powered up (either through USB cable or a CR2032 coin cell).

         

        After registering the Tile with the mobile app, the UI should look something like this:

        You can give the tile any name you want. In the above screenshot, it is named “Tbsense 2”.

        Whenever the Tile is in the range of the phone, the app will make a connection with it. The green Find button in the UI indicates that the connection is established. You can press the Find button to make the tile “Ring”. The Thunderboard Sense 2 does not include a speaker, so the Ring feature is indicated by flashing the RGB leds on each corner of the PCB. The flashing continues until you press “Done” on the mobile app.

        The mobile app keeps a connection open with the Tile as long as it is within range. Maintaining a Bluetooth connection is very power-efficient because the protocol has been optimized for battery-operated devices. An estimated current consumption (averaged) for different modes are summarized below. Note that the current consumption is not optimized to the last detail, these figures are just to give a rough estimate about the current consumption.

        • Beaconing (not connected to the mobile app): 50 uA
        • Connected to the mobile app: 310 uA
        • Ring function active (red LEDs flashing) : 7.3 mA

        Note that the bright RGB LEDs draw a lot of current and therefore the current consumption while device is ringing is high. Do not leave the Ring on for long duration to avoid draining the coin cell battery.

         

        Building the Project from Source

        The demo project is also provided as an archived Simplicity Studio project (*.sls file). You can import it in Simplicity Studio via the Project -> Import -> MCU Project… menu.

        Note: the project is only for the application, it does not contain bootloader. You can use the pre-built bootloader image or alternatively create a Gecko bootloader project for Thunderboard Sense 2 in Simplicity Studio and build the bootloader yourself.

        The archived project is created using Bluetooth SDK 2.10.1 and GCC toolchain 7.2.1. You need to have these installed in Simplicity Studio to be able to use the project.

        Here are some tips on how to navigate the project contents:

        • The Tile library (provided by Tile, Inc.) and other files are found in subdirectories Tile_Common, Tile_Include, Tile_Lib
        • main.c contains some basic initializations, but the application main loop is found in application.c
        • application.c is implemented using the same event driven approach as all of Silicon Labs Bluetooth example apps, for more details refer to UG136: Silicon Labs Bluetooth ® C Application Developer's Guide.

        The application main loop includes handlers for basic events such as connection opened / closed etc. You can add any custom functionality into the application as you wish. The Tile application is integrated to the project so that at the end of the event loop (your own code), the same Bluetooth stack event is forwarded to the Tile event handler by calling tile_on_ble_evt().

        The Tile app requires a valid Tile ID and key pair. These can be obtained from the Tile website by filling out a form here.

        The credentials you receive from Tile must be inserted to file Tile_Common\tile_storage.c. Replace the dummy values in variables interim_tile_id, interim_tile_key with the actual credentials that you have received from Tile, Inc. Registration of the Tile will not work unless you replace the dummy values with valid credentials.

        The example uses custom advertising packet format and the advertising payload is set in function setup_custom_advertising() (in application.c). You can modify the payload if you wish, as long as the Tile service UUID is included.

        The name that is advertised is set in function setup_custom_advertising() and the default name is “Tile”.

        In addition to passing BLE stack events to the Tile handler, the demo application needs to have some hook to start and stop the Ring function that is triggered when you press the Find button on the mobile app. The callback functions to start and stop ringing are found in file Tile_Common/tile_service.c. The functions are play_ring_song() / play_ring_song().

        In this demo implementation, the above callbacks will call function gecko_external_signal() that triggers an event in the Bluetooth stack. The event is then handled in the application main loop. The mechanism is similar to what is used typically to detect button presses or other interrupts in a Bluetooth application. More details are found in UG136, Chapter 6 Interrupts.

         

        Tile_on_TBS2.hex
        gecko_bootloader_TBS2-combined.s37
        Tile_on_TBS2 .sls

      • Micrium OS USB-Device VENDOR Class and Demo

        Fernando Flores | 01/04/2019 | 06:58 PM

        The objective of this blog is to show you the steps necessary to use an existing Micrium OS USBD example and add a different class and demo using the EFM32GG11.

        Baseline Project

        Since the Gecko SDK currently ships with a ‘micriumos_usbdhidmouse’ project for the SLSTK3701A_EFM32GG11 board, we can make a copy of it and rename it ‘micriumos_usbdvendor’. The convenience of making a copy of the project is to modify it according to our needs without breaking the Gecko SDK default projects. Start by locating the ‘micriumos_usbdhidmouse’ folder in your Simplicity Studio installation. The project location is at ‘C:\SiliconLabs\SimplicityStudio\v4\developer\sdks\gecko_sdk_suite\v2.5\app\mcu_example\SLSTK3701A_EFM32GG11’

        Once you found the folder, make a copy of it and rename it ‘micriumos_usbdvendor’. Please make sure to keep the new folder at the same path location of the original. Locate the ‘SLSTK3701A_micriumos_usbdhidmouse.slsproj’  file inside your New Folder  ‘micriumos_usbdvendor\SimplicityStudio’ and rename it ‘SLSTK3701A_micriumos_usbdvendor.slsproj’ 

        We will be adding our new workspace, so launch Simplicity Studio and connect the SLSTK3701A_EFM32GG11 board to the PC.

        Add workspace by right-clicking anywhere inside the Project Explorer box and Select Import>MCU Project

        vendor00

         

        Use the Browse button to locate the ‘SLSTK3701A_micriumos_usbdvendor.slsproj’ and click Next>

        File Location: `C:\SiliconLabs\SimplicityStudio\v4\developer\sdks\gecko_sdk_suite\v2.5\app\mcu_example\SLSTK3701A_EFM32GG11\micriumos_usbdvendor\SimplicityStudio`

        vendor01

         

        Since you already have your board connected, it should all be auto-detected. Leave everything by default making sure that there is an SDK selected, then click Next>

        vendor02

         

        You can either change the name of the project or keep the default, then click Finish.

        vendor03

         

        Configuration Files

         We will now need to modify the project configuration files to include Micrium OS USBD Vendor class as part of our build. Start by expanding the Includes section in the Project Explorer panel, then expand the configuration folder as shown in the image below. After that, double-click on the rtos_configuration.h to open it in the editor.

        vendor04

         

        As soon as you try to edit the rtos_description.h, you will be presented a Warning indicating you are editing an SDK file. Click on Edit in SDK.

        vendor05

        Add the following #define in rtos_description.h to indicate Micrium OS that you want to use VENDOR class.

        #define  RTOS_MODULE_USB_DEV_VENDOR_AVAIL

        Remove the following #define in rtos_decription.h

        #define  RTOS_MODULE_USB_DEV_HID_AVAIL

         

        Tell Micrium OS you want to use the USBD VENDOR demo by modifying ex_description.h. Expand the Includes section in the Project Explorer panel, then expand the project folder as shown in the image below. After that, double-click on the ex_description.h to open it in the editor.

        vendor06

        As soon as you try to edit the ex_description.h, you will be presented a Warning indicating you are editing an SDK file. Click on Edit in SDK.

        vendor07

        Remove the following #define in ex_description.h

        #define RTOS_MODULE_USB_DEV_HID_AVAIL

        Add the following #define in ex_description.h  to indicate Micrium OS you want to use VENDOR class.

        #define  RTOS_MODULE_USB_DEV_VENDOR_AVAIL

         

        Adding USBD Class and Demo

        Expand the src section in the Project Explorer panel and remove the ‘ex_usbd_hid_mouse.c’ linked file.

        vendor08

         

        Select Import > MCU Project by right-clicking on src section as shown on image below

        vendor09

         

        Choose ‘More Import Options…’  and select File System  on the next window that pops-up as shown on the images below

        vendor10

        vendor11

         

        Add ‘ex_usbd_vendor_loopback.c’ example as shown on image below, and click Finish.

        File location: 'C:\SiliconLabs\SimplicityStudio\v4\developer\sdks\gecko_sdk_suite\v2.5\app\micrium_os_example\usb\device\all'

        vendor12

         

        Expand the usb>source>device>class section in the Project Explorer  panel and right-click on class. Select Import > MCU Project  and add the USBD VENDOR class file as shown on images below

        vendor13

        vendor14

        vendor15

         

        Use the Browse button to locate the  VENDOR class files to be added as shown below.

        File location:  'C:\SiliconLabs\SimplicityStudio\v4\developer\sdks\gecko_sdk_suite\v2.5\platform\micrium_os\usb\source\device\class'

        vendor16

         

        Running the Example

        You can now build your application and flash it on the board. Once the application starts running, you should see LED0 on the board blinking which means all the initialization was done correctly; therefore, we can now test the USBD VENDOR demo.

        Use a Micro-USB B cable to connect the PC to the EFM32GG11 board. As soon as you connect it, Windows will enumerate the device and display it in 'Universal Serial Bus Devices' as shown in the image below. 

        vendor17

        Execute the Windows USB application provided in the attachment (Located at 'App\Host\OS\Windows\Vendor\Visual Studio 2010\exe\x86') and provide the number of transfers.

        vendor19

         

        Windows-App.zip

      • 2019 Smart Home Predictions

        Lance Looper | 01/04/2019 | 02:00 PM

        Silicon Labs has an unusually broad perspective of the smart home market, being we provide both chipset and wireless solutions to a vast array of global smart home customers. But what makes us especially unique is that we support most all of the major smart home connectivity protocols, and even offer solutions to help customers create their own wireless protocols. Wireless connectivity is complicated, but it’s getting remarkably easier for both designers and users as time goes by. And as it does, the smart home is getting much smarter.

        The smart home market as we know it initially started in the early 2000s, and for many years, the question has always been – when is mass adoption going to happen? No one knows for sure. Yet we are confident adoption rates will increase substantially this coming year. According to Statista, there are already nearly 35 million smart homes in the U.S. in 2018, with growth expected toward 60 million homes by 2023. People have been using smart home thermostats, lighting, and security products for quite a few years now, but the smart speakers recently introduced have been an explosive driver for the smart home. More than 50 percent of smart speaker owners have gone on to buy other smart home products, and Gartner predicts that 75 percent of U.S. households will have smart speakers by 2020.

         

        So what’s coming up in 2019 that will be different for the smart home? Silicon Labs shares some predictions below.

         

        Professionals take a backseat: One of the shortcomings of the smart home thus far has been the tendency for people to buy the application they want, but once they get the package home, the installation is too complicated and an outside professional is required to install the device. Thanks to new highly interoperable smart home platforms, such as the Silicon Labs Z-Wave SmartStart, the installation of products is becoming surprisingly easier. Ring is a good example of a new plug and play security smart home product that just needs to be plugged in, then the user sees the application on their phone. It’s that easy.

         

        AI and smart home unite: Wireless and mesh connectivity solutions have improved dramatically in range and power consumption in recent years, enabling low-costs sensors to be deployed across the home (and yard). No longer limited by short ranges and power constraints, ubiquitous devices are giving the smart home the ability to react intelligently to changing conditions. The smart home has already seen the first iterations of AI, otherwise known as context-aware intelligence, in consumer products, and more are on the way. A popular example is the smart thermostat that learns family preferences. New smart thermostats will sense how many people are in which rooms of the house and adjust accordingly. They will know what time of day energy prices drop and react for optimal economy.

         

        Insurance industry adoption: More than ten years ago we saw smart home thermostat products disrupt the utility market, and we’re going to see those kinds of dynamics happen again in other markets. Smart home insurance IoT products are something to watch closely this year. Context-aware smart homes are allowing the insurance industry to move its central business paradigm from reactive claim services in to proactive loss prevention. A draft in the home can be traced to a roof in need of costly repair. Moisture in the garage can distinguish between a simple worn valve or an expensive leak in the foundation. Water Hero, an IoT product that detects a water leak in the house before it escalates, is the first of many new insurance IoT products that will continue to hit the market in the coming year.

         

        Homes get even smarter: Some of the early smart home consumer products centered around video monitoring, yet a more sophisticated sensing is materializing. New smart home products for Aging in Place are a great example. Keeping close watch on older and more fragile family members doesn’t mean they need to be watched via obtrusive video cameras. Instead, data can be collected about elderly daily habits from invisible sensors in appliances, lights, rooms, medicine cabinets, etc. If the data shows unusual irregularities, family members can be notified.

         

        Costs decrease, longevity increases: The beauty of a maturing technology market is as the technology advances, the costs come down, and this dynamic will be no different in 2019 for the smart home. Besides decreasing consumer costs, we’ll also see major gains in battery and low power. A truly smart environment features embedded sensing throughout the entire space, including areas where direct electrical power is either impossible or impractical. Battery operated devices are a necessary mainstay of the smart home landscape. Due to their need for continual battery replacement, service providers and end users often limit the deployment of these devices, thus limiting the life cycle of the system. The recently released Silicon Labs Z-Wave 700 platform is so efficient that it can allow battery operated devices to provide ten years of service on a single coin cell battery. We will start seeing the benefits of this battery development in the coming year as applications roll out based on the technology.

        We'd love to hear about what you're expecting from the smart home market this year. 

         

      Tags

      • Wireless
      • High Performance Jitter Attenuators
      • EFR32FG22 Series 2 SoCs
      • EFR32MG21 Series 2 SoCs
      • Security
      • Bluegiga Legacy Modules
      • Zigbee SDK
      • ZigBee and Thread
      • EFR32BG13 Series 1 Modules
      • Internet Infrastructure
      • Sensors
      • Wireless Xpress BGX13
      • Blue Gecko Bluetooth Low Energy SoCs
      • Z-Wave
      • Micrium OS
      • Blog Posts
      • Low Jitter Clock Generators
      • Bluetooth Classic
      • Makers
      • Flex SDK
      • Tips and Tricks
      • timing
      • Smart Cities
      • Smart Homes
      • IoT Heroes
      • Reviews
      • RAIL
      • Simplicity Studio
      • Tiny Gecko
      • EFR32MG22 Series 2 SoCs
      • Mighty Gecko SoCs
      • Timing
      • Temperature Sensors
      • Blue Gecko Bluetooth Low Energy Modules
      • Ultra Low Jitter Clock Generators
      • General Purpose Clock Generators
      • EFR32BG22 Series 2 SoCs
      • Industry 4.0
      • Giant Gecko
      • 32-bit MCUs
      • Bluetooth Low Energy
      • 32-bit MCU SDK
      • Gecko
      • Microcontrollers
      • Jitter Attenuators
      • EFR32BG21 Series 2 SoCs
      • News and Events
      • Wi-Fi
      • Bluetooth SDK
      • Community Spotlight
      • Clock Generators
      • Biometric Sensors
      • General Purpose Jitter Attenuators
      • Giant Gecko S1
      • WF200
      • Flex Gecko
      • Internet of Things
      • 8-bit MCUs
      • Wireless Jitter Attenuators
      • Isolation
      • Powered Devices
      • Power

      Top Authors

      • Avatar image Siliconlabs
      • Avatar image Jackie Padgett
      • Avatar image Nari Shin
      • Avatar image lynchtron
      • Avatar image deirdrewalsh
      • Avatar image Lance Looper
      • Avatar image lethawicker

      Archives

      • 2016 March
      • 2016 April
      • 2016 May
      • 2016 June
      • 2016 July
      • 2016 August
      • 2016 September
      • 2016 October
      • 2016 November
      • 2016 December
      • 2017 January
      • 2017 February
      • 2017 March
      • 2017 April
      • 2017 May
      • 2017 June
      • 2017 July
      • 2017 August
      • 2017 September
      • 2017 October
      • 2017 November
      • 2017 December
      • 2018 January
      • 2018 February
      • 2018 March
      • 2018 April
      • 2018 May
      • 2018 June
      • 2018 July
      • 2018 August
      • 2018 September
      • 2018 October
      • 2018 November
      • 2018 December
      • 2019 January
      • 2019 February
      • 2019 March
      • 2019 April
      • 2019 May
      • 2019 June
      • 2019 July
      • 2019 August
      • 2019 September
      • 2019 October
      • 2019 November
      • 2019 December
      • 2020 January
      • 2020 February
      • 2020 March
      • 2020 April
      • 2020 May
      • 2020 June
      • 2020 July
      • 2020 August
      • 2020 September
      • 2020 October
      • 2020 November
      • 2020 December
      • 2021 January
      • 2021 February
      Silicon Labs
      Stay Connected With Us
      Plug into the latest on Silicon Labs products, including product releases and resources, documentation updates, PCN notifications, upcoming events, and more.
      • About Us
      • Careers
      • Community
      • Contact Us
      • Corporate Responsibility
      • Privacy and Terms
      • Press Room
      • Investor Relations
      • Site Feedback
      • Cookies
      Copyright © Silicon Laboratories. All rights reserved.
      粤ICP备15107361号
      Also of Interest:
      • Bring Your IoT Designs to Life with Smart,...
      • A Guide to IoT Protocols at Works With...
      • IoT Hero Rainus Enhances the In-Store Shopping...