Notes on Working with IoT Devices

Find IP Address of a Device in the Network without a Monitor

For instance, if you want to find a Raspberry Pi connected to the local network without a connection to a monitor:

sudo nmap -sn

In the output, you should find it. For instance:

Nmap scan report for
Host is up (0.00027s latency).
MAC Address: B8:27:EB:82:48:A0 (Raspberry Pi Foundation)

Remember to run it with sudo to get the platform details. Do NOT repeat it multiple times or for a very large subnet. The system may get blocked in the network because of spamming.

OpenWRT root Partition Size

Resize the root partition on OpenWRT SD card using GParted after writing the image on the SD card.

Install Packages on OpenWRT

For instance, gcc:

opkg update && opkg install gcc

OpenWrt » Technical Reference » OPKG Package Manager

Compile a Simple C Code on OpenWRT

gcc -mfloat-abi=hard hello.c -o hello

Determine File Type

For instance, a file which is built for running on Raspberry Pi 1:

file ipop-tincan-rpi1


ipop-tincan-rpi1: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/, for GNU/Linux 2.6.32, BuildID[sha1]=c24056bbd7c9f90660087db2c1296ae3b7dca93b, not stripped

Cross-compile Code for OpenWRT


sudo apt update && sudo apt install ccache libncursesw5-dev

Git on OpenWRT

opkg install git-http
opkg install ca-bundle

Expand the Root Partition on OpenWRT

By default, the root partition on the OpenWRT SD card is very small. You can expand it to using “GParted” or other tools on Linux or other operating systems.

Ubuntu 17.10 and CiscoAnyconnect for UF VPN

If you are running Ubuntu 17.10 and fail to install/start Cisco Anyconnect (version

sudo apt install libpangox-1.0-0


Error in Installing Ubuntu or Linux Mint: The grub-efi-amd64-signed package failed to install into /target/.

Create an EFI system Partition before installing the OS.

Add Menu Entry to GRUB


Change GRUB Timeout

In /etc/default/grub:



sudo update_grub2


OpenWRT Network Configuration

To change the network settings from static to DHCP, edit /etc/config/network:

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr ''
	option netmask ''

config globals 'globals'
	option ula_prefix 'fd75:c919:7ac1::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0'
	option proto 'dhcp'
#	option ipaddr ''
#	option netmask ''
#	option ip6assign '60'