[Unofficial] libCEC and Python CEC

Moderator: Lillian.W@AST

User avatar
mafredri
Posts: 371
youtube meble na wymiar Warszawa
Joined: Sat Mar 22, 2014 8:41 am

[Unofficial] libCEC and Python CEC

Post by mafredri »

Hello,

I've packaged up support for libCEC on ADM. Here's my original thread on getting HDMI-CEC working on the NAS. The benefit of this is that they can now be installed as apps on the NAS and are completely self-contained. I have also fixed the auto-detection of the HDMI-CEC adapter, so you no longer need to know which device to initialize.

Python CEC can be used to easily catch and perform HDMI-CEC actions on the NAS (knowledge of Python necessary).

UPDATE: ASUSTOR now supports CEC themselves through the Media-Pack, you should grab it if your NAS is supported!

2014-07-23: Python CEC updated with i386 support (and minor bug fix).
2014-07-17: libCEC now supports both i386 and x86-64 architectures! Python CEC package will get an update soon!

libCEC:
More information on the project homepage.

Python CEC:
More information on the project homepage.

Downloads:
libCEC - 2.1.4-r3
Python CEC - 0.2.2-r1

Sample output from libCEC:

Code: Select all

root@arcade:/volume1/.@root # cec-client --list-devices
Found devices: 1

device:              1
com port:            /dev/ttyACM0
vendor id:           2548
product id:          1002
firmware version:    4
firmware build date: Thu Dec  6 11:15:20 2012 +0000
type:                Pulse-Eight USB-CEC Adapter
Last edited by mafredri on Tue Oct 27, 2015 3:37 am, edited 6 times in total.
Hi, I'm new here. Looking to be active in the community and help with development :).
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
MrK
Posts: 127
Joined: Tue Nov 19, 2013 7:19 pm

Re: [Unofficial] libCEC and Python CEC

Post by MrK »

In the Linux kernel source on Sourceforge (GPL_linux-2.6.39_0505.tar.bz2) there's a file included called "gen3_defconfig.ht". That looks like a kernel config file to me. Maybe you could try compiling using this?

Code: Select all

#
# Automatically generated make config: don't edit
# Linux/x86 2.6.39 Kernel Configuration
# Thu Nov 15 00:09:16 2012
#
Storage: AS-202T | AS-604T (borrowed)
PC/Laptop: iMac 27" & rMBP 15"
Media Server/Player: Plex on ASUSTOR NAS & Samsung TV
User avatar
mafredri
Posts: 371
Joined: Sat Mar 22, 2014 8:41 am

Re: [Unofficial] libCEC and Python CEC

Post by mafredri »

Well, that's for the old 2.6.39 kernel. The current one used on ADM is 3.7.9, I would not be surprised if the kernel configuration differs significantly between these two releases. Compiling kernel modules is a bit iffy, if even one configuration parameter is wrong, then it will likely not work. For this reason, especially when I don't have a 32-bit ASUSTOR NAS to try it on, I would prefer not to hope that it works.

I did receive the 64-bit kernel configuration from ASUSTOR support, but even trying to modify that for the 32-bit system is not likely to work.
Hi, I'm new here. Looking to be active in the community and help with development :).
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
MrK
Posts: 127
Joined: Tue Nov 19, 2013 7:19 pm

Re: [Unofficial] libCEC and Python CEC

Post by MrK »

Well, on my AS-202T with the latest ADM 2.2 the kernel is still 2.6.39. It's no uncommon for NAS manufacturer to have different kernel version for different platforms.
Storage: AS-202T | AS-604T (borrowed)
PC/Laptop: iMac 27" & rMBP 15"
Media Server/Player: Plex on ASUSTOR NAS & Samsung TV
User avatar
mafredri
Posts: 371
Joined: Sat Mar 22, 2014 8:41 am

Re: [Unofficial] libCEC and Python CEC

Post by mafredri »

MrK wrote:Well, on my AS-202T with the latest ADM 2.2 the kernel is still 2.6.39. It's no uncommon for NAS manufacturer to have different kernel version for different platforms.
Oh, I wasn't aware that it was running such a legacy kernel, heh. Good to know, thanks! Do you know if it's the same for AS-3?
Hi, I'm new here. Looking to be active in the community and help with development :).
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
User avatar
Kapitein Haak
Posts: 333
Joined: Tue Oct 15, 2013 2:40 pm
Location: Stranded on the Dutch coast.

Re: [Unofficial] libCEC and Python CEC

Post by Kapitein Haak »

I do, it's unfortunately the same old kernel on the AS-3 series. Probably because of Intel (lack of) support/driver for a newer kernel.

Best regards,
Kapitein Haak.
"What would the world be like without Captain Hook?"
---
"Homo sapiens non urinat in ventum" (A wise man doesn't piss into the wind), only in Amsterdam:
https://www.google.nl/maps/@52.36289,4. ... 312!8i6656
User avatar
mafredri
Posts: 371
Joined: Sat Mar 22, 2014 8:41 am

Re: [Unofficial] libCEC and Python CEC

Post by mafredri »

Thanks for the info, Kapitein Haak! Then the kernel configuration posted by z1022 should work just fine.

I've attached the cdc-acm module for the 2.6.39 kernel, would anyone mind trying it out?

Code: Select all

tar xvzf cdc-acm-i386.tar.gz
insmod cdc-acm.ko
dmesg | grep cdc_acm
Cheers,
Mathias
Attachments
cdc-acm-i386.tar.gz
(9.71 KiB) Downloaded 755 times
Hi, I'm new here. Looking to be active in the community and help with development :).
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
MrK
Posts: 127
Joined: Tue Nov 19, 2013 7:19 pm

Re: [Unofficial] libCEC and Python CEC

Post by MrK »

Although I have not HDMI interface on my AS-202T I gave it a shot. Loading the kernel module looks good:

Code: Select all

[root@AS-202T-120GB /tmp]$ insmod cdc-acm.ko
[root@AS-202T-120GB /tmp]$ lsmod | fgrep cdc
cdc_acm 11533 0 - Live 0xdf6e5000
[root@AS-202T-120GB /tmp]$ dmesg | grep cdc_acm
[  209.841559] usbcore: registered new interface driver cdc_acm
[  209.850046] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
Storage: AS-202T | AS-604T (borrowed)
PC/Laptop: iMac 27" & rMBP 15"
Media Server/Player: Plex on ASUSTOR NAS & Samsung TV
User avatar
mafredri
Posts: 371
Joined: Sat Mar 22, 2014 8:41 am

Re: [Unofficial] libCEC and Python CEC

Post by mafredri »

Thanks a heap MrK! I'll try to push a release for the AS-3 series tonight. Forgot the AS-2 series didn't have HDMI :/..
Hi, I'm new here. Looking to be active in the community and help with development :).
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
User avatar
Kapitein Haak
Posts: 333
Joined: Tue Oct 15, 2013 2:40 pm
Location: Stranded on the Dutch coast.

Re: [Unofficial] libCEC and Python CEC

Post by Kapitein Haak »

Hello Mathias,

You could also push it for the 2-series as the AS-20xTE versions do have HDMI out. Your efforts on improving the NAS are appreciated.

Best regards,
Kapitein Haak.
"What would the world be like without Captain Hook?"
---
"Homo sapiens non urinat in ventum" (A wise man doesn't piss into the wind), only in Amsterdam:
https://www.google.nl/maps/@52.36289,4. ... 312!8i6656
Post Reply

Return to “LibCEC”