Heartbeat light sent to GPIO pin?

Post Reply
meglome
Posts: 81
Joined: Sun Jan 12, 2014 4:42 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Heartbeat light sent to GPIO pin?

Post by meglome »

What is the simplest way on boot to send the blue heartbeat light to one of the GPIO pins so that is can be shown on an external LED?

I'm interested in doing this on the C1+

Also can the same be done with the lights on the ethernet connector?

Thanks for your help.

mdrjr
Site Admin
Posts: 11796
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 1 time
Been thanked: 42 times
Contact:

Re: Heartbeat light sent to GPIO pin?

Post by mdrjr »

That's a good a question and there's no simple way..

You need to modify the device-tree-file for C1 and change the gpio used.

https://github.com/hardkernel/linux/blo ... .dts#L1006

I don't think that ethernet lights can be controlled that way :(

Jojo
Posts: 528
Joined: Mon May 18, 2015 12:13 am
languages_spoken: english, german
ODROIDs: C1, C1+, C2, HC1, HC2, VU8C
Location: Germany
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Heartbeat light sent to GPIO pin?

Post by Jojo »

Hi,

on the RPi, I used the tool "dtc" to modify the device tree. Usage was:

Code: Select all

dtc -I dtb -O dts -o /path/of/target-source-file.dts /path/of/binary-input-file.dtb
dtc -I dts -O dtb -o /path/of/target-binary-file.dtb /path/of/source-input-file.dts
The changes were applied after reboot, no re-compiling was needed.

Would this work on the ODROIDs as well? I have not tried yet...
How to ask questions the smart way:
http://www.catb.org/esr/faqs/smart-questions.html

User avatar
odroid
Site Admin
Posts: 38212
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2068 times
Been thanked: 1237 times
Contact:

Re: Heartbeat light sent to GPIO pin?

Post by odroid »

It should be possible.

1. Generate(decompile) a dts file from the stock dtb.

Code: Select all

sudo apt-get install device-tree-compiler
sudo -s
cd /media/boot
dtc -I dtb -O dts ./meson8b_odroidc.dtb > ./meson8b_odroidc.dts
2. Edit the generated dts file to change the heartbeat LED GPIO.
We tested with LED#1 on the 16x2 LCD IO-shield board (GPIOX_4).

3. Compile the dts to dtb and reboot the system.

Code: Select all

dtc -I dts -O dtb meson8b_odroidc.dts > meson8b_odroidc.dtb 
Don't forget the make a backup of stock stb file first just in case.

Jojo
Posts: 528
Joined: Mon May 18, 2015 12:13 am
languages_spoken: english, german
ODROIDs: C1, C1+, C2, HC1, HC2, VU8C
Location: Germany
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Heartbeat light sent to GPIO pin?

Post by Jojo »

@odroid

Yeap, that's what I meant :) . I will give it a shot when I am back home.
How to ask questions the smart way:
http://www.catb.org/esr/faqs/smart-questions.html

meglome
Posts: 81
Joined: Sun Jan 12, 2014 4:42 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Heartbeat light sent to GPIO pin?

Post by meglome »

Thanks everyone I'll give it a go. Though it's a bit over my skill level.

any thoughts on the doing the same on the ethernet leds?
Last edited by meglome on Fri Jul 22, 2016 8:38 pm, edited 1 time in total.

User avatar
odroid
Site Admin
Posts: 38212
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2068 times
Been thanked: 1237 times
Contact:

Re: Heartbeat light sent to GPIO pin?

Post by odroid »

There is no way to control the Ethernet LEDs.

meglome
Posts: 81
Joined: Sun Jan 12, 2014 4:42 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Heartbeat light sent to GPIO pin?

Post by meglome »

no problem thanks. Just a thought, the main thing is the heartbeat led.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 1 guest