vibez
Posts: 27
Joined: Thu Aug 15, 2013 11:30 am

CEC

Tue Oct 07, 2014 12:42 pm

Does anyone know the cec command to tell all connected devices that the rpi is shutdown / standby?

fruitoftheloom
Posts: 25300
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: CEC

Tue Oct 07, 2014 8:32 pm

vibez wrote:Does anyone know the cec command to tell all connected devices that the rpi is shutdown / standby?
http://www.raspberrypi.org/forums/viewt ... 29&t=53481
The information is out there....you just have to let it in.

My other Linux machine is a ChromeBox

vibez
Posts: 27
Joined: Thu Aug 15, 2013 11:30 am

Re: CEC

Tue Oct 07, 2014 8:55 pm

Thanks but it's not listed there

fruitoftheloom
Posts: 25300
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: CEC

Tue Oct 07, 2014 10:09 pm

vibez wrote:Thanks but it's not listed there
http://www.raspberrypi.org/forums/searc ... ywords=cec
The information is out there....you just have to let it in.

My other Linux machine is a ChromeBox

vibez
Posts: 27
Joined: Thu Aug 15, 2013 11:30 am

Re: CEC

Tue Oct 07, 2014 10:21 pm

Sigh, i'm not sure you are adding anything here. I'm aware that you can search forums thanks

User avatar
DougieLawson
Posts: 40583
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: CEC

Tue Oct 07, 2014 10:30 pm

vibez wrote:Does anyone know the cec command to tell all connected devices that the rpi is shutdown / standby?
Once the RPi is halted how will it send any CEC command? Or are you looking for something that runs as part of boot/shutdown before the RPi reaches its halted state.

http://www.cec-o-matic.com/ says to send a 0x36 message to set everyone to standby. Or do you mean an "inactive source" 0x9D message?
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

vibez
Posts: 27
Joined: Thu Aug 15, 2013 11:30 am

Re: CEC

Tue Oct 07, 2014 10:58 pm

Hi,

It doesn't need to halt, it just needs to either send an inactive command or change the active source to another device.

This is my current bus information

Code: Select all

CEC bus information
===================
device #0: TV
address:       0.0.0.0
active source: no
vendor:        Panasonic
osd string:    TV
CEC version:   1.3a
power status:  on
language:      eng


device #4: Playback 1
address:       1.1.0.0
active source: no
vendor:        Panasonic
osd string:    CECTester
CEC version:   1.4
power status:  on
language:      eng


device #5: Audio
address:       1.0.0.0
active source: no
vendor:        Unknown
osd string:    HDCVT Main
CEC version:   1.4
power status:  on
language:      ???
this is what happens when I try to set the rpi as the active source

Code: Select all

pi@raspbmc:~$ echo "as" | cec-client -s
opening a connection to the CEC adapter...
DEBUG:   [              83]     unregistering all CEC clients
DEBUG:   [              84]     Broadcast (F): osd name set to 'Broadcast'
DEBUG:   [              85]     InitHostCEC - vchiq_initialise succeeded
DEBUG:   [              85]     InitHostCEC - vchi_initialise succeeded
DEBUG:   [              86]     InitHostCEC - vchi_connect succeeded
DEBUG:   [              87]     logical address changed to Broadcast (f)
DEBUG:   [              88]     RegisterLogicalAddress - registering address e
DEBUG:   [             269]     logical address changed to Playback 1 (4)
DEBUG:   [             270]     logical address changed to Free use (e)
DEBUG:   [             270]     Open - vc_cec initialised
NOTICE:  [             270]     connection opened
DEBUG:   [             271]     processor thread started
DEBUG:   [             271]     << Broadcast (F) -> TV (0): POLL
DEBUG:   [             272]     initiator 'Broadcast' is not supported by the CEC adapter. using 'Free use' instead
TRAFFIC: [             273]     << e0
DEBUG:   [             304]     >> POLL sent
DEBUG:   [             304]     TV (0): device status changed into 'present'
DEBUG:   [             304]     << requesting vendor ID of 'TV' (0)
TRAFFIC: [             304]     << e0:8c
TRAFFIC: [             516]     >> 0f:87:00:80:45
DEBUG:   [             517]     >> TV (0) -> Broadcast (F): device vendor id (87)
DEBUG:   [             517]     TV (0): vendor = Panasonic (008045)
DEBUG:   [             518]     expected response received (87: device vendor id)
DEBUG:   [             518]     replacing the command handler for device 'TV' (0)
NOTICE:  [             519]     registering new CEC client - v2.0.5
DEBUG:   [             519]     detecting logical address for type 'playback device'
DEBUG:   [             519]     trying logical address 'Playback 1'
DEBUG:   [             520]     << Playback 1 (4) -> Playback 1 (4): POLL
TRAFFIC: [             520]     << 44
DEBUG:   [             521]     UnregisterLogicalAddress - releasing previous logical address
DEBUG:   [             525]     logical address changed to Broadcast (f)
DEBUG:   [             526]     RegisterLogicalAddress - registering address 4
DEBUG:   [             797]     logical address changed to Free use (e)
DEBUG:   [             797]     logical address changed to Playback 1 (4)
TRAFFIC: [             797]     << 44
DEBUG:   [             797]     >> POLL not sent
DEBUG:   [             798]     using logical address 'Playback 1'
DEBUG:   [             798]     Playback 1 (4): device status changed into 'handled by libCEC'
DEBUG:   [             798]     Playback 1 (4): power status changed from 'unknown' to 'on'
DEBUG:   [             798]     Playback 1 (4): vendor = Pulse Eight (001582)
DEBUG:   [             798]     Playback 1 (4): CEC version 1.4
DEBUG:   [             798]     AllocateLogicalAddresses - device '0', type 'playback device', LA '4'
DEBUG:   [             798]     Playback 1 (4): osd name set to 'CECTester'
DEBUG:   [             798]     Playback 1 (4): menu language set to 'eng'
DEBUG:   [             800]     GetPhysicalAddress - physical address = 1100
DEBUG:   [             800]     AutodetectPhysicalAddress - autodetected physical address '1100'
DEBUG:   [             800]     Playback 1 (4): physical address changed from ffff to 1100
DEBUG:   [             801]     << Playback 1 (4) -> broadcast (F): physical adddress 1100
TRAFFIC: [             801]     << 4f:84:11:00:04
NOTICE:  [             953]     CEC client registered: libCEC version = 2.1.4, client version = 2.0.5, firmware version = 1, logical address(es) = Playback 1 (4) , physical address: 1.1.0.0, host: arm-bcm2708hardfp-linux-gnueabi, features: 'P8 USB' 'P8 USB detect' 'RPi', git revision: 81e3821, compiled on: Mon Dec 23 06:06:42 UTC 2013 by root@ on Linux 3.2.0-35-generic (x86_64)
DEBUG:   [             953]     Playback 1 (4): vendor = Panasonic (008045)
DEBUG:   [             953]     replacing the command handler for device 'Playback 1' (4)
DEBUG:   [             953]     << Playback 1 (4) -> TV (0): OSD name 'CECTester'
TRAFFIC: [             953]     << 40:47:43:45:43:54:65:73:74:65:72
DEBUG:   [            1254]     << requesting power status of 'TV' (0)
TRAFFIC: [            1254]     << 40:8f
TRAFFIC: [            1435]     >> 04:00:47:00
DEBUG:   [            1435]     >> TV (0) -> Playback 1 (4): feature abort ( 0)
DEBUG:   [            1435]     marking opcode 'set osd name' as unsupported feature for device 'TV'
TRAFFIC: [            1512]     >> 04:90:00
DEBUG:   [            1513]     >> TV (0) -> Playback 1 (4): report power status (90)
DEBUG:   [            1513]     TV (0): power status changed from 'unknown' to 'on'
DEBUG:   [            1513]     expected response received (90: report power status)
DEBUG:   [            1514]     making Playback 1 (4) the active source
NOTICE:  [            1514]     >> source activated: Playback 1 (4)
DEBUG:   [            1514]     sending active source message for 'Playback 1'
TRAFFIC: [            1515]     << 40:89:10:02:ff:ff:00:05:05:45:55:5c:58:32
NOTICE:  [            1875]     << powering on 'TV' (0)
TRAFFIC: [            1876]     << 40:04
NOTICE:  [            1966]     << Playback 1 (4) -> broadcast (F): active source (1100)
TRAFFIC: [            1967]     << 4f:82:11:00
TRAFFIC: [            2207]     >> 04:00:89:03
DEBUG:   [            2208]     >> TV (0) -> Playback 1 (4): feature abort ( 0)
DEBUG:   [            2209]     << Playback 1 (4) -> TV (0): menu state 'activated'
TRAFFIC: [            2209]     << 40:8e:00
TRAFFIC: [            2359]     >> 04:8c
DEBUG:   [            2360]     >> TV (0) -> Playback 1 (4): give device vendor id (8C)
DEBUG:   [            2360]     << Playback 1 (4) -> TV (0): vendor id Panasonic (8045)
TRAFFIC: [            2360]     << 4f:87:00:80:45
DEBUG:   [            2361]     unregistering all CEC clients
NOTICE:  [            2362]     unregistering client: libCEC version = 2.1.4, client version = 2.0.5, firmware version = 1, logical address(es) = Playback 1 (4) , physical address: 1.1.0.0, host: arm-bcm2708hardfp-linux-gnueabi, features: 'P8 USB' 'P8 USB detect' 'RPi', git revision: 81e3821, compiled on: Mon Dec 23 06:06:42 UTC 2013 by root@ on Linux 3.2.0-35-generic (x86_64)
DEBUG:   [            2511]     Playback 1 (4): power status changed from 'on' to 'unknown'
DEBUG:   [            2511]     Playback 1 (4): vendor = Unknown (000000)
DEBUG:   [            2511]     Playback 1 (4): CEC version unknown
DEBUG:   [            2511]     Playback 1 (4): osd name set to 'Playback 1'
DEBUG:   [            2511]     marking Playback 1 (4) as inactive source
DEBUG:   [            2512]     Playback 1 (4): device status changed into 'unknown'
DEBUG:   [            2512]     unregistering all CEC clients
WARNING: [            2781]     unhandled response received: opcode=87 initiator=4 destination=f response=0
TRAFFIC: [            2781]     >> 04:89:10:01:03
DEBUG:   [            2781]     >> TV (0) -> Playback 1 (4): vendor command (89)
WARNING: [            3143]     unhandled response received: opcode=89 initiator=4 destination=0 response=0
DEBUG:   [            3280]     UnregisterLogicalAddress - releasing previous logical address
DEBUG:   [            3281]     logical address changed to Broadcast (f)
Then if I scan the bus again, I see that nothing actually got set as the active source

Code: Select all

pi@raspbmc:~$ echo scan | cec-client -s -d 1
opening a connection to the CEC adapter...
requesting CEC bus information ...
CEC bus information
===================
device #0: TV
address:       0.0.0.0
active source: no
vendor:        Panasonic
osd string:    TV
CEC version:   1.3a
power status:  on
language:      eng


device #4: Playback 1
address:       1.1.0.0
active source: no
vendor:        Panasonic
osd string:    CECTester
CEC version:   1.4
power status:  on
language:      eng


device #5: Audio
address:       1.0.0.0
active source: no
vendor:        Unknown
osd string:    HDCVT Main
CEC version:   1.4
power status:  on
language:      ???

Return to “General discussion”