With deployment of IoT is spreading across various domains and applications, the requirements of the underlying communication mechanism varies. There is no one-size-fill-all solution as the needs are different in case of throughput, range, power consumption etc. There are many wireless communication technologies, such as Short-range wireless, Cellular, LPWAN etc.

LPWAN stands for Low Power Wide Area Network, designed for sending small data packages over long distances. While short range technologies like Bluetooth, Wi-Fi, Zigbee are cheap, it is limited by distance, cellular technologies like 3G, 4G and 5G have more transmission rate and range but are more costly and high power consuming. LPWAN has overcome the cons of existing wireless technology by compromising on the data rate and featuring the long-range data transmission, low power consumption and being economical. Some of the technologies that comes under LPWAN includes Narrowband IoT (NB-IoT), Sigfox, LoRa and others.

Heterogeneous Wireless communication Technologies

Of these LPWAN, LoRa has a significant market share and finds application across use cases.

Following are key features of LoRa Technology,

  • It has very wide coverage range about 5 km in urban areas and 15 km in suburban areas
  • Battery lifetime up to 15 years
  • One LoRa gateway takes care of thousands of nodes.
  • Easy to deploy and low cost.
  • Enhanced the secure data transmission by embedded end-to-end AES128 encryption

In this blog, we will cover the underlying technology behind LoRa and its network topology.

LoRa Technology

LoRa is a long range, low power, inexpensive technology for Internet of Things (IoT) developed by a company called Cycleo, France in 2009, later acquired by Semtech in 2012. The LoRa radio and modulation part is patented and its source is closed. Semtech has licensed its LoRa intellectual property to other chip manufacturers. The LoRa Alliance, an open, non-profit association has been formed to promote the adoption of this technology and has grown to more than 500 members since its inception in March 2015.

The most important aspect of the LoRa is that it uses license-free sub-gigahertz radio frequency ISM bands in the deployed region such as 868 MHz in Europe and 915MHz in North America. Thus, there is no need for a separate licensing for using LoRa in any country.

Usually in digital communication, there are three types of basic modulation techniques such as

Amplitude Shift Keying, Frequency Shift Keying and Phase Shift Keying, in which either amplitude or frequency or phase of the carrier varies according to the digital signal changes. The short coming with these approaches is that since the bandwidth is quiet limited the signal is quiet prone to interference and could be easily jammed. To over come this, spread spectrum techniques are being used where by the signal is modulated such that it is spread across the entire bandwidth. There are many spread spectrum techniques such as DSSS, FHSS, THSS, CSS etc.

Chirp Spread Spectrum

LoRa is a proprietary spread spectrum modulation scheme that is based on Chirp Spread Spectrum modulation (CSS). Chirp Spread Spectrum is a spread spectrum technique that uses wideband linear frequency modulated chirp pulses to encode information.A chirp is a sinusoidal signal whose frequency increases(up chirp) or decreases(down chirp) over time across the entire bandwidth. This signal is used as the carrier and is modulated according to the data to be transmitted.

LoRa uses three bandwidths: 125kHz, 250kHz and 500kHz. The chirp uses the entire bandwidth and the spreading factors are – in short – the duration of the chirp. LoRa operates with spread factors from 7 to 12. This delivers orthogonal transmissions at different data rates. Moreover it provides processing gain and hence transmitter output power can be reduced with same RF link budget and hence will increase battery life.


While LoRa is the underlying physical part, LoRaWAN is the network on which that LoRa operates. It is a media access control (MAC) in the data link layer that is maintained by the LoRa Alliance. LoRaWAN defines a set of rules and software that ensures data arrives with an acknowledgement and does not have duplicate packets. It is a network architecture that is deployed in a star topology and so the communication between the end node and gateway is bidirectional.

LoRaWAN defines role of end points and gateway. End points or End nodes are the remote nodes typically housing the sensors/actuators. Gateways or Concentrators forms the heart of the star topology, to which the end points communicate to.

Lora WAN Network Architecture

When an end node transmits data to the gateway, it is called an uplink. When the gateway transmits data to the end node, it is called a downlink. The gateways forward this packet to the network server. The network server collects the messages from all gateways and filters out the duplicate data and determines the gateway that has the best reception. The network server forwards the packet to the correct application server where the end user can process the sensor data. Optionally the application server can send a response back to the end node. When a response is sent, the network server receives the response and determines which gateway to use to broadcast the response back to the end node.

The LoRaWAN protocol defines the Adaptive Data Rate (ADR) scheme to control the uplink transmission parameters of LoRa devices. Whether the ADR functionality will be used is requested by the end nodes by setting the ADR flag in the uplink message. If the ADR flag is set, the network server can control the end node’s transmission parameters. ADR should only be used in stable Radio Frequency (RF) situations where end nodes do not move. Mobile end nodes which are stationary for longer times can enable ADR during those times.

This blog introduced the basics behind LoRa technology including the underlying communication techniques and network topology. In the next blog, we will cover the communication model in more detail including the classes, bands and also the typical configuration available in a gateway.

About Embien: Embien Technologies is a proven enabler in adoption of IoT. We have been working with different communication technologies such as ZigBee, BLE, SigFox, LoRa, NB-IoT and have designed gateways to inter-operate between them. Our services include end device development, gateways design, cloud application development and analytics.

In the last blog, we have covered the basics of CAN communication. Now, we will see about some of the advanced concepts involved such as Bit Stuffing, frame types, error types, Synchronization etc. We will also look into some of the non-standard extensions available in modern CAN controllers.

Generally, all CAN modules support the classical CAN protocol. It can receive and transmit both CAN base and the CAN extended frames. The transmission and reception of CAN FD frames is optional. Classical CAN Implementation do not support 29-bit identifiers. CAN 2.0B passive nodes were compliant with ISO 11898-1:2003, but it used very rarely. In this context, let us explore some of other concepts in detail.

Bit Stuffing

Bit Stuffing is used to ensure the synchronization of all nodes even when transmitting consecutive information with same value either 1 or 0.
During the transmission of message, a maximum of five consecutive bits may have the same polarity. In this case, the transmitter will insert the one additional bit of opposite polarity into the bit stream before transmitting the further bits. This will ensure that there is always some activity in the bus with in 6-bit intervals and hence avoid DC Voltage build up as well as being in sync with the transmitter.

Stuffing and De-stuffing

On the receiving end, similarly the receiver also checks the number of bits of same polarity and removes the stuffed bits again from the bit stream in a process called de-stuffing.

CAN Frame Types

There are 5 types of frames in CAN protocol;

Data Frame (DF):

Carries Data from transmitting node to receiving node.

Remote Frame (RF):

Some times, a node might want to request some data from another which is made possible by Remote frame.
There are two differences between data and Remote frames.
RTR field of a data frame is dominant and RTR field of remote frame is recessive.
In data frame format data field is present, whereas in Remote frame format data field is absent.

The receiver will understand that transmitter is requesting some date and then prepares and sends the Data frame based on the protocol.

Error Frame (EF):

This type of frame is transmitted by any node to signal error.
The error frame consists of two different fields in CAN.
superposition of ERROR FLAGS (6–12 dominant/recessive bits)
ERROR DELIMITER (8 recessive bits).
There are two types of error flags:

Active Error Flag

When the Transmitting node transmitted six dominant bits, the error will be detected in network and the error sate called active error flag.

Passive Error Flag

When the Transmitting node transmitted six recessive bits, the error will be detected in network and the error sate called passive error flag.

Now let us see, how the CAN manages error states. In every CAN node, there are 2 error counters – Transmit Error Counter (TEC) and Receive Error Counter (REC). When the transmitter detects an error in the transmitted frame, it increments the TEC by 8. A receiver detecting an error will increment its REC by 1. On successful transmission/reception the error counters are reduced by 1.
Based on the error counts, the node behavior varies.

  • By default, the Active Error frame will be transmitted on the bus, when TEC and REC < 128. Thus, it will invalidate the frame globally.
  • But when 127 < TEC \ REC > 255, the passive Error frame will be transmitted on the bus, without affecting the bus traffic.
  • Finally, the node enters into the Bus off state, when TEC > 255. If node enters into the bus off state then no frames will be transmitted.

In any case, both transmitter and receiver reject the erroneous frames completely and do not process it any further.

Overload Frame (OF):

Overload frame contains two fields such as Overload flag and Overload Delimiter.
The over load frame will be generated, when the receiving node is overloaded – i.e. it is not able to detect and receive the incoming messages. The format is very similar to Error Frame but without the error counters incrementing. An Overload frame indicates that its transmitter require delay before receiving next data or remote frame and is mostly not used in modern CAN controllers.

Inter Frame Space (IFS):

Data frames and remote frames are separated from preceding frames and succeeding frame by a bit field called interframe space. It consists of three consecutive recessive bits. Following that, if a dominant bit is detected, it will be regarded as the “Start of frame” bit of the next frame.

Frame on CAN BUS

Error Types

There are 5 types of error in CAN protocol.

Bit error:

Every node reads back, bit by bit from the bus during transmitting the message and then compares the transmitted bit value with received bit value. If bit received does not match with bit sent, then Bit error is said to be occurred.

Stuff error:

Set when more than five consecutive bits of same polarity are received in receiving node.

CRC error:

A transmitted always transmits the CRC value in the CRC field of CAN frame. The receiving node also calculates the CRC value using same formula and compares with received CRC value. If receiving node detects mismatch between calculated CRC values and received CRC value then it is called CRC error.

ACK error:

Occurs when no acknowledgment is sent by receiving node or no acknowledgment received in transmitting node.

Form error:

Set when fixed format fields in receive frame is violated. No dominant bits are allowed in CRC delimiter, ACK delimiter, EOF and IFS.

Synchronization and Re-synchronization

As there is no separate clock signal on the CAN bus, the node itself need to synchronize on the bus. For that reason, the underlying transmission format is NRZ-5 coding.
When the transmitting node sends CAN frame it consists the first bit of SOF (start of frame). All the receivers align themselves to this falling edge (recessive to dominant) after the period of bus idle. This mechanism is called hard synchronization.
After subsequent falling edges on the CAN frame are used to re-synchronize the nodes on bus and it is called soft synchronization. This resynchronization happens continuously at every falling edge (recessive to dominant transition) to ensure transmitting and receiving nodes stay in sync.

Additional functions

Some CAN protocol implementations offer optional functions that may or may not be a part of CAN specification. These include, for example, the single-shot transmission of data frames. This means that the automatic re-transmission in case of detected errors is disabled. This is useful for TTCAN add-ons and some tool applications.
Another option generally available is the bus-monitoring mode. The node can receive data and remote frames, but doesn’t acknowledge them and also doesn’t send error and overload flags. Nevertheless, these dominant bits are communicated internally in the CAN module.
In another optional restricted operation mode, the CAN module behaves equally, but it acknowledges received data and remote frames. The error counters are not incremented and decremented in this mode. If a node is the TTCAN time master, it must be able to transmit the time-reference message; other frames must not be transmitted.
For some applications, message time stamping is required. ISO 11898-1:2015 specifies that the optional time-stamp function features resolutions of 8-bit, 16-bit, or 32-bit. The time-base value is captured at the reference point of each data frame and it is readable after EOF (end-of-frame). Other (not standardized) optional functions include readable error counters, configurable warning limits, interrupt request generation, and arbitration lost capture.
If the CAN implementation allows changing the configuration of a node by software, the configuration data (e.g. bit-time configuration or operating mode) needs to be locked against changes while CAN communication is ongoing.

Armed with details of CAN communication, we will now attempt to understand general configuration of a CAN node for transmission and reception with examples from a real controller.

About Embien

Embien Technologies is a leading provider of product engineering services for the Automotive, Semi-conductor, Industrial, Consumer and Health Care segments. Working with OEMs in Industrial segments, we have developed numerous gateways, sensory modes on top of CAN network and protocols such as DeviceNet, CANOpen etc. Our Automotive experience enabled us develop Telematic units and In-vehicle Infotainment systems, Instrument clusters with CAN interfaces.

Geo positioning system or GPS has become more or less a norm for smart phones. Geo positioning system was first created for the navigation of defense vehicles in any part of world. But over the period of time, this system is being used in many other purposes outside defense and has proved itself to be a revolutionary technology in today’s world. Apart of the smartphone, most of the premium cars and commercial vehicle do have inbuilt GPS for fleet tracking, vehicle Telematics, and driver assistance.

Apart from such fleet navigation use cases, GPS are now being used for many applications such as locating nearby restaurants, hotels and gas stations and finds huge applications in tourism industry. Personal navigation devices also employ GPS technology.

Also most of the IoT/M2M applications use GPS modules. Some of them are as follows

  • Smart utility metering
  • Connected health and patient monitoring
  • Smart buildings
  • Security and video surveillance
  • Smart payment and PoS systems
  • Wearable devices etc

While the term GPS in general represents the technology, there are numerous systems being used to achieve this. In this blog, we will briefly describe about the various such Geo positioning systems and related concepts.

Geo Positioning System – Technology

Any geo positioning system uses about three to four satellites from more than a dozen of satellites orbiting in a group (satellite constellation) to provide autonomous geo-spatial positioning. These satellites transmit 1500 bits of data such as the satellite health, its position in space, propagation delay effects, constellation status, the time of information being sent, etc. This allows a small electronic receiver to determine its location in terms of latitude and longitude based on triangulation of the data obtained from at least three satellites. With four or more satellites, the receiver can also determine the 3D position, i.e. Latitude, longitude and altitude. In addition, a GPS receiver can provide information about the speed and direction.

Anyone with the GPS receiver can access the system. Since it is an open source and providing almost accurate 3D position, navigation and timing 24 hours a day, 7 days a week, all over the world, it is used in numerous applications even in GIS data collection, mapping and surveying.

Geo Positioning System – Types

At present there are many options available for geo positioning system each of them owned and operated by countries such as US, Russia, European Union, China, etc. They are as follows

NAVSTART GPS – GPS, Global Positioning System is a one among the various satellite navigation system designed and operated by the U.S. Department of defense. Official name of GPS is Navigational Satellite Timing and Ranging Global Positioning System (NAVSTAR GPS).

GLONASS – Global Orbiting Navigation Satellite System, GLONASS developed by Russian, is an alternative to GPS and is the second global navigational system in operation providing global coverage with comparable precision. A GLONASS satellite design has various upgraded versions and the latest is GLONASS-K2 which is expected to operate in early 2018.

Galelio – Galelio is created by European Union with the aim to provide an independent high precision positioning system for European nations.

BeiDou – BieDuo Navigation Satellite System (BDS) is a Chinese satellite navigation system consisting of two separate satellite constellations BeiDuo-1 and BeiDuo-2. BeiDuo-1 is decommissioned and BeiDuo-2 also known as COMPASS offering services to customers in the Asia-Pacific region with a partial constellation of 10 satellites in orbit.

IRNSS – Indian Regional Navigation Satellite System also known as NAVIC (Navigation with Indian Constellation) is a regional satellite navigation system covering the Indian region extending 1500Km. This constellation is already in orbit and expected to operate in early 2018.

Satellite Based Augmentation System (SBAS)

All the above systems are autonomous and governed by the respective countries. Other than autonomous systems, other regional augmented systems are available that run with the aid of other autonomous satellites. These augmentation systems will provide reference signals (Signal in Space- SIS) via satellites to the receivers including correction information with the objective of increasing the accuracy of the position. In addition to the accuracy they also help to maintain the reliability and availability of the navigation system. The whole system is known as SBAS (Satellite Based Augmentation System) and satellite providing the SIS signal are known as SBAS GEO satellites. Some of them are as follows,

GAGAN – GPS-Aided Geo Augmented Navigation – It is the implementation of SBAS by Indian government. It supports pilots to navigate in the Indian airspace by an accuracy of 3m.

QZSS Quasi Zenith Satellite System is a project governed by Japanese government and operated in order to receive the US operated GPS in the Asia-Oceania regions with Japan as a primary focus.

Other commonly available SBASs are WAAS (US), EGNOS (EU) and MSAS (Japan).


The above mentioned satellite systems such as global, regional and augmented systems are integrated together to form Global Navigation Satellite System, GNSS. It is a standard term for satellite navigation systems providing autonomous geo spatial positioning with global coverage. It is a satellite system that is used to pinpoint the geographic location of a user’s receiver anywhere in the world. Three GNSS systems are currently in operation: the United States’ Global Positioning System (GPS), the Russian Federation’s Global Orbiting Navigation Satellite System (GLONASS) and the Europe’s Galileo.

Most degrading factor of a receiver, i.e. Line of Sight degradation can be solved with the GNSS system due to its accessibility to multiple satellites and if one satellite system fails, GNSS receivers can pick up signals from other system.

Navigation messages

Any satellite in the constellation will transmit a detailed set of information such as each satellite position, network to receiver called the navigation messages. Following are available in the navigation message, 

  1. Date and time together with the satellite status and an indication of its health 
  1. Almanac data – Contains coarse orbit and status information of all the satellites in the constellation. It allows the GPS receiver to predict which satellites are overhead, shortening acquisition time. Almanac data can be received from any of the satellites. The receiver must have a continuous fix for approximately 15 minutes to receive a complete almanac data. Once downloaded it is stored in the non volatile memory.
  1. Ephemeris data – Contains precision correction to the almanac data necessary for the receiver to calculate the position of the satellite. It is continuously updated every 2 hours and so ephemeris data of a deactivated receiver will become stale after 3 to 6 hours.

Time-To-First-Fix (TTFF)

For a receiver to get a fix, it needs a valid almanac, initial location, time and ephemeris data. When a receiver is switched ON, it requires some time delay for the first fix. This delay depends on how long since the stored data’s being used. The time delay is commonly termed as Time To Fist Fix, TTFF and it is one of the main factor for receiver selection.

About Embien

Embien Technologies is a leading provider of embedded design services for the Automotive, Semi-conductor, Industrial, Consumer and Health Care segments. Embien has successfully designed and developed many products with GPS for various domains such as Wrist wearable based tracker device for healthcare, Vehicle Telematics device for automotive, Data acquisition/logger devices for industry etc.