catalinii / minisatip

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

Diseqc 1.1 support #150

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hi,

are the diseqc commands supported by minisatip. I have a diseqc with 1 to 8 outputs, can I use minisatip with it?

Thanks a lot

ghost commented 9 years ago

In my comment I meant Diseqc 1.1 of course

catalinii commented 9 years ago

Hi,

yes diseqc 1.0 (at least is supported) and the code allows just for 4 outputs.

I know diseqc 1.1 allows up to 16 different outputs, do you use more than 5 lnb connected to it ?

Currently uncommited diseqc message is not sent, but I can change that easily in the next commit and let me know how it works.

Thanks

ghost commented 9 years ago

Hi,

what I use is a diseqc 1.1 with 8 inputs and 1 output. This is direct 1.1 mode (so uncommited?) where i can control lnb from 1 to 8.

It would be so great if you could add an option to select among:

Thanks a lot in advance!

catalinii commented 9 years ago

Do you have some tool that works with your switch ? All I could find on a quick search was commited (1.0) and uncommited (1.1). Thanks

ghost commented 9 years ago

Well my enigma2 box does :D I guess tvheadend as well!

What i need in my case is pure uncomitted command, can you quickly implement it ? it's just an index.

Thanks!!

catalinii commented 9 years ago

Yeah I have added the uncommited support to the next commit.

ghost commented 9 years ago

Cool! Can it be setup from command line? when will you push?

I can test a patch ?

catalinii commented 9 years ago

It will use src= parameter from the URL to set the diseqc input, so no command line.

Probably this week/ early next week. I need to check what I did last time as I was away for a week. Thanks

ghost commented 9 years ago

But how will it decide if it needs to send 1.0 or 1.1? I use the mipsel version for vu+ btw

thx

catalinii commented 9 years ago

I'll send both....

ghost commented 9 years ago

Ok thanks! I am really looking forward to testing it

ghost commented 9 years ago

Hi, I tried to change the code to send a 0x39 command (uncommited), but no success so far:/

Hope you have a better idea :)

thx

ghost commented 9 years ago

Hi Catalinii

so I tried your patch (already :) ) with -l -l -l and adding the uncmd in the log. I still can't tune (using tvheadend in this case).

Here is the log http://pastebin.com/bPjaF5N1

Can you please have a look ? Enigma2 works well with this transponder.

By the way, after this log, the tuner does not work anymore in enigma2, I have to reboot. So it looks like it actually send a command to the diseqc, putting it in a strange state ...

Thanks

catalinii commented 9 years ago

From the log I see is sending src=1 whihc is 0 uncommited and 1 commited (position 1)

basically what you have in src / 4 is uncommited src % 4 is commited

ghost commented 9 years ago

But if you look for instance : https://github.com/linuxstb/dvbtools/blob/master/dvbtune/diseqc.c

It looks like the uncommited command is simply 0x39 0xFn, where n is 0->15 respect to diseqc input 1->16

In my case, I am using only 1 diseqc in 1.1 mode, with 1->8 inputs

ghost commented 9 years ago

But even not sending the committed command doesnt not help ... I don't know how but enigma2 works just fine :/

ghost commented 9 years ago

Here is the enigma2 part that works (i think):

http://sourceforge.net/p/openpli/enigma2/ci/65b45f75e4c14174a580a5345b85408fad826895/

catalinii commented 9 years ago

Try src=8

catalinii commented 9 years ago

Sorry src=4

ghost commented 9 years ago

you mean src=4 for diseqc position 1 ?

ghost commented 9 years ago

I get this with src=4

[30/07 07:49:55.124477]: send_diseqc fd 8, pos = 3, pol = 0, hiband = 0, com => e0 10 38 fc 00, uncom => e0 10 39 f0 00

ghost commented 9 years ago

Can you take a look at e2 implementation please ? When I log what enigma2 does, I get the following when changing diseqc input:

The first time, it goes on input 3:

< 1396.413332> eDVBFrontendtune [64/48097] < 1396.413485> [eDVBSatelliteEquipmentControl] RotorCmd ffffffff, lastRotorCmd ffffffff < 1396.413617> [eDVBFrontend] prepare_sat System 1 Freq 10729000 Pol 1 SR 22000000 INV 2 FEC 2 orbpos 192 system 1 modulation 2 pilot 2, rolloff 0 < 1396.413799> [eDVBFrontend] tuning to 979 mhz < 1396.413953> [eDVBChannel] OURSTATE: tuning < 1396.433503> [eDVBFrontend] set static current limiting < 1396.434573> [eDVBFrontend] set sequence pos 3 < 1396.434972> [eDVBFrontend] set sequence pos 4 < 1396.435226> [eDVBFrontend] setVoltage 1 < 1396.435905> [eDVBFrontend] sleep 200ms < 1396.636358> [eDVBFrontend] invalidate current switch params < 1396.636798> [eDVBFrontend] sendDiseqc: e00000(DiSEqC reset) < 1396.638181> [eDVBFrontend] sleep 50ms < 1396.788070> [eDVBFrontend] sendDiseqc: e00003(DiSEqC peripherial power on) < 1396.791206> [eDVBFrontend] sleep 150ms < 1396.941443> [eDVBFrontend] sendDiseqc: e01039f2(?) < 1396.941792> [eDVBFrontend] sleep 50ms < 1396.991921> [eDVBFrontend] set sequence pos 3 < 1396.992348> [eDVBFrontend] set sequence pos 3 < 1396.992499> [eDVBFrontend] update current switch params < 1396.992572> [eDVBFrontend] startTuneTimeout 5000 < 1396.992650> [eDVBFrontend] setFrontend 1 < 1396.992702> [eDVBFrontend] setting frontend 0 < 1396.993923> eDVBFrontendfe event: status 0, inversion off, m_tuning 1 < 1396.994107> [eDVBFrontend] sleep 500ms < 1397.093216> eDVBFrontendfe event: status 7, inversion off, m_tuning 2 < 1397.193559> eDVBFrontendfe event: status 1f, inversion off, m_tuning 3 < 1397.193744> [eDVBChannel] OURSTATE: ok < 1397.494386> [eDVBFrontend] set dynamic current limiting

Then changing to input 2:

action -> SetupActions right unknown action SetupActions/right! typo in keymap? action -> SetupActions right [TuneTest] tuning to transponder with data (11459, 6666, 1, 5, 2, 235, 0, 1, 0, 2) < 1403.405305> eDVBFrontendtune < 1403.405492> [eDVBSatelliteEquipmentControl] RotorCmd ffffffff, lastRotorCmd ffffffff < 1403.405646> [eDVBFrontend] prepare_sat System 0 Freq 11459000 Pol 1 SR 6666000 INV 2 FEC 5 orbpos 235 system 0 modulation 1 pilot 2, rolloff 0 < 1403.405762> [eDVBFrontend] tuning to 1709 mhz < 1403.405858> [eDVBChannel] OURSTATE: tuning < 1403.412219> [eDVBFrontend] set static current limiting < 1403.413195> [eDVBFrontend] set sequence pos 3 < 1403.413718> [eDVBFrontend] set sequence pos 7 < 1403.414262> [eDVBFrontend] invalidate current switch params < 1403.414871> [eDVBFrontend] sendDiseqc: e01039f1(?) < 1403.417553> [eDVBFrontend] sleep 50ms < 1403.467947> [eDVBFrontend] set sequence pos 3 < 1403.468540> [eDVBFrontend] set sequence pos 3 < 1403.469113> [eDVBFrontend] update current switch params < 1403.469647> [eDVBFrontend] startTuneTimeout 20000 < 1403.470223> [eDVBFrontend] setFrontend 1 < 1403.470718> [eDVBFrontend] setting frontend 0 < 1403.473053> eDVBFrontendfe event: status 0, inversion off, m_tuning 1 < 1403.473335> [eDVBFrontend] sleep 500ms < 1403.572236> eDVBFrontendfe event: status 7, inversion off, m_tuning 2 < 1403.973727> [eDVBFrontend] set dynamic current limiting

ghost commented 9 years ago

I think that what you implemented actually is diseqc 1.0 + 1.1 In my case, it's pure diseqc 1.1 with 1->8 commands ...

I hope you can sort something out :)

Thx

catalinii commented 9 years ago

Hi,

I forgot that src gets decremented so you can try src=5

I looked previously to tvheadend and the sources above and it is all about uncommitted and committed.

As I said (src-1) / 4 --> uncommitted index (src -1) % 4 --> committed index

Thanks

ghost commented 9 years ago

Yes I tried this. i changed my diseqc working mode to 1.0+1.1 but same issue.

BTw are you sure of your uncommited command:

ghost commented 9 years ago

By the way, i can code and compile for my vu+, so if you have some debugging ideas, please let me know! Maybe it's the a diseqc problem after all.. maybe a tuning issue.

Aso the tone burst should be configuration enalbe/disable i think

thx!!

ghost commented 9 years ago

Hi,

after more investigation it seems that the problem now comes from the pid filtering. After we setup a pid filter (0 fo instance), no data comes back from dvr0 as expected. Femon says that the tp is tuned though. Is there a chance that the pid filtering has a problem on the vu+ solo2 with minisatip ?

What is very strange, is that it looks like that when using the frontend0, it is only possible to scan channels using demux1 and not demux0... EDIT: this came from satipclient running on the box...

So it could be one of the problems

Thanks

catalinii commented 9 years ago

Hi,

just to understand, what was the solution for the diseqc problem ? Is there something that needs to be done additionally to resolve tuning problems ?

About demux, if I understand correctly, you have multiple (2?) demux devices? If yes you can change in dvb_set_pid (dvc.c) and see if you get something out of dvr0.

Thanks

ghost commented 9 years ago

Hi,

to be honest it does not work very well.. I made it send only the 0x39 command and it helped.

About the demuxes and fe, it's still unclear to me how it works, but using fe0 and dmx0 was ok.

Though, the pid filtering was very slow to start.

catalinii commented 9 years ago

Hi,

you mean there is a difference when you send just 39 or when you send 38 and 39 ?

Basically my entire question is, what needs to be implemented on the diseqc part for your switch to be working (more specifically what diseqc commands needs to be sent).

About the pid filtering, did you find a better way of doing the things ?

Thanks

ghost commented 9 years ago

A difference with just 0x39.

I need to do more tests to know .. the switching seemed ok with 0x39 only. About pid filtering, no i did not :/

9000h commented 9 years ago

unfortunatly the normal diseqc is broken since VERSION_BUILD "46", but I do not have the time to look after it

catalinii commented 9 years ago

I have added a new switch -d for diseqc.

By defa8ult Diseqc 1.0 works as previously, but you can change to be sent just uncommitted or just committed signals.

Please test and let me know.

9000h commented 9 years ago

will do so when I'm back home end of August

ghost commented 9 years ago

Hey,

I tried it and there is a little typo + a misconfig of the uncmd. here is fix: http://pastebin.com/NEYXfPmC

9000h commented 9 years ago

I can confirm the default Diseqc 1.0 works as previously.

catalinii commented 9 years ago

Let me know if this ok on 1.1

Thanks

ghost commented 9 years ago

Hi Catalinii,

yes with the patch it works for me!

thx

catalinii commented 9 years ago

Thanks, I will close this.