How to resolve : fatal error: curses.h: No such file or directory

Whenever you are trying to do kernel menuconfig very first time after installation of Ubuntu, its chances that you will see the error as below, This error is due to that your ubuntu doesn’t have “ncurses” library installed. Ncurses is required for having menu like user interface onto the terminal.You can read more about ncurses … Read more

How to check if Bluetooth device is UP or NOT using l2ping ?

If you want to know the bluetooth device you want to connect to is alive or not, i.e. whether that device’s Bluetooth is ON or not and whether it can respond to our other request like enquiry for information etc. For this l2ping helps us. L2ping sends a L2CAP echo request to the Bluetooth MAC … Read more

Scan, Pair, Connect to Bluetooth device from Ubuntu from command line using bluetoothctl

bluetoothctl is bluetooth control tool which allows us to make the host discoverable, scan other devices, pair to the scanned devices and also connect to those devices using command line utility on ubuntu. Follow below commands for the same. Commands are self explanatory, replace scaned mac address of your device instead of “6C:C4:D5:6C:C5:BC” whereever required.

Modifying bitbake/yocto initscripts to start wifi during boot

We will need to change the wpa-supplicant.conf file as below, by modifying poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa_supplicant.conf-sane Now, once we modified wpa_supplicant configuration files, we need to create an script which will start the wpa_supplicant application which uses this conf file to connect to WiFi access point. As you can see above, if you don’t have DHCP enabled and … Read more

C program to interact with frame buffer devices

Screen information are queried by applications using the FBIOGET_FSCREENINFO and FBIOGET_VSCREENINFO ioctls. Those ioctls take a pointer to a fb_fix_screeninfo and fb_var_screeninfo structure respectively. struct fb_fix_screeninfo stores device independent unchangeable information about the frame buffer device and the current format. Those information can’t be directly modified by applications, but can be changed by the driver … Read more

Linux test case for framebuffer driver

Screen information are queried by applications using the FBIOGET_FSCREENINFO and FBIOGET_VSCREENINFO ioctls. Those ioctls take a pointer to a fb_fix_screeninfo and fb_var_screeninfo structure respectively. struct fb_fix_screeninfo stores device independent unchangeable information about the frame buffer device and the current format. Those information can’t be directly modified by applications, but can be changed by the driver … Read more

sniffex – C program to Capture wifi packets using libpcap

libpcap provides functions for user-level packet capture, used in low-level network monitoring. Following program captures the packets from the wireless interface of the device on which the compiled binary will be running. We have compiled this on ubuntu 16.04, and run it on laptop with wifi interface as wlan0, hence it will capture the wifi … Read more