0

I have a K1 Plus android box which have a built-in dvb-t2` and dvb-s2 tuner in it. I want to create an app that gets and shows the channels from those tuners.

At first, I found about android's TV Input Framework(TIF). The sample app keeps crashing by calling a method that gets the available inputs of the device. Then, found out that it only work for real Android TVs. I looked for android libraries for that android box but didn't find anything. I looked for c libraries that can access the tuners but didn't find anything as well. I looked for code on how to access the hardware components of an android device and didn't find anything. I recently found about https://opencv.org/. I haven't read everything about it yet so I don't really know how to use it.

I found about https://git.linuxtv.org/v4l-utils.git from an answer to a SO question but it seems like it can only be used after installing it to an OS. I was able to compile it using CMake on android but it got missing header files. I also found http://android4tv.iwedia.com. Unfortunately, it's also using TIF.

I'm trying to create something like kodi but I found out that it isn't really the one that gets the channels but kodi is getting it from a supported iptv box. I have zero knowledge about writing C but I'll try to make the code.

This is the box btw. http://www.videostrong.com/S905D+DVB(KI%20PLUS)/55.html

From my research, I found about HAL(Hardware Abstraction Layer). Do I need that for making my C code?

Update:

After months of research and not finding any quick way to implement a tv tuner library, I returned to my bookmarks from previous research. One of them is this. The first step from that SO answer is do a ls /dev/dvb/ on the device. Because I need to do it on the android box itself, I researched about android terminal apps and found Termux. Then I did the ls /dev/dvb/ command on Termux and it told that the resource was not found or it did not exist. Then I tried to just do a ls /dev/ command and luckily I got results. There's quite a lot of them and I found something related to dvb.

The dvb related results were:

dvb0.demux0
dvb0.demux1
dvb0.demux2
dvb0.dsc0
dvb0.dsc1
dvb0.dvr0
dvb0.dvr1
dvb0.dvr2
dvb0.net0
dvb0.net1
dvb0.net2

I can post the whole list but I'll post this more related (I think) results. The results are quite different than the example of the link above because they only used dvb and not dvb0.

UPDATE:

I might use a usb tv tuner now based on a suggestion to me.

UPDATE:

Is there a list of standard and tv tuner related usb byte[] commands that I can look at? I already saw some but they are mostly for FTDI, serial or the really standard commands which I don't have really have any use.

rminaj
  • 560
  • 6
  • 28

1 Answers1

0

It will probably take a lot of reverse engineering or a leaked documentation to achieve what you are trying to do.

Devices like the one you are working on usually use proprietery hardware with proprietery drivers for things like DVB, so making a third party app for a TV tuner is very hard.

First, you need to find out what kind of DVB chip / card this Android box has. Then, you need to figure out how (on what kind of BUS) it is connected to the system.

If it is something generic, you may be able to talk to its driver, if not, you would need to write your own driver.

This is too complicated to explain in a SO post, but you could start by opening the box and looking at the components or by running commands like lsusb through ADB to try and identify the DVB component.

If the device already has a DVB app, you could try disassembling it, to find out how it works.

Good luck!

Lev M.
  • 6,088
  • 1
  • 10
  • 23
  • Oh, I see. I didn't know it would be a very difficult task. I know I need c but didn't know I need to go into disassembling the device itself. – rminaj Nov 12 '18 at 01:49
  • Can you, like, email me the other details about this? So I can have more idea of how to do this. I already understand the things that I need to do but it's not bad having more information about the task I need to do. – rminaj Nov 12 '18 at 01:54
  • Do you think a single DVB-T(2) source code will work on every DVB-T(2) device? – rminaj Jan 11 '19 at 06:06
  • @rminaj It depends on how standardized this kind of hardware is. There probably will be some parts that will be same or similar, but more likely others will hove to be specific per device or chip manufacturer – Lev M. Jan 11 '19 at 14:39