Building I2C Kernel Module For Gadmei TV Successfully Done

Building I2C Kernel Module For Gadmei TV Successfully Done

pezanoadmin 路 08 Sep 2026 路 860 times seen

The development of low-cost LoRaWAN Gateways to support the Smart Farming ecosystem continues to show significant progress. Together with the Pokdartik community, one of the important stages in the project to utilize used USB TV Tuners as Internet of Things (IoT) devices was successfully achieved, namely the development and implementation of the I2C kernel module for Gadmei TV USB devices.

This success is an important milestone in efforts to reverse engineer analog TV tuner devices which have been considered obsolete devices and no longer have high economic value. With a hardware and software engineering approach, this device is now starting to show its potential as a supporting component for low-cost LoRaWAN Gateways for smart agricultural needs in Indonesia.

In the early stages of the project, the Pokdartik team identified the main chipset used by several Gadmei USB TV Tuner series. From the results of the hardware analysis, it was found that most of the radio frequency control functions are carried out via I2C (Inter-Integrated Circuit) communication between the main chipset and the RF tuner installed on the device.

The main problem faced is the unavailability of official documentation or drivers that support the use of the tuner as a LoRa signal receiving device at the 900–910 MHz frequency. The default Linux driver only supports analog television functions so it does not provide direct access to important registers on the tuner.

To overcome this obstacle, the team reverse engineered old drivers that are still available in the open source community. Analysis was carried out on USB communication, kernel driver structure, and I2C register access patterns used during the frequency tuning process.

The research results show that the tuner can be controlled via certain I2C commands to change the parameters of frequency, bandwidth, gain, and signal reception mode. Based on these findings, the team began developing a new kernel module capable of initializing the device and providing an I2C communication interface directly to the user.

Kernel module development is carried out using the Linux Kernel Module (LKM) framework. This module is tasked with detecting the USB TV Tuner device when connected to the system, carrying out a probing process, and then establishing a communication path with the RF tuner via the device's internal I2C bus.

One of the biggest challenges was ensuring communications were stable without causing conflicts with the Video4Linux (V4L2) subsystem that previously controlled the device. For this reason, modifications were made to the device enumeration process so that the I2C module can work independently without interfering with other functions.

After several debugging processes, testing the kernel log shows that the module has successfully initialized the tuner and accessed the device's internal registers. The process of reading and writing data via I2C has been carried out with a consistent success rate.

The successful development of this kernel module opens up new opportunities in utilizing the USB TV Tuner as a simple Software Defined Radio (SDR) device.With the ability to control the tuner directly, the device can be configured to scan frequencies around the Indonesian LoRa band.

In the implementation of Smart Farming, this capability is very important because the LoRaWAN Gateway requires a receiving device that is capable of capturing transmissions from various agricultural sensors spread across plantation areas or rice fields. These sensors can be used to monitor soil moisture, air temperature, rainfall, water quality and plant nutritional conditions in real-time.

By using used devices that are easily found on the market, the cost of building a gateway can be reduced significantly compared to using commercial devices which are relatively expensive. This approach is in line with the spirit of a circular economy and reducing electronic waste which has long been a concern of the open technology community.

Apart from providing economic benefits, this project is also an educational tool for Pokdartik members in studying the Linux operating system, kernel driver development, I2C communications, hardware reverse engineering, and LoRaWAN technology. This knowledge is very important to build technological independence in Indonesia's digital agriculture sector.

In the future, the kernel module that has been successfully built will continue to be developed to support more types of tuners and other USB TV chipsets. Integration with SDR applications, LoRa decoders, and web-based agricultural monitoring platforms are also the next development targets.

The success of building an I2C kernel module for Gadmei TV proves that devices that are no longer considered useful still have great potential if combined with creativity, research and a spirit of community collaboration. Together with Pokdartik, this small step is an important part towards realizing Smart Farming that is more affordable, independent and sustainable for Indonesian farmers.

Literature

  1. Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman. Linux Device Drivers, Third Edition. O'Reilly Media, 2005.

  2. Linux Kernel Documentation. I2C Subsystem Documentation. The Linux Kernel Project.

  3. LoRa Alliance. LoRaWAN Specification. LoRa Alliance Technical Committee.

  4. Karim Yaghmour. Embedded Android and Linux Development. O'Reilly Media.

  5. Robert Faludi. Building Wireless Sensor Networks. O'Reilly Media.

Tags: Agriculture

Comment (0)

Leave a Comment