Skip to contentSkip to conversation

Controlling external GPIO in IVC-200G board

DISCUSSION Augusto Destrero 2 participants 2 messages Oct 12, 2011 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi there,
we recently purchased a IVC-200G board from IEI:

http://ieiworld.com/product_groups/industrial/content.aspx?gid=09049535992720993533&cid=09049577938864496628&id=08142301152930771045

we would like to use the external GPIO capabilities of such board on Linux. This external GPIO is used to control external devices, such as lights, gates, doors, ...
We already asked for support from the vendor, but they suggested us to use the Windows SDK :(, so we hope that some one in this list have some knowledge about the board and can help us.

We are using a quite recent version of Linux Kernel (2.6.35.11) and the bttv module is working correctly for what concerns video capturing.

Now we would like to control the external GPIO embedded in the IVC-200G board, but we don't know how to do it.
In the driver CD provided with the board we found a directory Linux, containing three subdirectories: Demo, Driver and Sdk:

The "Demo" directory contains a demo program which demonstrates how to capture video with the IVC-200G board, but doesn't help to understand how to control the external GPIO.

The "Driver" directory contains some very old _binary_ bttv drivers (specific for Red Hat 7.2, 7.3 and 8 versions), but this is not useful for our purpose.

The "Sdk" directory contains only a C header file (ieibt878.h, pasted here
http://pastebin.com/cjezwusy) and a text file sdk-howto (pasted here
http://pastebin.com/H66WzF1G).
The section 4 of sdk-howto explains something related to external GPIO, for example we can read "To set GPIO outputs, use structure iei_gpio and VIDIOC_IEI_SET_GPIO ioctl call", but it's not clear on which device (we mean which node in /dev directory) we should perform the ioctl call.

Can you help us in using the external GPIO in the IVC-200G board on Linux?

Thank you very much for your help!

Signature · 1 line
Augusto Destrero, PhD
#1 lore raw
Quoted 1 line · Augusto Destrero

Hi there,

Hi,

Quoted 2 lines

Now we would like to control the external GPIO embedded in the IVC-200G board, but we don't know how to do it.

bttv driver does not expose GPIOs to the userspace but I expect it can be modified to do so. Have a look at the GPIO_BT8XX driver to see how to do.

Beware that GPIO_BT8XX is thought to drive physically altered boards (hence not working as brand new product - read the help message of the driver) while the bttv one has to keep all the other functionalities, so you may have less GPIO to play with because some are wired to something on the board itself.

cheers,
Domenico