Jekyll2026-03-02T19:41:38-08:00https://whenboy07.github.io/feed.xmlWenbo DingWenbo Ding[email protected]Wireshark2022-01-25T00:00:00-08:002022-01-25T00:00:00-08:00https://whenboy07.github.io/posts/2022/01/blog-post-wiresharkThis paper summarizes resources for Wireshark.

Overview

  • Download Link
  • Wireshark User Guide

    Wireshark is a network packet analyzer. A network packet analyzer presents captured packet data in as much detail as possible. You could think of a network packet analyzer as a measuring device for examining what’s happening inside a network cable, just like an electrician uses a voltmeter for examining what’s happening inside an electric cable (but at a higher level, of course).

Tutorial

Wireshark for WiFi

Wireshark for IEEE 802.15.4

Wireshark for Bluetooth

Wireshark for LoRaWAN

]]>
Wenbo Ding[email protected]
Machine Learning and Deep Learning for Beginners2021-09-14T00:00:00-07:002021-09-14T00:00:00-07:00https://whenboy07.github.io/posts/2021/09/blog-post-ml-dlThis paper summarizes resources for machine learning and deep learning for beginners.

Overview

Machine Learning

Deep Learning Tutorials

Convolutional Neural Networks (CNN)

What is Convolutional Neural Networks (CNN)

CNN Examples

Common CNN Architecture

AlexNet

Few Shot Learning

Development Tool

Python

I strongly recommend installing Anaconda Distribution.

Keras

Matlab

Code Snippet

  • Check the installed packages
    conda list
    
  • Install a particular tensorflow version using conda
    conda install -c conda-forge tensorflow=1.13
    

Online Resources

]]>
Wenbo Ding[email protected]
Resources for Bluetooth Low Energy2020-11-07T00:00:00-08:002020-11-07T00:00:00-08:00https://whenboy07.github.io/posts/2020/11/blog-post-bluetoothThis page summarizes resources for Classic Bluetooth and Bluetooth Low Energy. It is still under active update.

Overview

There is some confusion about the Bluetooth. Generally speaking, Bluetooth 1.0 - 3.0 includes classic Bluetooth. Bluetooth 4.0 starts to use Bluetooth Low Energy (BLE). A brief introduction about their difference can be found at link1, link2 and link3.

New features of Bluetooth 5 can be found here. The full and latest specification, v5.2 (released in 2019) can be downloaded here.

Unless otherwise highlighted, the following descriptions apply to BLE, which might not be correct for classic Bluetooth.

Network Architecture

Protocol Overview

Visit MATLAB Bluetooth Protocol Stack for a detailed introduction about the Bluetooth and BLE protocol, and a mapping between them and the OSI model.
...
Figure from https://uk.mathworks.com/help/comm/ug/bluetooth-protocol-stack.html.

Some brief introduction of the protocol can be found at the Microchip Developer Center. The BLE protocol stack consists of

  • Controller (Physical Layer and Link Layer)
  • Host
  • Application


...
Figure from https://microchipdeveloper.com/wireless:ble-introduction.

Physical Layer

Some key features of the BLE physical layer

  • 2.4GHz ISM band. The band between 2.402 GHz to 2.4835 GHz is divided into 40 channels with 2 MHz channel spacing, $f_k = 2402 + k*2 MHz, k = 0, 1, …, 39$
  • The 40 channels are divided into advertising channels (Ch. 37, 38, and 39) and 37 data channels (Ch. 0-36).
  • Gaussian Frequency-Shift Keying (GFSK).
  • Adaptive Frequency Hopping for data channels. The channel selection algorithms can be found in Section 4.5.8 of Part B vol. 6. There are two algorithms defined and the algorithm#1 selects the channel as $f_{n+1} = (f_n + hop)$ mod 37, where hop ranges from 5-16.


...
Figure from https://microchipdeveloper.com/wireless:ble-introduction.

Preamble

The preamble defined in BLE v5.2:

  • LE IM packets (8 bits): 10101101, or 01010101
  • LE 2M packets (16 bits): 1010110110101101, or 0101010101010101 Preamble is used for frequency synchronization, symbol timing and automatic gain control. Visit Page 2865 Section 2.1.1 Vol 6, Part B of the Bluetooth Core Specification v5.2.

Link Layer

  • Advertising and Scanning
  • Connection
  • Network Topology - Piconet
  • Security - AES - CCM

Advertising Channel

Channel 37, 38 and 39

  • Device Discovery
  • Connection Establishment
  • Broadcast Transmissions

Data Channel

Channel 0-36

  • Data transmissions
  • Frequency hopping is used to select different channels.

Packet Type

The same packet format for both

  • Advertising channel packets
  • Data channel packets


BLE Packet Type.
BLE Packet Type. Figure from https://microchipdeveloper.com/wireless:ble-link-layer-packet-types

Discovery Process

  • Advertising interval: 20 ms
  • Scan interval: 50 ms
  • Scan window: 25 ms


Advertising and Scanning.
Advertising and Scanning. Figure from https://microchipdeveloper.com/wireless:ble-link-layer-discovery

Connection Process


Connection establishment.
Connection establishment. Figure from https://microchipdeveloper.com/wireless:ble-link-layer-connections


ble-connected-phase.
Connected phase. Figure from https://microchipdeveloper.com/wireless:ble-link-layer-connections

Bluetooth Stack and Development Kit

Linux

Micropython

Note: The module is still under development and its classes, functions, methods and constants are subject to change. It only supports the basic BLE functions.

Texas Instruments

Scapy for Bluetooth

Matlab Bluetooth Support

Matlab has also provided simulation support for Bluetooth and BLE. Visit Communications Toolbox Library for the Bluetooth Protocol support package for more information.

]]>
Wenbo Ding[email protected]
Resources for ZigBee and IEEE 802.15.42020-11-03T00:00:00-08:002020-11-03T00:00:00-08:00https://whenboy07.github.io/posts/2020/11/blog-post-zigbeeThis page summarizes resources for ZigBee and IEEE 802.15.4. It is still under active update.

Overview

IEEE 802.15.4 defines the physical and MAC layers. ZigBee is based on IEEE 802.15.4 but also defines higher layer protocols.

IEEE 802.15.4 is also adopted by 6LoWPAN, WirelessHART, THREAD, etc.

IEEE 802.15.4

Physical Layer

Frequency Band

  • 868 MHz, Europe, channel $k$ = 0, $f_c = 868.3$ MHz
  • 915 MHz, America, Australia, channel $k=$ 1 - 10, $f_c = 906 + 2(k-1)$ MHz
  • 2.4 GHz, Worldwide, channel $k$ = 11 - 26, $f_c = 2405 + 5*(k-11)$ MHz, OQPSK

OQPSK PHY
...
Figure from https://uk.mathworks.com/help/comm/ug/end-to-end-ieee-802-15-4-phy-simulation.html.

All OQPSK PHYs map every 4 PPDU bits to one symbol. The 2.4 GHz OQPSK PHY spreads each symbol to a 32-chip sequence, while the other OQPSK PHYs spread it to a 16-chip sequence. Then, the chip sequences are OQPSK modulated and passed to a half-sine pulse shaping filter (or a normal raised cosine filter, in the 780 MHz band).

Run the Matlab End-to-End IEEE 802.15.4 PHY Simulation to have a deep understanding on the modulation.

Please refer to Section 1.1.1.2 O-QPSK PHY of the Rohde & Schwarz Application Note for a detailed introduction.

MAC Layer

CSMA-CA

  • Direct Transmission
  • Indirect Transmission (Polling)

MAC Type

  • Data Frame
  • Beacon Frame
  • Acknowledgement Frame
  • MAC Command Frame

ZigBee

Network Architecture and Topology

  • Star Topology
  • Tree Topology
  • Mesh Topology

Tutorial

Check the first chapter of IEEE 802.15.4 Stack User Guide for a brief introduction of IEEE 802.15.4.

]]>
Wenbo Ding[email protected]
Linux For Beginners2020-10-17T00:00:00-07:002020-10-17T00:00:00-07:00https://whenboy07.github.io/posts/2020/10/blog-post-linuxThis paper summarizes some common and basic usages of Linux. The information is only suitable for beginners.

Overview

Linux Test

How To Start

  1. If you are using Windows OS, you can access to the remote server by
  2. Basic Commands cd, ls, mkdir, pwd, cat, grep,sudo

Common Usage

  1. Ubuntu Documentation on How to Use the Terminal
  2. Graphic Notebook Editor
    • Command: gedit file_name.extension
  3. vim getting started
  4. Display information of your active processes.
    • Command: ps -ef | grep loginname Or ps -ef | grep first_7_characters_of_your_loginname_if_it_is_longer_than_8_characters
  5. Kill A Process
    • Command: kill PID
  6. Copy all the contents of ~/folder1 to ~/new_folder1: cp -r ~/folder1/. ~/new_folder1

  7. Module
    • Check available modules: module avail
    • Check loaded modules: module list
    • Load a module: module load apps/MATLAB/R2020a
    • Unload a module: module unload apps/MATLAB/R2020a

Running Matlab Remotely in a Server

Step 1: Load Matlab

  • Command: module load apps/MATLAB/R2020a

Step 2: Run Matlab without GUI and in the background

  • Command: nohup matlab -r MatlabScriptName -nodisplay - nosplash -nojvm -nodesktop &

The above command may output Bad file descriptor and Warning: “Error reading Character from command line” error. In this case, using the following command instead:

nohup matlab -nodesktop -nosplash -nodisplay < main.m >log.txt 2>&1 &

Explanation: https://www.programmersought.com/article/91451058498/

“>log.txt” refers to redirecting the output to log.txt. 2>&1 means to input the error information into log.txt, 2 Refers to the standard input and output error (stderr), 1 refers to the standard output (stdout), 2> & 1 means 2 is equivalent to 1 output, the last & is the meaning of background operation, combined with the nohup command.

Tutorial:

]]>
Wenbo Ding[email protected]
Digital Communications2020-10-16T00:00:00-07:002020-10-16T00:00:00-07:00https://whenboy07.github.io/posts/2020/10/blog-post-digital-commsThis paper summarizes tutorials and resources regarding to digital communications.

General Topics

  • Pulse-Shape Filtering in Communications Systems, National Instruments Tutorial, link
  • I/Q Data: Plain and Simple, National Instruments Tutorial, link
  • PySDR: A Guide to SDR and DSP using Python, Online Book, link

OFDM

Recommended Book

Communications Textbook

]]>
Wenbo Ding[email protected]
LimeSDR2020-10-16T00:00:00-07:002020-10-16T00:00:00-07:00https://whenboy07.github.io/posts/2020/10/blog-post-limesdrThis paper summarizes resources for LimeSDR

Overview

Getting Started

Step 1: Hardware and Software Setup

Getting Started with the LimeSDR

Step 2: LimeSDR-USB Quick Test

Tutorial

  • LimeSDR Made Simple. The webpage does not give a full list of the tutorial series, google search “LimeSDR Made Simple”
]]>
Wenbo Ding[email protected]
Resources for WiFi2020-10-15T00:00:00-07:002020-10-15T00:00:00-07:00https://whenboy07.github.io/posts/2020/10/blog-post-wifiIEEE 802.11 (WiFi) has been used in most of the laptops, smartphones, tablets. The widespread use of WiFi has led to extensive research interests in the area of localization, security, sensing and produced massive successful research outcomes. This paper summarizes some hardware and software resources for WiFi for the research purpose.

Strictly speaking, IEEE 802.11 is the standard by IEEE and WiFi is a trademark of the WiFi alliance. However, they are used interchangably in this post.

Standard

IEEE 802.11 standard defines the physcai layer and media access control (MAC) layer protocols. It has undergone a number of amendments in the last twenty years, since its first release in 1997. A complete list of the IEEE 802.11 amendments is summarized at wikipedia.

PHY Layer

The main physical layer amendments include 802.11b (1999, DSSS), 802.11a (1999, OFDM, 5 GHz), 802.11g (2003, OFDM, 2.4 GHz), 802.11n (2009, MIMO OFDM, high throughput), 802.11ac (2013, MIMO OFDM, very high throughput), 802.11 ax(est late 2019, high efficiency).

OFDM Basics

IEEE 802.11 OFDM Receiver Design

MAC Layer

WiFi use CSMA/CA as the MAC layer protocol.

Frame Types

  • Control frames
  • Management frames
  • Data frames

How 802.11 Wireless Works 802.11 Association Process Explained

802.11 Wi-Fi Connection/Disconnection process

802.11 Wi-Fi Security Concepts

Testbed and Implementations

The commercial network interface cards (NICs) only provide received signal strength indicator (RSSI) but not channel state information (CSI). RSSI represents the received power which is averaged over a packet, thus it is a coarse grained parameter. On the other hand, CSI is a fine grained parameter, and offers detailed channel response over different frequencies/subcarriers, when OFDM-based technique is used. Since CSI is much more useful for innovative research, a (incomplete) list of testbed is given below.

USRP Software Defined Radio (USRP)

Openwifi

  • openwifi is an SDR (Software Defined Radio) implementation for IEEE802.11/Wi-Fi design with Linux mac80211 compatible full-stack.
  • zynq FPGA + FMCOMMS2/3/4 RF board
  • For Chinese user, there is a presentation video introducing openwifi by Dr. Jiao.

WARP 802.11 Reference Design

There is an 802.11 reference design implemented for WARP boards, which is compatible with the commercial WiFi. An experimental framework is implemented by Python for the research development. The available variables/parameters can be found here, among which the CSI is made public.

WARP is being actively used for research in many areas like power management, architectures for wireless receivers, physical layer algorithms, access protocols, routing and cognitive radios.

A list of papers using WARP can be found at here.

Network Interface Cards

Intel 5300 NIC

There is the Linux 802.11n CSI Tool for Intel 5300 NIC. This Intel NIC together with the CSI tool have been used extensively by researchers and led to many excellent research papers. A list of the relevant publications can be found at link.

Please note PCI-e interface is required for these NICs.

Atheros Chipsets

There is Atheros CSI Tool. A list of the relevant publications can be found at here.

Braodcom WiFi Chipsets

Software Tool

Matlab WLAN Toolbox

The Matlab WLAN Toolbox is very powerful. There are many useful functions and examples. Both PHY and MAC layers are supported. I strongly suggest to test your idea and algorithms using this Toolbox before you do it with real hardware.

Scapy

Scapy official website defines

Scapy is a Python program that enables the user to send, sniff and dissect and forge network packets. This capability allows construction of tools that can probe, scan or attack networks.

There is a library supporting IEEE 802.11.

Code Examples:

Radiotap

  • What is radiotap? link

Network Monitoring

Misc Resources

Wireshark

  • Download Link
  • Wireshark User Guide

    Wireshark is a network packet analyzer. A network packet analyzer presents captured packet data in as much detail as possible. You could think of a network packet analyzer as a measuring device for examining what’s happening inside a network cable, just like an electrician uses a voltmeter for examining what’s happening inside an electric cable (but at a higher level, of course).

WiFi Modes

iwconfig - Linux man page

Set the operating mode of the device, which depends on the network topology. The mode can be Ad-Hoc (network composed of only one cell and without Access Point), Managed (node connects to a network composed of many Access Points, with roaming), Master (the node is the synchronisation master or acts as an Access Point), Repeater (the node forwards packets between other wireless nodes), Secondary (the node acts as a backup master/repeater), Monitor (the node is not associated with any cell and passively monitor all packets on the frequency) or Auto.

]]>
Wenbo Ding[email protected]
Lego Robot2020-10-14T00:00:00-07:002020-10-14T00:00:00-07:00https://whenboy07.github.io/posts/2020/10/blog-post-legorobotThis page summarizes resources for Lego Robot. It is still under active update.

Overview

Lego Robot

Micropython Development

https://pybricks.github.io/ev3-micropython/index.html

]]>
Wenbo Ding[email protected]
How to Write a (Good) Paper2020-08-28T00:00:00-07:002020-08-28T00:00:00-07:00https://whenboy07.github.io/posts/2020/02/blog-post-writingAs a researcher, it is important to write good journal and conference papers. This link summarizes some resources and tips.

How to Write a Paper

Information for Authors

Each journal and conference will have information for authors, which will explain the requirements in terms of the number of pages, format, resubmission, page overlength charge, etc.

For example, the information for authors of IEEE Transactions on Wireless Communications can be found here.

Template

Each journal and conference will usually have both Word and Latex templates. When possible, the Latex templates are always recommended. Please read this post for How to Use LaTex.

Please note that IEEE journals will have different templates. Download your right template from here.

Extending Conference Paper to Journal

There may be different rules for journals regarding extending a conference paper. Please refer to the website of the particular journal for detailed instruction.

For example, the policy of IEEE Transactions on Wireless Communications can be found here.

How to Write a Good Paper

Tips

  • Common Bugs in Writing
  • Top-10 tips for writing a paper by Jim Kurose, University of Massachusetts
  • Tips about writing systems papers by Prof Lin Zhong, Yale University
  • How to write for Technical Periodicals & conferences by IEEE

    Making Your Article interesting to Read

    • Write in paragraphs, not long blocks of text [12]. every paragraph should have a topic sentence, supporting sentences that build on that key message, and a summary sentence. Vary the length of your paragraphs to make your article easier to read. Think about the transition from one paragraph to the next. is there a logical progression?
    • Write clear, simple sentences in the form of noun-verb-object. Varying sentence length can make an article more engaging. compound sentences add variety and are useful for comparing ideas [12]. every word in a sentence should contribute something; eliminate unnecessary words.
    • avoid the passive voice, in which the subject is acted upon. in the active voice, the subject performs the action. “it was hypothesized,” is passive; “We hypothesized,” is active. The active voice is more interesting and less ambiguous. edit passive sentences to active sentences as much as possible.
    • Write in the first person (“i,” “we”) to make it clear who has done the work and the writing. it is particularly helpful when you are comparing your work to someone else’s work [3].
    • The abstract and the methods section will be written in the past tense, because they describe work that you have already done. The introduction and discussion section are usually written in the present tense, because they describe knowledge that currently exists.

Abstract and Title

Some suggestions from the Information for Authors IEEE Transactions on Artificial Intelligence Author Instructions Title

Avoid phrases such as “a novel methodology”, “a new algorithm”, and “a significant application” in the title. By default, papers in TAI offer novel contributions that are significant. One purpose of the paper is to convince the reader that the contribution is novel, scientifically sound, technically correct, and significant. As such, words such as ‘novel’ and ‘new’ are redundant.

Abstract

The “Abstract” should not exceed 250 words. Authors are encouraged to attempt to use the following guideline in writing their abstract:

  • 1-2 sentences introducing the problem.
  • 2-3 sentences summarizing the state-of-art. Be concise and offer an objective assessment of the current state of play in this area.
  • 1-2 sentences clearly describing the research gap the paper is concerned with.
  • 1-2 sentences summarizing the main methodological contribution.
  • 1-2 sentences summarizing the main result.
  • 2-3 sentences summarizing the implications of the findings on the wider field of AI.

Understand the Review Process

]]>
Wenbo Ding[email protected]