catalinii / minisatip

minisatip is an SATIP server for linux using local DVB-S2, DVB-C, DVB-T or ATSC cards
https://minisatip.org
324 stars 78 forks source link

How to send remote Minisatip stream into local CAM? #1102

Closed Delitants closed 1 year ago

Delitants commented 1 year ago

How to send remote Minisatip stream into local Minisatip's physical CAM? Is this even possible? minisatip -s REMOTE_IP:555 -D 2 -l ca,http -f obviously doesn't do the job! Status page shows adapter 0 local DVBS2+CAM and adapter 1 is remote DVBS2.

catalinii commented 1 year ago

It is with independent CAMs such as TBS 6900 or Digital Devices

Delitants commented 1 year ago

It is with independent CAMs such as TBS 6900 or Digital Devices

I have TBS 6590 on both ends, server and client. How to achieve that? Can't we just use CA part of the hardware?

catalinii commented 1 year ago

It is not possible because the stream on TBS 6590 is routed directly in hardware.

For TBS 6900 minisatip is responsible for routing the stream in software thru the CAM.

Delitants commented 1 year ago

It is not possible because the stream on TBS 6590 is routed directly in hardware.

For TBS 6900 minisatip is responsible for routing the stream in software thru the CAM.

I don't understand, ca adapter shows up separately /dev/dvb/adapter0/ca0 /dev/dvb/adapter1/ca1 It can't be hardcoded, must be driver or software solution for this.

catalinii commented 1 year ago

ca0 and ca1 are control devices (to talk to the CAM), are not for sending the stream. sec0 is used for sending the stream on tbs6900.

I am not aware of any way of sending the TS to the CI for non-independent CI devices.

Delitants commented 1 year ago

ca0 and ca1 are control devices (to talk to the CAM), are not for sending the stream. sec0 is used for sending the stream on tbs6900.

I am not aware of any way of sending the TS to the CI for non-independent CI devices.

Okay. How about to get around this limitation by sharing entire tuner 6590 over network? The task here is to grab stream from location A (encrypted) and decode in location B over network, where CAM is located.

Can we share /dev/dvb/adapter0 folder over NFS or using this software? https://github.com/Blub/netevent Since CI can't be separated. To interact with remote tuner having that CAM I need, just like it's locally installed? Or this? https://sweetcode.io/introduction-to-linux-network-block-devices/

Related question https://askubuntu.com/questions/1423150/pipe-raw-ts-file-to-device-block

catalinii commented 1 year ago

Those tools would allow you to write the control messages (decrypt pmt with sid XYZ) to the CAM remotely, but will still not change the fact that the tuner output is wired to the CAM

Delitants commented 1 year ago

Those tools would allow you to write the control messages (decrypt pmt with sid XYZ) to the CAM remotely, but will still not change the fact that the tuner output is wired to the CAM

I think you didn’t understand my goal. Let it be wired, that’s fine. I need to literally feed remote tuner TBS 6910 SE (sorry I was mistaken earlier, not 6590) with raw ts taken from another TBS tuner in another remote location, in order to activate a smart card in CAM which sits in 6910SE. There is no way to pipe ts feed into the tuner to let it route stream internally to it’s CI slot? What is TBS IP tool for?

Jalle19 commented 1 year ago

I don't think it's possible to do what you want using the hardware you have, you need to get an independent CI tuner. Alternatively you could move your tuner with CI to the location that has the signal.

Delitants commented 1 year ago

I don't think it's possible to do what you want using the hardware you have, you need to get an independent CI tuner. Alternatively you could move your tuner with CI to the location that has the signal.

Ok thank you. How to use in this case TBS 6900? How to feed it remotely with minisatip instance?

Jalle19 commented 1 year ago

minisatip handles that internally, you can receive the stream using SAT>IP and decrypt it with a local CAM.

Delitants commented 1 year ago

minisatip handles that internally, you can receive the stream using SAT>IP and decrypt it with a local CAM.

Ok but 6900 model has 2 CI slots. How to choose a right one or assign per service?

catalinii commented 1 year ago

You can configure it using ddci.conf. When you browse channels a ddci.conf will be set with default values enabling a channel to be able to use both cams. Then you can prevent the channel from using one cam or the other. Of course, that is the case if the CAMs both handle the same channel using the same or different CAIDs.

Delitants commented 1 year ago

You can configure it using ddci.conf. When you browse channels a ddci.conf will be set with default values enabling a channel to be able to use both cams. Then you can prevent the channel from using one cam or the other. Of course, that is the case if the CAMs both handle the same channel using the same or different CAIDs.

Not sure what do you mean by browsing channels. Can’t really browse anything, I need manually determine needed PIDs and set them up. ddci.conf will be created itself somehow? Isn’t it for ddci device only? I just ordered tbs 6900 model.

catalinii commented 1 year ago

ddci.conf will be generated automatically based on the channels you are viewing.

Delitants commented 1 year ago

ddci.conf will be generated automatically based on the channels you are viewing.

I've received TBS 6900, inserted, started minisatip, tuned the channel and there is absolutely no ddci.conf file appeared anywhere around but in some cache folder. However, it recognized it in web gui and that's pretty much it. SID is confusing, it turns out to be PNR. How to customize and move it? It's not documented.

[12/05 17:27:28.038 main]: /dev/dvb/adapter0/sec0 device found, this is a DDCI device [12/05 17:27:28.038 main]: /dev/dvb/adapter0/sec1 device found, this is a DDCI device [12/05 17:27:28.039 signal]: Starting select_and_execute on thread ID 7f2e573ff640, thread_name signal [12/05 17:27:28.054 main]: Mutex init OK 0x560d38dae6c8 [12/05 17:27:28.054 main]: Mutex init OK 0x560d38daea30 [12/05 17:27:28.054 main]: AD2: Satip device 192.168.10.227 port 555 delsys 6: dvbs2 dvbs, fe -1, total number of devices 3 [12/05 17:27:28.054 main]: satipc.c:1610 Unlock disabled mutex 0x560d38daa508 [12/05 17:27:28.054 main]: Starting find_ddci_adapter with index 3 [12/05 17:27:28.054 main]: find_ddci_adapter: adding 0 0 to the list of devices [12/05 17:27:28.054 main]: Mutex init OK 0x560d36f4bf60 [12/05 17:27:28.054 main]: Loaded 0 channels from /var/cache/minisatip/ddci.conf

Delitants commented 1 year ago

image Does it even support CI+ in it? I don't understand why it's not working. Edited /var/cache/minisatip/ddci.conf put 3405:DDCI1 in the file, and nothing.

[12/05 17:47:54.856 main]: initializing CA 2, fd 12 type 2 flags 0x0, after 8058 ms [12/05 17:47:54.856 main]: CA module not present or not ready [12/05 17:47:54.856 main]: Requesting CA 2 close [12/05 17:47:54.856 main]: Adding pid 0 to the list of pids as not explicitly added for adapter 2 [12/05 17:47:54.856 main]: Adding pid 1 to the list of pids as not explicitly added for adapter 2 [12/05 17:47:54.856 main]: Adding pid 16 to the list of pids as not explicitly added for adapter 2 [12/05 17:47:54.856 main]: Adding pid 18 to the list of pids as not explicitly added for adapter 2

Huh???

catalinii commented 1 year ago

Can u upload the entire log ?

Delitants commented 1 year ago

My bad, I was inserting CAM in a wrong way, and it seemed like correct, flipped over, and seeing this: image However, I'm still unable to figure out how to move ddci.conf out of the cache folder and what exactly to write there. Tried: 3405:DDCI0 3405:DDCI1 3405:DDCI2 :DDCI1 none works

Can u upload the entire log ?

Can, just let me know how to configure ddci.conf correctly.

catalinii commented 1 year ago

Delete the file. Start minisatip and switch to few channels and stop minisatip. Then upload the file here

Delitants commented 1 year ago

Delete the file. Start minisatip and switch to few channels and stop minisatip. Then upload the file here

minisatip.txt.zip Channel not playing

Delitants commented 1 year ago

[12/05 19:32:18.784 AD1]: mmi display ctl cb received for CA 1 session_num 5 cmd_id 0x01 mmi_mode 1 [12/05 19:32:18.784 AD1]: ca_write_apdu: CA 1, session 5, name EN50221_APP_MMI_RESOURCEID, write tag 9F8802, data length 2 12/05 19:32:18.806 AD1: ca_read_apdu: CA 1, session 5, name EN50221_APP_MMI_RESOURCEID, read tag 9F880C, data length 96 12/05 19:32:18.806 AD1: CA 1 ======= MMI menu ======= 12/05 19:32:18.806 AD1: [UI 0] Encrypted signal 12/05 19:32:18.806 AD1: UI 1: UI 2: [UI 3] Your TV set does not support displaying of 12/05 19:32:18.806 AD1: [UI 4] this HD content

I don't see it creating a BIN file needed for CI+, not in cache folder, nor in working dir.

catalinii commented 1 year ago

The log shows that this CAM uses CI and CI+. Is it possible that it is not working because the CAM requires CI+ ? If that is the issue then you are missing the certificates from: /etc/ssl/certs (root.pem, customer.pem, device.pem)

Delitants commented 1 year ago

The log shows that this CAM uses CI and CI+. Is it possible that it is not working because the CAM requires CI+ ? If that is the issue then you are missing the certificates from: /etc/ssl/certs (root.pem, customer.pem, device.pem)

Yes it needs ci+. How to get those certs?

catalinii commented 1 year ago

Those certs are obtained illegally, we do not distribute them.

Google should help

Delitants commented 1 year ago

Those certs are obtained illegally, we do not distribute them.

Google should help

Doesn’t make any sense, I have minisatip installed on another host with 4K Humax CI+ module and it works flawlessly and I did nothing about certs, it’s a clean Ubuntu OS.

catalinii commented 1 year ago

Ubuntu does not have the certs included, but if you have them on that box, just copy them over.

Delitants commented 1 year ago

Ubuntu does not have the certs included, but if you have them on that box, just copy them over.

Ok, just checked I do indeed have /etc/ssl/certs/root.pem, /etc/ssl/certs/device.pem, /etc/ssl/certs/customer.pem I will copy them over and test Satip with TBS6900.

Delitants commented 1 year ago

I confirm it works. TBS6900+minisatip+certs+CAM CI+, everything over sat>ip over TCP.

Jalle19 commented 1 year ago

Good job!

Delitants commented 1 year ago

Good job!

How to receive plain MPEGTS tream into minisatip to make it pipe it to TBS ci card?

Jalle19 commented 1 year ago

Minisatip can't do that, it only understands SAT>IP. But you could experiment with tvheadend if it can take an MPEG-TS stream and expose said IPTV network over SAT>IP.

Delitants commented 1 year ago

Minisatip can't do that, it only understands SAT>IP. But you could experiment with tvheadend if it can take an MPEG-TS stream and expose said IPTV network over SAT>IP.

Ok thanks. TBS support said that 6900 model has web gui which allows to feed TS directly to the card.