Welcome to my thecnical blog

Welcome to my thecnical blog

Welcome to my thecnical blog

This blog is about technical stuff like: Linux, embedded, RT, algorithm, web, etc'


Data streaming between two BLE devices: PSoc6 and nRF52832

Published at September 10, 2022 ·  3 min read

I had a project where I had to stream data between two BLE devices. The data source was connected to PSoc6 and sent using its BLE transceiver to the destination device, nRF52832. Usually but not must, the peripheral devices are used as a GATT client, and the central machines are used as a GATT server. Therefore, I set the PSoc6 (The data source) as the central device (client) and the nRF52832 as the peripheral device (server)....

WebSockets with C++

Published at March 3, 2022 ·  2 min read

I have wrap libwebsockets (lws) in c++ classes to implement WebSockets on c++. It gives a simple way to work with lws and create a WebSocket connection with a few lines of code. The architecture of the lws is hierarchical. It has several protocols, and each protocol includes detail like address, path, destination port (443,9443), and WebSocket interface (WSI). A protocol can serve several services, where the users should subscribe to it....

REST API Server with c++

Published at February 23, 2022 ·  5 min read

Here is a simple project to implement a general REST API service module in c++ using reasbed library. The library uses a modern c++ to implement REST API calls. And it is possible to use the REST service to access databases, access, and control a complex application to help the QA & verification process by accessing internal SW modules. Moreover, the module is simple and easily removed in production modes....

Setup SDCARD on stm32 MCU

Published at November 18, 2021 ·  3 min read

This post describes simple steps to make the STM32H7 work with SDCARD. I have used STM32Cube to set up the BSP for the project. It uses the library FatFS as its FAT files system at the top of the driver level. The firmware for drivers is also taken from the STM32Cube. Emphasis for SDCARD setup Select external transceiver to “yes” if the board has one. External transceivers are translating between 1....

Setup UART BLE using Nordic nrf52832

Published at September 16, 2021 ·  4 min read

I have played with Murata’s MBN52832 module BLE module. This module is based on a Nordic chipset (nRF52832), it has BLE and NFC capabilities and MCU with cortex-m4 to manage the radio operation. The module comes with a demo firmware without an AT Command interface, and the user has to write its application. However, the SW flexibility allows creating a standalone application with BLE and NFC without using a host device like a PC to operate the BLE radio....

Task for job interview for RT embbeded position

Published at August 10, 2021 ·  6 min read

This post is a collection of tasks and questions for RT embedded job interviews. Table Of Contents Kernel disassembler Letter Counter Programming Task Sort Binary Array Sort Two Array Kernel disassembler We want you to write a loadable kernel module that could be compiled against any kernel > v4.0 (kernel path will be passed to as an environment variable : KERNEL=/some/path/to/kernel/source) The kernel should be compiled to include a disassembler, we recommend using zydis as we find it to be the easiest to embed, although you could use what ever you like....

Low Level Debug of STM32MP15c7

Published at June 21, 2021 ·  4 min read

Low-level debug of MCU may essential during the bring-up process of a new board. Especially for checking critical components like the DDR. The MCU under debubung is STM32MP157. I strongly based on the yocto build system for the SDK and the compilation and signature of the system. See here and How to configure TF for a manual build of TF-A without yocto. It can be uses the STM32_Programmer_CLI load TSV files into the EMMC....

Using SVD file in GDB for Cortex-m debugging

Published at June 12, 2021 ·  2 min read

Using SVD files during debugging session of a cortex-m microcontroller allows easy access to system registers value. The SVD file is an XML file that contains the necessary information about the register’s name and address. Using SVD, the IDE can read the value of system registers and display it during the debugging session. I will show here how to use SVD during GDB debug session. Installation Download and install the following project from PyCortexMDebug....

301 Redirect of web site

Published at May 17, 2021 ·  1 min read

I had created a simple nodejs script to implement 301 redirects of a website. Three hundred-one (301) redirections are needed when a website name is changed. The old website should respond in a message like Moved Permanently. Redirecting to https:://new.web.addr . It is meant for the search engines to maintain the website credit. I have used heroku to host the script. Here is how to create a simple redirection service:...

Simple Tab Widget For Hugo Blog

Published at May 10, 2021 ·  2 min read

I have create a simple tab widget to use in my hugo based blog. It is based on JQuery Tab widget and simpple hugo shortcode templae. The code template is in the shotcodes/tab-widget. {{ $title := "tabe widget" }} {{ if .IsNamedParams }} {{ with .Get "title" }} {{ $title = . }} {{ end }} {{ else }} {{ with .Get 0 }} {{ $title = . }} {{ end }} {{ end }} <link rel = "stylesheet" href = "https://code....