Skip to contentSkip to conversation

problem with libdvben50221 and powercam pro V4 [almost solved]

PATCH DUBOST Brice 4 participants 7 messages Jan 24, 2010 – Jan 27, 2010 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hello

Powercam just made a new version of their cam, the version 4

Unfortunately this CAM doesn't work with gnutv and applications based on libdvben50221

This cam return TIMEOUT errors (en50221_stdcam_llci_poll: Error reported by stack:-3) after showing the supported ressource id.

I found out that this cam works with the test application of the libdvben50221

The problem is that this camreturns two times the list of supported ids (as shown in the log) this behavior make the llci_lookup_callback (en50221_stdcam_llci.c line 338) failing to give the good ressource_id at the second call because there is already a session number (in the test app the session number is not tested)

I solved the problem commenting out the test for the session number as showed in the joined patch (against the latest dvb-apps, cloned today)

Since I'm not an expert of the libdvben50221, I'm asking the list if there is better way to solve this problem and improve my patch so it can be integrated upstream.

Thank you

Signature · 3 lines
Brice DUBOST

A: Yes.
Quoted 3 lines

Q: Are you sure?

Quoted 2 lines

A: Because it reverses the logical flow of conversation.

Quoted 1 line

Q: Why is top posting annoying in email?

lib/libdvben50221/en50221_stdcam_llci.c +2 -2
diff -r 61b72047a995 lib/libdvben50221/en50221_stdcam_llci.c
@@ -334,8 +334,8 @@
 					return -3;
 				break;
 			case EN50221_APP_CA_RESOURCEID:
-				if (llci->stdcam.ca_session_number != -1)
-					return -3;
+				//if (llci->stdcam.ca_session_number != -1)
+				//	return -3;
 				break;
 			case EN50221_APP_MMI_RESOURCEID:
 				if (llci->stdcam.mmi_session_number != -1)

Found a CAM on adapter1... waiting... en50221_tl_register_slot
slotid: 0
tcid: 1
Press a key to enter menu
00:Host originated transport connection 1 connected 00:Public resource lookup callback 1 1 1
00:CAM connecting to resource 00010041, session_number 1 00:CAM successfully connected to resource 00010041, session_number 1 00:test_rm_reply_callback
00:test_rm_enq_callback
00:Public resource lookup callback 2 1 1
00:CAM connecting to resource 00020041, session_number 2 00:CAM successfully connected to resource 00020041, session_number 2 00:test_ai_callback
Application type: 01
Application manufacturer: 02ca
Manufacturer code: 3000
Menu string: PCAM V4.1
00:Public resource lookup callback 3 1 1
00:CAM connecting to resource 00030041, session_number 3 00:CAM successfully connected to resource 00030041, session_number 3 00:test_ca_info_callback
Supported CA ID: 4aa1
Supported CA ID: 0100
Supported CA ID: 0500
Supported CA ID: 0600
Supported CA ID: 0601
Supported CA ID: 0602
Supported CA ID: 0603
Supported CA ID: 0604
Supported CA ID: 0606
Supported CA ID: 0608
Supported CA ID: 0614
Supported CA ID: 0620
Supported CA ID: 0622
Supported CA ID: 0624
Supported CA ID: 0626
Supported CA ID: 0628
Supported CA ID: 0668
Supported CA ID: 0619
Supported CA ID: 1702
Supported CA ID: 1722
Supported CA ID: 1762
Supported CA ID: 0b00
Supported CA ID: 0b01
Supported CA ID: 0b02
Supported CA ID: 0d00
Supported CA ID: 0d01
Supported CA ID: 0d02
Supported CA ID: 0d03
Supported CA ID: 0d04
Supported CA ID: 0d05
Supported CA ID: 0d06
Supported CA ID: 0d07
Supported CA ID: 0d08
Supported CA ID: 0d0c
Supported CA ID: 0d0f
Supported CA ID: 0d22
Supported CA ID: 0d70
Supported CA ID: 4aa0
00:Connection to resource 00030041, session_number 3 closed 00:Public resource lookup callback 3 1 1
00:CAM connecting to resource 00030041, session_number 3 00:CAM successfully connected to resource 00030041, session_number 3 00:test_ca_info_callback
Supported CA ID: 4aa1
Supported CA ID: 0100
Supported CA ID: 0500
Supported CA ID: 0600
Supported CA ID: 0601
Supported CA ID: 0602
Supported CA ID: 0603
Supported CA ID: 0604
Supported CA ID: 0606
Supported CA ID: 0608
Supported CA ID: 0614
Supported CA ID: 0620
Supported CA ID: 0622
Supported CA ID: 0624
Supported CA ID: 0626
Supported CA ID: 0628
Supported CA ID: 0668
Supported CA ID: 0619
Supported CA ID: 1702
Supported CA ID: 1722
Supported CA ID: 1762
Supported CA ID: 0b00
Supported CA ID: 0b01
Supported CA ID: 0b02
Supported CA ID: 0d00
Supported CA ID: 0d01
Supported CA ID: 0d02
Supported CA ID: 0d03
Supported CA ID: 0d04
Supported CA ID: 0d05
Supported CA ID: 0d06
Supported CA ID: 0d07
Supported CA ID: 0d08
Supported CA ID: 0d0c
Supported CA ID: 0d0f
Supported CA ID: 0d22
Supported CA ID: 0d70
Supported CA ID: 4aa0

00:Public resource lookup callback 64 1 1
00:CAM connecting to resource 00400041, session_number 4 00:CAM successfully connected to resource 00400041, session_number 4 00:test_mmi_display_control_callback
cmd_id: 01
mode: 01
00:test_mmi_menu_callback
title: PCAM V4.1
sub_title:
bottom:
item 1: English
item 2: French
item 3: Spanish
item 4: German
item 5: Russian
item 6: Arabic A
item 7: Arabic B
raw_length: 0

#1 lore raw

Hi Brice,

Quoted 20 lines · DUBOST Brice

Hello

Powercam just made a new version of their cam, the version 4

Unfortunately this CAM doesn't work with gnutv and applications based on libdvben50221

This cam return TIMEOUT errors (en50221_stdcam_llci_poll: Error reported by stack:-3) after showing the supported ressource id.

I found out that this cam works with the test application of the libdvben50221

The problem is that this camreturns two times the list of supported ids (as shown in the log) this behavior make the llci_lookup_callback (en50221_stdcam_llci.c line 338)  failing to give the good ressource_id at the second call because there is already a session number (in the test app the session number is not tested)

Quoted 6 lines

I solved the problem commenting out the test for the session number as showed in the joined patch (against the latest dvb-apps, cloned today)

Since I'm not an expert of the libdvben50221, I'm asking the list if there is better way to solve this problem and improve my patch so it can be integrated upstream.

Very strange that, it responds twice on the same session. Btw, What DVB driver are you using ? budget_ci or budget_av ?

Regards,
Manu

Quoted 137 lines

Thank you

--
Brice DUBOST

A: Yes.

Quoted 3 lines

Q: Are you sure?

Quoted 2 lines

A: Because it reverses the logical flow of conversation.

Quoted 1 line

Q: Why is top posting annoying in email?

Found a CAM on adapter1... waiting... en50221_tl_register_slot
slotid: 0
tcid: 1
Press a key to enter menu
00:Host originated transport connection 1 connected 00:Public resource lookup callback 1 1 1
00:CAM connecting to resource 00010041, session_number 1 00:CAM successfully connected to resource 00010041, session_number 1 00:test_rm_reply_callback
00:test_rm_enq_callback
00:Public resource lookup callback 2 1 1
00:CAM connecting to resource 00020041, session_number 2 00:CAM successfully connected to resource 00020041, session_number 2 00:test_ai_callback
 Application type: 01
 Application manufacturer: 02ca
 Manufacturer code: 3000
 Menu string: PCAM V4.1
00:Public resource lookup callback 3 1 1
00:CAM connecting to resource 00030041, session_number 3 00:CAM successfully connected to resource 00030041, session_number 3 00:test_ca_info_callback
 Supported CA ID: 4aa1
 Supported CA ID: 0100
 Supported CA ID: 0500
 Supported CA ID: 0600
 Supported CA ID: 0601
 Supported CA ID: 0602
 Supported CA ID: 0603
 Supported CA ID: 0604
 Supported CA ID: 0606
 Supported CA ID: 0608
 Supported CA ID: 0614
 Supported CA ID: 0620
 Supported CA ID: 0622
 Supported CA ID: 0624
 Supported CA ID: 0626
 Supported CA ID: 0628
 Supported CA ID: 0668
 Supported CA ID: 0619
 Supported CA ID: 1702
 Supported CA ID: 1722
 Supported CA ID: 1762
 Supported CA ID: 0b00
 Supported CA ID: 0b01
 Supported CA ID: 0b02
 Supported CA ID: 0d00
 Supported CA ID: 0d01
 Supported CA ID: 0d02
 Supported CA ID: 0d03
 Supported CA ID: 0d04
 Supported CA ID: 0d05
 Supported CA ID: 0d06
 Supported CA ID: 0d07
 Supported CA ID: 0d08
 Supported CA ID: 0d0c
 Supported CA ID: 0d0f
 Supported CA ID: 0d22
 Supported CA ID: 0d70
 Supported CA ID: 4aa0
00:Connection to resource 00030041, session_number 3 closed 00:Public resource lookup callback 3 1 1
00:CAM connecting to resource 00030041, session_number 3 00:CAM successfully connected to resource 00030041, session_number 3 00:test_ca_info_callback
 Supported CA ID: 4aa1
 Supported CA ID: 0100
 Supported CA ID: 0500
 Supported CA ID: 0600
 Supported CA ID: 0601
 Supported CA ID: 0602
 Supported CA ID: 0603
 Supported CA ID: 0604
 Supported CA ID: 0606
 Supported CA ID: 0608
 Supported CA ID: 0614
 Supported CA ID: 0620
 Supported CA ID: 0622
 Supported CA ID: 0624
 Supported CA ID: 0626
 Supported CA ID: 0628
 Supported CA ID: 0668
 Supported CA ID: 0619
 Supported CA ID: 1702
 Supported CA ID: 1722
 Supported CA ID: 1762
 Supported CA ID: 0b00
 Supported CA ID: 0b01
 Supported CA ID: 0b02
 Supported CA ID: 0d00
 Supported CA ID: 0d01
 Supported CA ID: 0d02
 Supported CA ID: 0d03
 Supported CA ID: 0d04
 Supported CA ID: 0d05
 Supported CA ID: 0d06
 Supported CA ID: 0d07
 Supported CA ID: 0d08
 Supported CA ID: 0d0c
 Supported CA ID: 0d0f
 Supported CA ID: 0d22
 Supported CA ID: 0d70
 Supported CA ID: 4aa0

00:Public resource lookup callback 64 1 1
00:CAM connecting to resource 00400041, session_number 4 00:CAM successfully connected to resource 00400041, session_number 4 00:test_mmi_display_control_callback
 cmd_id: 01
 mode: 01
00:test_mmi_menu_callback
 title: PCAM V4.1
 sub_title:
 bottom:
 item 1: English
 item 2: French
 item 3: Spanish
 item 4: German
 item 5: Russian
 item 6: Arabic A
 item 7: Arabic B
 raw_length: 0

#2 lore raw
Quoted 27 lines · Manu Abraham

Hi Brice,

Quoted 23 lines · DUBOST Brice

Hello

Powercam just made a new version of their cam, the version 4

Unfortunately this CAM doesn't work with gnutv and applications based on libdvben50221

This cam return TIMEOUT errors (en50221_stdcam_llci_poll: Error reported by stack:-3) after showing the supported ressource id.

I found out that this cam works with the test application of the libdvben50221

The problem is that this camreturns two times the list of supported ids (as shown in the log) this behavior make the llci_lookup_callback (en50221_stdcam_llci.c line 338) failing to give the good ressource_id at the second call because there is already a session number (in the test app the session number is not tested)

I solved the problem commenting out the test for the session number as showed in the joined patch (against the latest dvb-apps, cloned today)

Quoted 8 lines
Quoted 3 lines

Since I'm not an expert of the libdvben50221, I'm asking the list if there is better way to solve this problem and improve my patch so it can be integrated upstream.

Very strange that, it responds twice on the same session. Btw, What DVB driver are you using ? budget_ci or budget_av ?

Hello

The card is a "DVB: registering new adapter (TT-Budget S2-3200 PCI)" and the driver used is budget_ci

Do you want me to run some more tests ?

Regards

Signature · 3 lines
Brice

A: Yes.
Quoted 3 lines

Q: Are you sure?

Quoted 2 lines

A: Because it reverses the logical flow of conversation.

Quoted 1 line

Q: Why is top posting annoying in email?

#3 lore raw
Quoted 28 lines · DUBOST Brice <dubost <at> crans.ens-cachan.fr> writes:
Quoted 20 lines · Manu Abraham

Hi Brice,

Quoted 16 lines · On Mon, Jan 25, 2010 at 12:09 AM, DUBOST Brice <dubost <at>…

Hello

Powercam just made a new version of their cam, the version 4

Unfortunately this CAM doesn't work with gnutv and applications based on libdvben50221

This cam return TIMEOUT errors (en50221_stdcam_llci_poll: Error reported by stack:-3) after showing the supported ressource id.

The problem is that this camreturns two times the list of supported ids (as shown in the log) this behavior make the llci_lookup_callback (en50221_stdcam_llci.c line 338) failing to give the good ressource_id at the second call because there is already a session number (in the test app the session number is not tested)

Quoted 5 lines
Quoted 2 lines

I solved the problem commenting out the test for the session number as showed in the joined patch (against the latest dvb-apps, cloned today)

Very strange that, it responds twice on the same session. Btw, What DVB driver are you using ? budget_ci or budget_av ?

Quoted 7 lines

Hello

The card is a "DVB: registering new adapter (TT-Budget S2-3200 PCI)" and the driver used is budget_ci

Do you want me to run some more tests ?

Hello Manu, Hello Brice,

I will run some tests with a TT3200 card too and a Netup card tomorrow.

Regarding the cam returning two times the list of valid cam ids, wouldn't be better if the manufacturer corrects it in the cam firmware ? What says the en50221 norm about it ?

Regards

Signature · 1 line
Pierre
#4 lore raw

pierre gronlier wrote, On 01/24/2010 11:03 PM:

Quoted 22 lines
Quoted 21 lines · DUBOST Brice <dubost <at> crans.ens-cachan.fr> writes:
Quoted 20 lines · Manu Abraham

Hi Brice,

Quoted 16 lines · On Mon, Jan 25, 2010 at 12:09 AM, DUBOST Brice <dubost <at>…

Hello

Powercam just made a new version of their cam, the version 4

Unfortunately this CAM doesn't work with gnutv and applications based on libdvben50221

This cam return TIMEOUT errors (en50221_stdcam_llci_poll: Error reported by stack:-3) after showing the supported ressource id.

The problem is that this camreturns two times the list of supported ids (as shown in the log) this behavior make the llci_lookup_callback (en50221_stdcam_llci.c line 338) failing to give the good ressource_id at the second call because there is already a session number (in the test app the session number is not tested)

Quoted 9 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

I solved the problem commenting out the test for the session number as showed in the joined patch (against the latest dvb-apps, cloned today)

I will run some tests with a TT3200 card too and a Netup card tomorrow.

Regarding the cam returning two times the list of valid cam ids, wouldn't be better if the manufacturer corrects it in the cam firmware ? What says the en50221 norm about it ?

Indeed, with the patch applied, the command gnutv -adapter 0 -cammenu is working fine with a netup card too.

I will try to update to the last revision of pcam firmware (v4.2) and report this behaviour to the manufacturer.

Signature · 1 line
Pierre
#5 lore raw
Quoted 32 lines · pierre.gronlier

pierre gronlier wrote, On 01/24/2010 11:03 PM:

Quoted 22 lines
Quoted 21 lines · DUBOST Brice <dubost <at> crans.ens-cachan.fr> writes:
Quoted 20 lines · Manu Abraham

Hi Brice,

Quoted 16 lines · On Mon, Jan 25, 2010 at 12:09 AM, DUBOST Brice <dubost <at>…

Hello

Powercam just made a new version of their cam, the version 4

Unfortunately this CAM doesn't work with gnutv and applications based on libdvben50221

This cam return TIMEOUT errors (en50221_stdcam_llci_poll: Error reported by stack:-3) after showing the supported ressource id.

The problem is that this camreturns two times the list of supported ids (as shown in the log) this behavior make the llci_lookup_callback (en50221_stdcam_llci.c line 338) failing to give the good ressource_id at the second call because there is already a session number (in the test app the session number is not tested)

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

I solved the problem commenting out the test for the session number as showed in the joined patch (against the latest dvb-apps, cloned today)

I will run some tests with a TT3200 card too and a Netup card tomorrow.

Regarding the cam returning two times the list of valid cam ids, wouldn't be better if the manufacturer corrects it in the cam firmware ? What says the en50221 norm about it ?

Quoted 6 lines

Indeed, with the patch applied, the command gnutv -adapter 0 -cammenu is working fine with a netup card too.

I will try to update to the last revision of pcam firmware (v4.2) and report this behaviour to the manufacturer.

Hello, a bit more information on this issue

Just for information, Here I attach you the log of another test I did, the CAM answers the list of available Ids several times (each time you change it basically) on the same session.

Manu : the test in the libdvben50221 was intended to deal with which case ?

I notice also that the decoding can fail if the PMT_ASK is sent between the two ca_list answer at the beginning (this is a bit boring).

Regards

Signature · 1 line
Brice

Found a CAM on adapter1... waiting... en50221_tl_register_slot
slotid: 0
tcid: 1
Press a key to enter menu
00:Host originated transport connection 1 connected 00:Public resource lookup callback 1 1 1
00:CAM connecting to resource 00010041, session_number 1 00:CAM successfully connected to resource 00010041, session_number 1 00:test_rm_reply_callback
00:test_rm_enq_callback
00:Public resource lookup callback 2 1 1
00:CAM connecting to resource 00020041, session_number 2 00:CAM successfully connected to resource 00020041, session_number 2 00:test_ai_callback
Application type: 01
Application manufacturer: 02ca
Manufacturer code: 3000
Menu string: PCAM V4.1
00:Public resource lookup callback 3 1 1
00:CAM connecting to resource 00030041, session_number 3 00:CAM successfully connected to resource 00030041, session_number 3 00:test_ca_info_callback
Supported CA ID: 0500
00:Connection to resource 00030041, session_number 3 closed 00:Public resource lookup callback 3 1 1
00:CAM connecting to resource 00030041, session_number 3 00:CAM successfully connected to resource 00030041, session_number 3 00:test_ca_info_callback
Supported CA ID: 0500

00:Public resource lookup callback 64 1 1
00:CAM connecting to resource 00400041, session_number 4 00:CAM successfully connected to resource 00400041, session_number 4 00:test_mmi_display_control_callback
cmd_id: 01
mode: 01
00:test_mmi_menu_callback
title: PCAM V4.1
sub_title: Select a language
bottom:
item 1: English
item 2: French
item 3: Spanish
item 4: German
item 5: Russian
item 6: Arabic A
item 7: Arabic B
raw_length: 0
1
00:test_mmi_menu_callback
title: PCAM V4.1
sub_title: Main Menu
bottom: Select one and press 'OK' to continue
item 1: SmartCard & PIN
item 2: CAS
item 3: VP: 21680
item 4: Download Status
raw_length: 0
2
00:test_mmi_menu_callback
title: PCAM V4.1
sub_title: Currently selected CAS:
bottom: Please select 'Yes' or 'No' and press 'OK' to continue item 1: Do you want to change it?
item 2: No
item 3: Yes
raw_length: 0
3
00:test_mmi_menu_callback
title: PCAM V4.1
sub_title: Currently selected CAS:
bottom: Please select an option and press 'OK' to continue item 1: ALL
item 2: Embedded Channels & PIN [OFF]
item 3: MOSAIC-S [OFF]
item 4: MOSAIC-V [ON]
item 5: MOSAIC-I [OFF]
item 6: MOSAIC-B [OFF]
item 7: MOSAIC-C [OFF]
item 8: MOSAIC-X [OFF]
item 9: KEYFLY [OFF]
raw_length: 0
3
00:test_mmi_menu_callback
title: PCAM V4.1
sub_title: Currently selected CAS:
bottom: Please select an option and press 'OK' to continue item 1: ALL
item 2: Embedded Channels & PIN [OFF]
item 3: MOSAIC-S [ON]
item 4: MOSAIC-V [ON]
item 5: MOSAIC-I [OFF]
item 6: MOSAIC-B [OFF]
item 7: MOSAIC-C [OFF]
item 8: MOSAIC-X [OFF]
item 9: KEYFLY [OFF]
raw_length: 0
00:Connection to resource 00030041, session_number 3 closed 00:Public resource lookup callback 3 1 1
00:CAM connecting to resource 00030041, session_number 3 00:CAM successfully connected to resource 00030041, session_number 3 00:test_ca_info_callback
Supported CA ID: 0100
Supported CA ID: 0500
3
00:test_mmi_menu_callback
title: PCAM V4.1
sub_title: Currently selected CAS:
bottom: Please select an option and press 'OK' to continue item 1: ALL
item 2: Embedded Channels & PIN [OFF]
item 3: MOSAIC-S [OFF]
item 4: MOSAIC-V [ON]
item 5: MOSAIC-I [OFF]
item 6: MOSAIC-B [OFF]
item 7: MOSAIC-C [OFF]
item 8: MOSAIC-X [OFF]
item 9: KEYFLY [OFF]
raw_length: 0
00:Connection to resource 00030041, session_number 3 closed 00:Public resource lookup callback 3 1 1
00:CAM connecting to resource 00030041, session_number 3 00:CAM successfully connected to resource 00030041, session_number 3 00:test_ca_info_callback
Supported CA ID: 0500

#6 lore raw
In reply to pierre gronlier

Hello Pierre,

Quoted 37 lines · pierre gronlier
Quoted 28 lines · DUBOST Brice <dubost <at> crans.ens-cachan.fr> writes:
Quoted 20 lines · Manu Abraham

Hi Brice,

Quoted 16 lines · On Mon, Jan 25, 2010 at 12:09 AM, DUBOST Brice <dubost <at>…

Hello

Powercam just made a new version of their cam, the version 4

Unfortunately this CAM doesn't work with gnutv and applications based on libdvben50221

This cam return TIMEOUT errors (en50221_stdcam_llci_poll: Error reported by stack:-3) after showing the supported ressource id.

The problem is that this camreturns two times the list of supported ids (as shown in the log) this behavior make the llci_lookup_callback (en50221_stdcam_llci.c line 338)  failing to give the good ressource_id at the second call because there is already a session number (in the test app the session number is not tested)

Quoted 5 lines
Quoted 2 lines

I solved the problem commenting out the test for the session number as showed in the joined patch (against the latest dvb-apps, cloned today)

Very strange that, it responds twice on the same session. Btw, What DVB driver are you using ? budget_ci or budget_av ?

Quoted 7 lines

Hello

The card is a "DVB: registering new adapter (TT-Budget S2-3200 PCI)" and the driver used is budget_ci

Do you want me to run some more tests ?

Quoted 7 lines

Hello Manu, Hello Brice,

I will run some tests with a TT3200 card too and a Netup card tomorrow.

Regarding the cam returning two times the list of valid cam ids, wouldn't be better if the manufacturer corrects it in the cam firmware ? What says the en50221 norm about it ?

EN50221 says:

The host sends a CA Info Enquiry object to the application, which responds by returning an CA Info object with the appropriate information. The session is then kept open for periodic operation of the protocol associated with
the CA PMT and CA PMT Reply objects

The specification is not very clear either way, I will try to get some more understanding in there ..

Regards,
Manu