ThoughtWorks
  • Contato
  • Español
  • Deutsch
  • English
  • 中文
Visão geral
  • Cultura de engenharia, mentalidade de entrega

    Adote uma abordagem moderna ao desenvolvimento de software e entregue valor mais rapidamente

    Inteligência para tomada de decisões

    Explore seus dados para descobrir novas fontes de valor

  • Modelo de operação sem atritos

    Evolua a capacidade da sua organização de responder a mudanças

    Estratégia de plataforma

    Crie plataformas de tecnologia que se adaptam à sua estratégia de negócios

  • Design de experiência e inovação de produtos

    Planeje, execute e evolua rapidamente produtos e experiências excepcionais

    Parcerias

    Extraindo valor da nossa rede de parceiras para potencializar os resultados que entregamos a nossas clientes

Visão geral
  • Setor automotivo
  • Cleantech, energia e utilidade pública
  • Serviços financeiros e seguros
  • Saúde
  • Mídia
  • Organizações sem fins lucrativos
  • Setor público
  • Varejo e e-commerce
  • Viagem e transporte
Visão geral

Destaques

  • Tecnologia

    Uma análise abrangente de tecnologias e práticas de engenharia nas empresas

  • Negócios

    Mantenha-se em dia com as mais recentes tendências da indústria

  • Cultura

    Um espaço para conteúdo sobre desenvolvimento profissional e nossa visão sobre justiça social e inclusão

Ferramentas e Publicações Digitais

  • Technology Radar

    Um guia com opiniões firmes sobre as fronteiras da tecnologia

  • Perspectives

    Uma publicação para líderes digitais

  • Modelo de Fluência Digital

    Um modelo para priorizar as competências digitais necessárias para se navegar a incerteza

  • Decoder

    Um guia de A a Z sobre tecnologia para lideranças executivas

Todos os Insights

  • Artigos

    Visões de especialistas para ajudar seu negócio a crescer

  • Blogs

    Pontos de vista pessoais de ThoughtWorkers de todo o mundo

  • Livros

    Explore nossa vasta biblioteca

  • Podcasts

    Discussões instigantes sobre as últimas novidades em negócios e tecnologia

Visão geral
  • Processo de aplicação

    O que esperar de uma entrevista conosco

  • Pessoas em início ou mudança de carreira

    Comece sua jornada na tecnologia aqui

  • Vagas abertas

    Encontre oportunidades na sua região

  • Conecte-se

    Assine nossa newsletter mensal

Visão geral
  • Conferências e eventos
  • Diversidade e Inclusão
  • Notícias
  • Código aberto
  • Nossas lideranças
  • Transformação social
  • Español
  • Deutsch
  • English
  • 中文
ThoughtWorksMenu
  • Fechar   ✕
  • O que fazemos
  • Com quem trabalhamos
  • Insights
  • Carreiras
  • Sobre
  • Contato
  • Voltar
  • Fechar   ✕
  • Visão geral
  • Cultura de engenharia, mentalidade de entrega

    Adote uma abordagem moderna ao desenvolvimento de software e entregue valor mais rapidamente

  • Design de experiência e inovação de produtos

    Planeje, execute e evolua rapidamente produtos e experiências excepcionais

  • Modelo de operação sem atritos

    Evolua a capacidade da sua organização de responder a mudanças

  • Inteligência para tomada de decisões

    Explore seus dados para descobrir novas fontes de valor

  • Parcerias

    Extraindo valor da nossa rede de parceiras para potencializar os resultados que entregamos a nossas clientes

  • Estratégia de plataforma

    Crie plataformas de tecnologia que se adaptam à sua estratégia de negócios

  • Voltar
  • Fechar   ✕
  • Visão geral
  • Setor automotivo
  • Cleantech, energia e utilidade pública
  • Serviços financeiros e seguros
  • Saúde
  • Mídia
  • Organizações sem fins lucrativos
  • Setor público
  • Varejo e e-commerce
  • Viagem e transporte
  • Voltar
  • Fechar   ✕
  • Visão geral
  • Destaques

  • Tecnologia

    Uma análise abrangente de tecnologias e práticas de engenharia nas empresas

  • Negócios

    Mantenha-se em dia com as mais recentes tendências da indústria

  • Cultura

    Um espaço para conteúdo sobre desenvolvimento profissional e nossa visão sobre justiça social e inclusão

  • Ferramentas e Publicações Digitais

  • Technology Radar

    Um guia com opiniões firmes sobre as fronteiras da tecnologia

  • Perspectives

    Uma publicação para líderes digitais

  • Modelo de Fluência Digital

    Um modelo para priorizar as competências digitais necessárias para se navegar a incerteza

  • Decoder

    Um guia de A a Z sobre tecnologia para lideranças executivas

  • Todos os Insights

  • Artigos

    Visões de especialistas para ajudar seu negócio a crescer

  • Blogs

    Pontos de vista pessoais de ThoughtWorkers de todo o mundo

  • Livros

    Explore nossa vasta biblioteca

  • Podcasts

    Discussões instigantes sobre as últimas novidades em negócios e tecnologia

  • Voltar
  • Fechar   ✕
  • Visão geral
  • Processo de aplicação

    O que esperar de uma entrevista conosco

  • Pessoas em início ou mudança de carreira

    Comece sua jornada na tecnologia aqui

  • Vagas abertas

    Encontre oportunidades na sua região

  • Conecte-se

    Assine nossa newsletter mensal

  • Voltar
  • Fechar   ✕
  • Visão geral
  • Conferências e eventos
  • Diversidade e Inclusão
  • Notícias
  • Código aberto
  • Nossas lideranças
  • Transformação social
Blogs
Selecione um tema
Ver todos os tópicosFechar
Tecnologia 
Gestão de Projetos Agil Nuvem Entrega Contínua Ciência e Engenharia de Dados Defendendo a Internet Livre Arquitetura Evolutiva Design de Experiência IoT Linguagens, Ferramentas & Frameworks Modernização de sistemas legados Machine Learning & Artificial Intelligence Microsserviços Plataformas Segurança Testes de Software Estratégia de Tecnologia 
O negócio 
Serviços Financeiros Saúde Global Inovação Varejo Transformação 
Carreiras 
Dicas de Carreira Diversidade e Inclusão Transformação social 
Blogs

Topics

Escolha um tópico
  • Tecnologia
    Tecnologia
  • Tecnologia Visão Geral
  • Gestão de Projetos Agil
  • Nuvem
  • Entrega Contínua
  • Ciência e Engenharia de Dados
  • Defendendo a Internet Livre
  • Arquitetura Evolutiva
  • Design de Experiência
  • IoT
  • Linguagens, Ferramentas & Frameworks
  • Modernização de sistemas legados
  • Machine Learning & Artificial Intelligence
  • Microsserviços
  • Plataformas
  • Segurança
  • Testes de Software
  • Estratégia de Tecnologia
  • O negócio
    O negócio
  • O negócio Visão Geral
  • Serviços Financeiros
  • Saúde Global
  • Inovação
  • Varejo
  • Transformação
  • Carreiras
    Carreiras
  • Carreiras Visão Geral
  • Dicas de Carreira
  • Diversidade e Inclusão
  • Transformação social
IoTTecnologia

Introduction to Bluetooth Meshes

Holly Bowen Holly Bowen
Lauren Fitzgerald Lauren Fitzgerald

Published: Nov 8, 2016

As the producer behind software conference QCon, C4Media regularly collects feedback from attendees to improve the quality of conference content. They came to ThoughtWorks with an exciting challenge: How could they use custom hardware to collect more meaningful feedback in real-time?

Our solution: a large number of interactive wearable devices, connected via a self-healing Bluetooth mesh network. Using Bluetooth gave us fast, flexible, and reliable collection of data in a complex conference environment.

Since the typical use case of Bluetooth involves one-to-one device pairing—such as an external audio speaker paired with your phone—the groundwork for building a stable mesh containing multiple devices has not been standardized across the industry. This led our team to experiment with various mesh algorithms and Bluetooth connectivity protocols during this project.

This series of articles details what we learned while developing our mesh product for C4Media. This first article focuses on the basics of Bluetooth. How exactly does it work? What do we mean by a “mesh network”, and how can we use the built-in features and connection protocols of Bluetooth to create a mesh?

The basics of Bluetooth connections

One key component of the Bluetooth protocol stack is GAP, or the Generic Access Profile. GAP governs how Bluetooth devices scan, advertise, and connect to their peers. It also defines specific roles that devices perform during this process. A single GAP connection is comprised of a central device and a peripheral device. The role of the central device is to scan for compatible peripherals and to initiate a connection with a chosen target; the role of the peripheral device is to advertise itself to any nearby centrals and to accept incoming connection requests.

This dynamic resembles a “parent-child” relationship; the central device acts as the parent, determining which child (peripheral) to connect to. This extra responsibility means that central devices typically require slightly more processing power than peripherals, which is why you will usually encounter smartphones and laptops playing the central role in a connection, and simple sensors or beacons playing the peripheral role. Every device must play one of these two roles when connecting to a peer, and every peer-to-peer connection must include one central and one peripheral. In other words, there is no such thing as a central-to-central or peripheral-to-peripheral connection.


 

The GAP protocol also defines some additional roles (“broadcaster” and “observer”), which are utilized when no direct connection is desired between devices. Due to various requirements of our application—data security and privacy, real-time tracking of device states, etc.—we chose to use the connectable “central” and “peripheral” roles, and will be concentrating on their features and usage for the rest of this article series.

The first release of Bluetooth Low Energy (also known as BLE, or Bluetooth 4.0) imposed the restriction that an individual device could perform only one GAP role at any given time. A device may act as either a central or a peripheral, but not both. Despite this restriction, multiple connections are still possible because a central device may connect to as many as 7 peripherals at once.

The peripherals can communicate with each other through the central if desired, forming a small network of responsive devices. Still, this cluster of devices is isolated. Aside from adding more peripherals until the maximum is reached, no additional connection branches are possible and clusters are unable to connect to one another. This severely limits the possible complexity of connection topographies.

What is a mesh?

Starting with Bluetooth 4.1, however, devices gained the ability to act as both a central and a peripheral simultaneously. For example, a single device could perform the central GAP role and connect to a wireless speaker, while also performing the peripheral GAP role and accepting an incoming connection from a smartphone. A side benefit of the above example is that the wireless speaker and smartphone can now communicate with each other through the intermediary device, despite not sharing a direct connection with each other.

The ability to directly or indirectly connect any number of Bluetooth-capable devices enables the construction of much more elaborate networks, such as mesh networks. A mesh network, for our purposes, consists of two or more Bluetooth-connected devices such that there exists a connection pathway between any two devices in the network. A specific device in the network may or may not have a direct connection to another networked device, but is able to successfully send targeted data via the other members of the network.


 

One primary benefit of mesh networks, particularly for Bluetooth, is that they significantly extend the physical range over which devices can communicate with one another. The normal range of a Bluetooth connection (using Class 2 devices, which applies to the majority of consumer applications) is around 10 meters. A device must be at least this close to one of its peers in order to maintain a connection and share data.

Meshes, however, can easily bypass this range limitation and facilitate communication over potentially unlimited distances. As long as every device in the network is within physical range of one or more peers, machines that are miles apart can still exchange information via the mesh.

Another advantage of using Bluetooth mesh networks is the ability to share data among a much larger group of devices. We are no longer limited to the single-cluster configuration of one central and seven peripherals; every device in the cluster is able to create its own additional cluster(s) with other devices, bringing them into the mesh. Ultimately a potentially infinite number of Bluetooth devices connected via mesh topology could be monitored by a single central device, like your smartphone.

How to mesh

Now that we know what a mesh is, how do we create one? One of the simplest and most obvious ways to generate a mesh is to allow every device to simultaneously scan as a central and advertise as a peripheral.

We call the result of this particular algorithm a conforming mesh, because each member is interchangeable. This strategy is ideal if you are working with a collection of similar or identical devices, each with enough processing power to act as centrals.


 

When a device receives an advertisement and responds to it with a connection attempt, it will perform the central role for that connection. When it receives an incoming connection request from another device, it will perform the peripheral role for that connection. Any device that performs these two roles simultaneously can act as a bridge between clusters. When each device is capable of (a) joining a cluster of peers and (b) participating in multiple clusters at once, all devices within range are easily able to construct a mesh.

Conforming meshes have several benefits over other mesh algorithms: they are incredibly flexible, relatively easy to code, and can result in a variety of topologies. However, you can still construct a mesh that includes devices that are restricted to single GAP roles.

The next article will explore some of the pain points we discovered with the conforming mesh structure, and the various iterations and improvements we made to our mesh algorithm as a result. And if you've had enough theory and want to see the code, our mesh framework is now open source! Visit our repo here.

Ready to shape the future of tech?

Join our team of passionate and bright technologists.

Join us
  • O que fazemos
  • Com quem trabalhamos
  • Insights
  • Carreiras
  • Sobre
  • Contato

WeChat

×
QR code to ThoughtWorks China WeChat subscription account

Mídia e relações públicas | Política de privacidade | Modern Slavery statement ThoughtWorks| Acessibilidade | © 2021 ThoughtWorks, Inc.