emily.holder
Posts: 4
Joined: Thu Jan 18, 2018 3:48 am

HELP!Can I use Raspberry Pi's HDMI port to transfer data?

Thu Jan 18, 2018 3:52 am

I want to use Raspberry Pi's HDMI port to transfer data, but I do not know what to do . So,does anyone know how to implement this function?
Thanks very much!

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 18553
Joined: Sat Jul 30, 2011 7:41 pm

Re: HELP!Can I use Raspberry Pi's HDMI port to transfer data?

Thu Jan 18, 2018 10:38 am

That would be an odd thing to do. I'm not actually sure it is possible to use it in that way.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

Radu79
Posts: 57
Joined: Thu Mar 17, 2016 6:49 pm

Re: HELP!Can I use Raspberry Pi's HDMI port to transfer data?

Thu Jan 18, 2018 10:46 am

it can be done, HDMI ports have an I2C line. Someone has done it on the Pi too: viewtopic.php?t=44445&p=452512

PiGraham
Posts: 2883
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: HELP!Can I use Raspberry Pi's HDMI port to transfer data?

Thu Jan 18, 2018 11:01 am

What data do you want to transfer? Why do you want to use HDMI to send it?
Simple control messages an be sent via CEC, usually selecting channels, adjusting volume and so on. I think HDMI 1.4 includes an Ethernet channel but according to this topic Raspberry Pi doesn't support it.
It might work for other devices though and you may be able to find a splitter/injector that allows access to the Ethernet wires in the HDMI cable.

If you have an HDMI capture device that can grab an image from HDMI you can encode any data into a display format and decode it at the other end. It's doubtful that would be worth doing though and RasPi can't receive HDMI. Some USB3 adaptors can capture it on a fast PC.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4829
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: HELP!Can I use Raspberry Pi's HDMI port to transfer data?

Thu Jan 18, 2018 11:07 am

If just wanting the I2C interface, then adding "dtparam=i2c2_iknowwhatimdoing=on" to /boot/config.txt should do it for you, but as noted in the commit that added this
The third I2C bus (I2C2) is normally reserved for HDMI use. Careless
use of this bus can break an attached display - use with caution.

It is recommended to disable accesses by VideoCore by setting
hdmi_ignore_edid=1 or hdmi_edid_file=1 in config.txt.
Alternatively if you use the vc4-kms-v3d driver (use raspi-config to enable the full OpenGL driver) then it will also expose i2c2 safely.

You're not going to get a huge data rate off an I2C bus, and there is no simple way to use the HDMI data lanes for generic data transfer.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

emily.holder
Posts: 4
Joined: Thu Jan 18, 2018 3:48 am

Re: HELP!Can I use Raspberry Pi's HDMI port to transfer data?

Thu Jan 18, 2018 11:58 am

Radu79 wrote:
Thu Jan 18, 2018 10:46 am
it can be done, HDMI ports have an I2C line. Someone has done it on the Pi too: viewtopic.php?t=44445&p=452512
OK,thank you !I'll see you give this method.

emily.holder
Posts: 4
Joined: Thu Jan 18, 2018 3:48 am

Re: HELP!Can I use Raspberry Pi's HDMI port to transfer data?

Thu Jan 18, 2018 12:17 pm

6by9 wrote:
Thu Jan 18, 2018 11:07 am
If just wanting the I2C interface, then adding "dtparam=i2c2_iknowwhatimdoing=on" to /boot/config.txt should do it for you, but as noted in the commit that added this
The third I2C bus (I2C2) is normally reserved for HDMI use. Careless
use of this bus can break an attached display - use with caution.

It is recommended to disable accesses by VideoCore by setting
hdmi_ignore_edid=1 or hdmi_edid_file=1 in config.txt.
Alternatively if you use the vc4-kms-v3d driver (use raspi-config to enable the full OpenGL driver) then it will also expose i2c2 safely.

You're not going to get a huge data rate off an I2C bus, and there is no simple way to use the HDMI data lanes for generic data transfer.
Thank you very much, you said very clearly.I went to try this method you said, there are problems you can ask you?

Thank you !

emily.holder

emily.holder
Posts: 4
Joined: Thu Jan 18, 2018 3:48 am

Re: HELP!Can I use Raspberry Pi's HDMI port to transfer data?

Thu Jan 18, 2018 12:25 pm

Radu79 wrote:
Thu Jan 18, 2018 10:46 am
it can be done, HDMI ports have an I2C line. Someone has done it on the Pi too: viewtopic.php?t=44445&p=452512
Can I use this method to transmit the data collected by the camera?

Thank you !

emily.holder

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 18553
Joined: Sat Jul 30, 2011 7:41 pm

Re: HELP!Can I use Raspberry Pi's HDMI port to transfer data?

Thu Jan 18, 2018 12:59 pm

What sort of data? Image data, no. The I2C is too slow unless the images are tiny. Statistics could be sent, but why use the HDMI? There are two other I2C ports, a UART, or you could use a USB serial device.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

PiGraham
Posts: 2883
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: HELP!Can I use Raspberry Pi's HDMI port to transfer data?

Thu Jan 18, 2018 1:02 pm

emily.holder wrote:
Thu Jan 18, 2018 12:25 pm
Radu79 wrote:
Thu Jan 18, 2018 10:46 am
it can be done, HDMI ports have an I2C line. Someone has done it on the Pi too: viewtopic.php?t=44445&p=452512
Can I use this method to transmit the data collected by the camera?

Thank you !

emily.holder
You really need to say what you want to achieve to get useful answers.
You want to sand camera images? Still images or live video? At what resolution and frame rate?
You can certainly send camera data to HDMI and get a live preview on a TV or monitor. If you connect the HDMI to a capture device on a PC you can maybe do something else with it.

In general you are probably best off taking the H264 data stream from the camera / GPU and transmitting that over Ethernet or WiFi or writing it to SD card or USB storage. That's the normal thing. If it doesn't suit you then please tell us why not.

You can send any data you like over i2c, but it's slow and can't keep up with live video from the camera unless you use a very low resolution.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4829
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: HELP!Can I use Raspberry Pi's HDMI port to transfer data?

Thu Jan 18, 2018 1:13 pm

Radu79 wrote:
Thu Jan 18, 2018 10:46 am
it can be done, HDMI ports have an I2C line. Someone has done it on the Pi too: viewtopic.php?t=44445&p=452512
BTW I'd ignore most of that post - it's out of date as all that configuration is now handled by device tree, hence the dtparam lines.
Last edited by 6by9 on Thu Jan 18, 2018 1:52 pm, edited 1 time in total.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Heater
Posts: 8634
Joined: Tue Jul 17, 2012 3:02 pm

Re: HELP!Can I use Raspberry Pi's HDMI port to transfer data?

Thu Jan 18, 2018 1:25 pm

Of course you can send data out of a Pi at huge data rates using HDMI. That is what it is for, getting data to your monitor.

At it's simplest all you have to do at the Pi end is write data into the screen buffer device. And boom it ends up on the screen!

Try:

$ sudo cat /dev/urandom /dev/fb0

(Or whatever the frame buffer number is)

You should see a lot of nice random "snow" on the screen.

Now, actually connecting that HDMI to something other than a screen and making use of it is a bit more tricky.

One approach is to use an FPGA to capture the HDMI. The you can do whatever you like with the data stream.

For example: https://github.com/timvideos/HDMI2USB

All it needs is to buy an FPGA board to use it on. Like so: https://store.digilentinc.com/atlys-spa ... exys-video

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 9995
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: HELP!Can I use Raspberry Pi's HDMI port to transfer data?

Thu Jan 18, 2018 2:40 pm

Data gathered with the RPI camera is normally sent out to other devices using a data channel, such as Ethernet or USB.
HDMI is normally ONLY used to display video data.

Return to “General discussion”

Who is online

Users browsing this forum: Google [Bot], klricks and 32 guests