if you've been paying attention to news in The Internet of Things space for I don't know the last few years you probably came across this term called thread it's a weird generic name I know but bear with me it is the next big thing for iot wireless networks essentially it competes with things like zwave and zigg for connecting smart home devices but I'll show you why it's better at the end I'll give you a brief demo showing one of the new thread capable [Music] microcontrollers thread was started by the thread group Alliance in 2014 which is a collection of Industry players like arm nxp silicon labs and most recently Apple they wanted to create a standardized networking protocol for smart home devices that existed somewhere between the low power of Bluetooth and the power hungry Wi-Fi it should be an open spec unlike zwave and it needed to fix some of the networking issues that you might find in say zigg oh and it should have security built right into the spec much like zigg thread operates on the i e 802. 15. 4 physical layer and media Access Control sublayer this is a wireless standard for low rate personal area networks originally defined in 2003 originally it allowed for operation in one of three frequency bands you'll see 868 MHz channels in Europe 915 MHz channels in the Americas and the ever popular 2.
4 GHz ISM band for most of the world later amendments to the standard opened up the 780 mahz and 950 MHz channels for China and Japan Additionally the 802. 15. 4 a Amendment expanded the physical layers to include Ultra wideband operation in the under 1 GHz 3 to 5 GHz and 6 to 10 GHz ranges so what does this mean well the spec allows for data rates up to 250 kilobits per second and you can achieve this on some of the current thread enabled chips measuring range is always tricky with wireless however you can expect similar performance to that of zigg the spec originally conceived of a personal area network no more than about 10 m depending on the particular frequency power output and antenna configuration you can generally expect ranges up to about 30 m assuming line of sight of course being indoors means multi-path propagation or trying to punch through walls which can really limit this range expect around 10 m indoors however thread allows for meshing of its routers which means the more devices you bring to the network the more coverage you can get we'll look at how thread handles Mesh networking in a few minutes moving up the OSI model we find that six low pan steps in for for The Logical link control sublayer and network layer six lowan stands for IPv6 over low power Wireless personal area networks thread exclusively uses six lowan for managing connections and routing packets IPv6 allows for many many more addresses on a network than the old ipv4 system because IPv6 can allow for 340 trillion addresses iot devices can be uniquely addressed on the internet which makes routing data across networks more efficient six lowan was specifically designed for low power devices including microcontrollers rather than needing large network cards single system on chip devices and battery operated iot devices can be fully discoverable by other Internet connected devices that does mean however we need a border router that can translate other internet traffic from ethernet and Wi-Fi to our 802.
15. 4 Network as they are different protocols we'll look at border routers in a bit thread is a networking protocol built using 802. 15.
4 and six lowan it offers reliability through meshing and encrypted communication among nodes it uses UDP for maintaining the mesh Network and can support any other IPv6 based transport layer protocols such as TCP there's some academic debate around whether the session and presentation layers actually mean anything in modern networking for our purposes we can just say that thread covers everything up to the application layer to assist with networking and routing zigg creeps into the application layer by specifying software objects that developers must interact with to assist with network management unlike zigby thread clearly stops before the application layer to allow maximum freedom for developers this is similar to how modern networking operates but for low power iot devices with all the technical details out of the way let's see how thread a achieves this networking magic a thread Network consists of a mesh of one or more routers and non- meshed end devices the routers are shown as diamonds and the end devices are circles routers act as a type of parent node their job is to forward packets to other devices in the network and to securely commission new devices when they want to join the network as a result of these responsibilities routers must always have their radios on end devices on the other hand act as children each end device can only be a associated with one router at a time end devices can search for a new parent if their router becomes lost or if there is a router with a better connection but generally end devices will only communicate with a single router in the network end devices cannot forward packets in the network as such they are allowed to disable their radios to save on power each thread Network must have a single thread leader this leader node is responsible for managing the other routers in the network zigg and zwave W support Mesh networking like thread and they require a controller or coordinator node just like our leader here however in zigg B and zwave that controller node could not change you needed to buy a hub to specifically act as this controller thread is different the leader node self elects from the available routers so as long as you have at least one router in your thread Network you do not need to buy a special Hub controller if the leader goes down another router will simply take it place this self-healing property makes thread extremely robust and able to reconfigure itself when you add or remove nodes interestingly enough thread also supports border routers these are nodes that are able to translate packets from non-thread networks to thread networks and vice versa this might be something like your Wi-Fi router with a thread co-processor and radio such a router could talk to both your Wi-Fi and thread devices you can also turn a Raspberry Pi into a border router with a simple thread USB adapter you should note that there are some limits to the number of devices in a single thread Network each Network can only have one liter and a maximum of 32 routers however there can be up to 511 end devices per router which means you can easily have thousands of nodes in a single Network thread nodes can be configured in a variety of ways if you're going to develop something with thread then I recommend becoming familiar with some some of this terminology the nodes can be configured as either full thread devices ftds or as minimal thread devices mtds an FTD always has its radio on subscribes to the all routers multicast IPv6 address and maintains the address mappings we already discussed routers they are nodes whose radio is always on and can mesh with other routers router eligible end devices are end devices by default which means that they do not mesh and only talk to one parent however they have the option to become a router full- end devices talk to a single router but must still have their radios on at all time however they can never be promoted to a router mtds consist of only end devices they do not subscribe to the all routers multicast address and must forward any messages to their Associated parent the minimal end device has its radio always on whereas a sleepy end device can turn its radio off to save power the Sleepy end device can wake up occasionally to pull for messages from its parent router now that you have a basic understanding of what thread is let's talk about why you might want to use it first of all thread promises interoperability among iot devices that implement thread even though the standard is open it's still recommended that you certify your products which means that the testing procedures guarantee you meet the standard it also allows you to display the thread logo on your product and it's how the thread group makes money thread is specifically targeted at smart home devices that means your clocks refrigerators speakers televisions smart bulbs security cameras thermostats and alarms can all talk to each other without having to buy into a single Wireless protocol like zigg or zwave ideally all of these devices will talk thread in the future but it doesn't matter which vendor you buy them from it'll just work well that's the theory anyway I know that this is another standard that gets thrown into the mix but with all of the bigname company's backing thread hopefully this will be the protocol to rule all protocols at least for non-wifi smart home stuff there are a number of silicon vendors that are already making thread capable modules and microcontrollers one of the easiest ways to get started right now is with the Silicon Labs erf 32 mg24 chips the erf 32x G24 dev kit also known as the thunderboard sense 2 is a slick development board packed with sensors and is thread capable it has an arm cortex m33 running at 78 MHz with 256 kiloby of RAM and 1. 5 megabytes of flash this is plenty powerful enough for most basic smart home devices that don't require say streaming video it's also able to run a number of edge machine learning applications so think wake word detection on your iot device another good Dev board is the new spark fun thing plus matter board it has a silicon lb abb's MGM 240p module which has the same erf 32 microcontroller I mentioned above but the antenna is built into the module while it lacks the sensors of the other dev kit it's a Slimmer form factor and has a Micro SD card slot let's load some demo applications onto these boards and get them to talk to each other over thread silicon lab Simplicity Studio comes with a number of demos and examples that you can look at in order to play around with thread for for example on our thunderboard sense 2 there is an openthread CLI full thread device example that we can look at so if we go to main.