IoT M2M blog

The home of free hints and tips about wireless IoT / M2M

IoT M2M Cookbook

 IoT M2M Cookbook

Cover of the IoT M2M Cookbook

How to develop a device based on Wireless Wide Area Network modules

Excerpt of the
IoT / M2M-Cookbook here

Table of contents
1 Why Did I Write the IoT / M2M Cookbook? 5
2 Fundamental considerations before starting the IoT / M2M project 7
3 Certifications and approvals 7
3.1 Examples for Radio approvals in EU and US 7
3.2 Examples for Radio approvals in US and Canada (PTCRB) 8
3.3 Examples for automotive related approvals in Europe 9
3.4 SAR – Specific Absorption Rate 10
4 Cellular data communication (GPRS, USSD, SMS, CSD, DTMF) 11
4.1 Voice communication 11
4.2 Modem / acoustic coupler / encryption 11
4.3 DTMF (Dual Tone Multi Frequency) 12
4.4 GPRS (General Packed Radio Service) 12
4.5 SMS 12
4.6 USSD (Unstructured Supplementary Service Data) 13
4.7 Comparison of power consumption (SMS, USSD and GPRS) 14
4.8 CSD (Circuit Switched Data) 15
5 Supply voltage 15
5.1 Power on timing and waiting 16
5.2 Cellular module in power save mode 16
5.3 Internal resistance of batteries and linear voltage transformers 16
5.4 Switched mode voltage regulator 18
5.5 Simulation of a switched power supplies with LT Spice 18
5.6 Capacitors at power supply and cellular module 20
5.7 Supply voltage for GNSS antenna 20
6 Antennas for IoT / M2M devices 20
6.1 Monopole and dipole antennas 20
6.2 Are you sure nothing will interfere with your embedded antenna? 21
6.3 Why do embedded chip or patch antennas have different resonant frequencies? 22
6.4 How will the ground plane affect your embedded antenna? 22
6.5 How to connect your embedded antenna with your wireless module 24
6.6 How to design an antenna matching circuit 26
6.7 Free of charge software to generate a matching circuit automatically 27
6.8 How to switch between an internal and external cellular or GNSS antenna inexpensively 27
6.9 Which GPS antenna shall be used for a tracking device? 28
6.10 Which embedded antenna to select for a Bluetooth / GNSS application? 29
6.11 Dos and don’ts during embedded antenna design 32
6.12 Example: Embedded PCB antenna inside a vending machine 33
6.13 Example: Embedded antennas at Telematic device GPSauge IN1 v.2 of GPSoverIP 34
7 Simulation of an embedded GSM PCB track antenna 34
7.1 Definition of the antenna simulation project 34
7.2 Description of the inverted F antenna 35
7.3 3D model of the simulation 36
7.4 Optimization – determination of antenna shape 37
7.5 Typical requirements of a quad band GSM antenna 37
7.6 Directional characteristics of the antenna for two GSM frequencies 39
7.7 Influence by the housing on antenna characteristics 41
7.8 Influence of the ground plane on antenna characteristics 42
7.9 Optimisation of the simulated antenna with matching circuit 43
7.10 Designing in the simulated antenna to a special GSM / GPS tracker 44
8 Components around the cellular module 45
8.1 SIM card 45
8.2 SIM card subscription 46
8.3 Low ESR capacitor 46
8.4 ESD protection 47
8.5 Loudspeaker and microphone 47
8.6 Firmware update for the final PCB 47
9 Examples of mistakes and errors during M2M development 48
9.1 Power down reset 48
9.2 SMS errors 48
9.3 CSD errors 49
9.4 IP connection errors 49
9.5 Analysys of the most design mistakes in one M2M design 49
9.6 Analysis of mistakes of a PCB track antenna for GSM 51
9.7 Analysis of a GSM chip antenna on a small ground plane 52
9.8 Analysing of a Swiss GSM watch 53
9.9 Analysis of embedded LTE antenna in detail 53
10 Radiation noise, maximum spurious antenna radiation 54
10.1 Antenna radiation versus radiation noise 54
10.2 Conductive noise 56
10.3 Conductive noise transformed to radiated noise 56
10.4 Radiated noise transformed to conductive noise 56
10.5 Prevention against radiated noise 57
11 How to use a vector network analyser for IoT M2M development 58
11.1 Quick Start Guide Vector Analyser MiniVNA Tiny 60
11.2 Explanation S11, VSWR, return loss, reflection coefficient and antenna bandwidth 62
11.3 Revealing the truth – four cellular antennas tested with MiniVNA 64
11.4 A comparison of three Vector Network Analysers 71
12 Testing your M2M device 76
12.1 TX power peaks by cellular module test mode 76
12.2 Pseudo load of 2 Ampere peak load with self-made function generator 77
12.3 TX power peaks with a GSM tester 78
12.4 Testing of the sensitivity 78
12.5 Testing radiated TX power 78
12.6 Where can you buy a cheap cellular tester? 78
12.7 Example of a measurement report from GSM test equipment 79
12.8 Ripple and peak voltage – visible on GSM test equipment 83
12.9 How to test a UMTS module on foreign band 84
12.10 Testing with UMTS testers 84
12.11 How to test an LTE module on foreign bands 86
12.12 Potential difficulties with LTE modules worldwide 86
12.13 Testing the GNSS module 87
12.14 Measurement of the cellular antenna in 3D 87
12.15 Summary of testing 88
13 AT Commands 88
13.1 AT commands during power on of your cellular module evaluation kit 88
13.2 ”Hello World” for GSM – AT commands to send a SMS 89
13.3 AT commands and logic loops to set up a communication channel 90
14 Project descriptions of IoT M2M devices 91
14.1 Project description of a long-term tracking device 91
14.2 Project description of a flexible tracking device for bank notes 92
15 Thank you 94

1 Why Did I Write the IoT / M2M Cookbook?

I have worked in the Wireless M2M industry for more than a quarter of a century. Twenty-five years ago, we didn’t even have a word for “M2M” or “IoT”. We developed Machine to Machine devices without knowing that decades later these creations would be called “M2M devices”. Twenty-five years ago, the GSM network for wireless data communication did not exist. I took my first steps in wireless data communication with Frequency Shift Keying (FSK) on Private Mobile Radios (PMR). On PMRs we achieved communication speeds of 3600 bits per second. A little later we started using public analogue trunked radios. These trunked radio systems provided local terrestrial wireless networks on FSK. Years ago, the last public analogue trunked radio network in Germany was taken out of service. GSM jumped in with its Short Message Service (SMS) and Circuit Switched Data (CSD). CSD provided us 9600 bits per second. We could use SMS and CSD for straightforward countrywide data communication. Later on, GSM roaming offered us worldwide data communication. Today, GSM/GPRS is being gradually phased out and is being replaced by 3G and 4G technology.

In the US, the cellular operator AT&T no longer accepts new M2M applications on GSM/GPRS. AT&T will only accept applications on 3G and 4G (UMTS, HSPA, LTE). Some people try to differentiate between M2M and IoT. Call it IoT or M2M – it does not matter. Applications for IoT or M2M often use the same wireless technology. IoT is the umbrella term for a number of subsets of wireless data communications. M2M is one of these subsets and maybe one of the oldest. Another subset of IoT is called Industry 4.0 or Industrial Internet of Things (IIoT). Just wait a while and a new buzz world will always come up.

This IoT / M2M Cookbook describes how to develop a tracking device based on cellular and GNSS modules. You can create a telemetric device by ignoring the GNSS aspect. Typical devices without GNSS include cellular routers with Ethernet ports or a cellular to Wi-Fi bridge. Nevertheless, the navigation system for trucks described in this book already uses six different wireless technologies (2G, 3G, GNSS, Classic Bluetooth, Bluetooth Low Energy and NFC) with five different antennas within one enclosure.

Cellular networks for GSM, HSPA and LTE are the popular Wireless Wide Area Networks (WWAN). However, in some regions we have WWAN over CDMA and WiMAX.

Sometimes it is not easy to come up with the appropriate English word for the terms in this book. The common word for SMS in UK is “text message”. In this book, we will consistently use the term “SMS”. A prepaid SIM card in UK is called a “Pay as you go SIM card”. I will typically use the common words specified by ETSI – I will call it a prepaid SIM card. If I use the term “GSM module”, this will cover 3G and 4G modules as well, because the fall-back of UMTS, HSPA and LTE is still 2G (GSM/GPRS). GPS is fundamentally an incorrect term. The Global Positioning System (GPS) is just one out of several Global Navigation Satellite Systems (GNSS) that provide the functionality we refer to as “GPS”. We can currently access the Russian GNSS called Glonass. The Chinese GNSS is called Beidou. At some point we will be able to access the European GNSS called Galileo.

The IoT / M2M Cookbook is intended to help developers of wireless applications save some time and perhaps provide some inspiring ideas. It is a book for makers and summarizes the collective experience across my different jobs. By leading the team of developers that is required to design a mobile GSM/GPS tracking device, I learned to think like a developer of an IoT / M2M device. In over fifteen years of working with manufacturing and distribution, I have repeatedly provided the same hints and recommendations to developers of wireless applications. The origin of this book was a 14-page application note written in July 2010. In May 2012, I made the decision to document the story that I deliver weekly to customers within a book. The goal of this book is to guide developers from the concept stage of an IoT / M2M device all the way to the final mass-produced product. This book will not provide introductory details such as how an inverted F antenna works. To explain those concepts, I will provide links to relevant supporting information. In any case, this book will provide you with information that is often omitted in the official radio module and antenna manufacturers’ documentation. This book shows an inverted F PCB antenna for GSM in detail. It explains how to redesign it with your own PCB and how to encapsulate the whole design in epoxy resin. It also explains how to integrate a chip or PCB antenna with coaxial cable.
Some power supply concepts including LT Spice modules for DC/DC regulators and load generator for the 2 Ampere peak currents are included in the book, too. It should be noted that the power down reset is still the main fault in designs with cellular modules.
I hope you will enjoy reading the book and I hope it will save you some time as well.

If you an interest to get a copy of the IoT / M2M Cookbook then do not hesitate to drop an email to harald.naumann (at)


Add a Comment
  1. Dear Nestor, you will find an offer of the IoT M2M Cookbook in your in-box. Costs you can save by a clever concept. Be aware that the antennas in a wireless design will interfere the RF performance, range and stand by time. Select the antennas first and build the enclosure around. If you do the opposite then you may will end at customised and expensive antennas.

  2. Hi Debasish, just have a look in your email in box. You got an offer. Please not that I am working on an universal, inexpensive evaluation kit for developers in IoT and M2M with:
    – GSM / GPS / BT ( LoRa / GPS or SigFox GPS will follow)
    – Antennas
    – Upgrade on sensors like temperature, humidity, air pressure …
    – ARM Cortex MCU M0, M3 or M4
    – Free of charge C complier
    – MQTT support
    Everybody will get the schematic diagrams ready to migrate to an own inexpensive IoT device. My goal is a GSM / GPS / BT device with a Bill if Material less than USD 15. Furthermore there is a service for an inexpensive antenna pre test up to development of final IoT M2M devices.
    I will be glad if you will be a reader of the book and later on customer for further services and components as well.
    Best regards from Germany

  3. Dear Harald,
    Your book IoT / M2M Cookbook looks interesting. Please let me know where can I buy that book.

    Jaipal D

  4. Dear Harald

    We are a Portuguese company that manufacture LED luminaries. We have to implement a remote access to our luminaries and we were presented to Lora and Sigfox. We don’t have problem with consumption, since the luminaries are street lights. We need 24/7 access. Can you advise us on the best way to reach our goals?

    Best wishes


  5. Hi Antonino,
    Yes I can, but a reply on a commment is may the wrong place. I can tell that I have street light projects on GSM and LoRa right now. GSM is common and cheap and will run everywhere. LoRa networks are rare in Germany and SigFox has started right now. To ask in beginning was the right descion and will help to save costs.
    My standard questions:
    Do you have a company profile or website? => Answered by you
    What is your planned IoT / M2M application? => Answered by you
    Do you have prior experience with wireless applications?
    What will be the estimated quantities in the first, second and third year of mass production?
    In which countries you would like to sell your product? => Imported for the selection of the antenna and module
    When do you plan the start the development, to hold the first prototype in your hands and to pass the necessary certifications?
    Are you aware of the number and type of certifications you will need and their costs in your target territories?
    Will the antenna be inside or outside the enclosure? => The selrection of the antenna will be direct related to the range
    What will be the size of the enclosure or the PCB inside the enclosure? => Street lights are big. The question on size is related to small devives (e.g. GPS/GSM trackers) with small ground plane
    What kind of supply voltage and source do you plan to use (AC, DC, battery inside with charger etc.) => Answered by you
    Do you need to outsource the development? This makes sense on antenna design or small customised wireless devices
    – See more at:
    Please be so kind and help with further detaiils by email to harald.naumann (at)
    I wish you and year team a nice weekend.
    Best regards

  6. Hi Harald,
    I’m interested in your book. How can I get Access to a copy?
    Best regards

  7. Hi Rolf, you will find an offer in your inbox. If you have a need for wireless modules and antennas, then I can help as well. in my daily job I am the sales director at a specialised distributor. Moreever, I can help with customised antennas, antenna pre-test and a lot of more. I wish you a nice and relaxed long weekend.


  9. Hi Bahul, if you are already an expert with 20+ years experience, then the book will not help. However, if you only avooid one design mistake by reading the book, then you get your invest back quickly. BTW, companies with man years of experience in wireless bought a copy and later on consulting and / or development of HW designs.

  10. Hi Bahul, if you are already an expert with 20+ years experience, then the book will not help. However, if you only avooid one design mistake by reading the book, then you get your invest back quickly. BTW, companies with man years of experience in wireless bought a copy and later on consulting and / or development of HW designs.

  11. Hello –

    I looked at the table of contents for your book and saw much that was interesting to me – how may I obtain a copy of it?



Leave a Reply

Your email address will not be published. Required fields are marked *

Blue Captcha Image


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Harald Naumann © 2014 Frontier Theme