On USB projectors, linux and libam7xxx
I was looking into compact/mini/pico/handheld projectors, and I obviously wanted something I could use under GNU/linux, there were basically two choices:
- Pick up a projector with VGA/HDMI: Operating System independent.
- Pick up a USB projector: shipped only with drivers for MS Windows (and sometimes for MacOSX too).
Since the first choice was more expensive and I verified that writing a driver for the second case wasn't too hard, I picked up an Acer C110, I paid it about 160 €, but you can find it even cheaper somewhere else, grr.
AM7X or AM7XXX
The C110 is based on an Actions Micro AM7212P IC and uses USB bulk transfers with a simple packet based protocol on top to exchange data and commands to and from a host system and the AM7XXX chip.
Other projectors using the same protocol are:
- Acer Series C pico projectors (C20 C110 C112
C120) - Philips/SagemCom PicoPix projectors (PPX 1020, PPX 1230, PPX 1430, PPX 1630)
- CEL-TEC MP-01
- Other unbranded projectors
These projectors use the USB Vendor and Product IDs 1de1:1101
in mass storage mode and 1de1:c101
in display mode.
Some DPFs too (from Hannspree for instance) are known to use these chips but I don't know yet if they can be put in USB display mode.
I will refer to these devices as either AM7X or AM7XXX devices.
Open Source driver for AM7XXX devices
Reto Schneider and I are reverse engineering the USB protocol used by these devices, using USB dumps and disassembling the Windows device driver, and a basic but already usable library to communicate with those AM7x based projectors can be found in libam7xxx. Reto was the first to start working on that, in the form of acerc11xdrv.
So you can now get these projectors to work wherever libusb-1.0 works, that means you can use them with your phone if it can run GNU/Linux for instance, or even Android/Linux but I don't have an Android device to verify that.
For now all the communication about the development is happening on the #am7xxx
IRC Channel on the Freenode Network, come find us, and let us know if you want to help: like hosting a mailing list for us, or sponsoring some hardware (USB projectors you want to use freely or devices you want to use these projectors with).
Side note: the user manuals of these devices sometimes refer to the functionality of displaying images over USB as Display over USB
(or DoUSB), this definition is used on a lot of projectors but I don't know if it refers always to the same protocol/mechanism to send images over USB.
Linux running ON other projectors
Incidentally, when I was doing my pre-purchase market research, I ran into several projectors which —unsurprisingly— are running a Linux system themselves (linux kernel, busybox, etc.), here is a summary of what I found out:
Samsung SP-H03 (not based on AM7X): the firmware image can be downloaded here, and Samsung is providing the source code for the Free Software used in it, you can find it on opensource.samsung.com (AFAIR Harald Welte gave them some directions about GPL compliance, right?).
This could be an interesting device if you want to run your own code on a projector.
Acer K330: based on a chip of the same am7x family as the C110.
The firmware image is available for download and it does contain the Linux kernel and other Open Source software, but the source code is not available, neither Linux or the GPL are mentioned in the downloadable documentation; I am going to do more research on this later to see if Acer is in compliance with the GPL.
Open Projectors?
Having the ability of processing an image before projecting it —either on an external system, or on the projector itself— opens up to a lot of possibilities, and I can foresee an increase of AR applications using projectors; so, do you think there is enough interest for an Open Projectors project? A place where we can share the techniques (keystone correction, or some more sophisticate anamorphic transformations by the means of a Camera-Projector system) and the Open Source software implementing them, all in a single place.
Get in touch if you have any ideas about that.
Comments
Hello , I Have C120. will
Hello ,
I Have C120. will this source work for C120 as well? if not then please let me know what changes i should be doing in the source.
thanks
Dhanraj Rajput
Hi Dhanraj, the library
Hi Dhanraj, the library should work with the C120 as well.
Contact me by email, or join the #am7xxx IRC channel on Freenode for more details.
Ciao, Antonio
Acer C120 has Product ID
Acer C120 has Product ID
0xc102
.How to compile? I try to
How to compile?
I try to compile the current version at my kubuntu 10.04 LST. I guess I have to use cmake for this, right?
The development libraries for usb userspace applications are installed
Any hint?
Thanks
Hi Michael, this is how you
Hi Michael,
this is how you compile the code:
Ciao,
Antonio
Hello it's possible to use
Hello it's possible to use libam7xxx library on Windows platform? I am currently testing this library with a C120 acer projector but libusb give me following errors
can you help me please
Hi Giuseppe, libam7xxx and
Hi Giuseppe,
libam7xxx and picoproj work on Windows, yes, info are in the README and HACKING documents.
But the problem in your case is that C120 is not supported (and cannot be) by libam7xx because it uses a different protocol to communicate with the host system.
If you want I can put you in contact with other owners of C120 if you guys want to reverse engineer the protocol yourselves. Join the #am7xxx IRC channel or write me privately.
Alternatively, if you really need an open source driver for C120, you could donate a C120 to me and I'll try to do that :)
Ciao, Antonio
Hi Antonio, many thanks for
Hi Antonio,
many thanks for your prompt reply! Unfortunately I have supposed that C120 product was compatible with libam7xxx library.
For now I think I will just use regular projector drivers, because I am not able to do reverse enginering of protocol. Anyway many compliments for your great job!
Ciao, Giuseppe
There is one more
There is one more error:
It is the current kubuntu version 12.04. It comes with
ffmpeg 0.8.1. I can compile the current ffmpeg version 0.11.1, but will this solve the problem?
Thanks
Michael, I'll try to figure
Michael, I'll try to figure out what the minimum required version is and that highlight that in the documentation.
I really want to avoid adding compatibility code for older ffmpeg/libav versions.
Thanks, Antonio
Moin, no problem, I installed
Moin,
no problem, I installed the current ffmpeg-version to
/usr/local
. But now I run into an other problem: Linking the play binary fails:The debian packages
liblz-dev
andliblz1-dev
are installed. Anyhow: I can not find the "-lz" switch in the makefile. Any hint?Hi Michael, about passing
Hi Michael,
about passing options to the compiler you can do something like:
Or alternatively you can disable things when compiling ffmpeg/libav.
And be sure that cmake picks up ffmpeg headers from
/usr/local/include
, as a general rule you should compile using the headers of the same version of the library you are going to link the binary to.Another choice you can explore is to find an Ubuntu PPA which provides a newer ffmpeg/libav version already packaged.
Moin, thanks for your work
Moin,
thanks for your work and all the help you gave me here. I maneged it to compile the source. It's running fine now! Now I'm going to compile the application on my other machines. Maybe writing some scripts to start it automaticly by plugging the USB connector in or so ;-)
CU
Hi, I have just managed to
Hi,
I have just managed to build picoproj under Xubuntu 12.04.
If it helps anyone I've written a rough log of my attempt at
http://roliopolio.weebly.com/acerc110.html
I haven't managed to build am7xxx-play yet because I'll probably need to write an xcb.pc.
So, thanks to ao2 and other shoulders for this library; I now have a nice 50 lumen projector for €50 off Ebay.
Next, I'll need a way to make it display my laptop screen, possibly in reverse as a back projector.
rp
@rp, try installing
@rp, try installing
libx11-xcb-dev
, note that XCB is optional anyways.BTW, join the IRC channel if you need more help with compiling the example programs.
Hi, is there any possibility
Hi,
is there any possibility to pass a device id to am7xxx-play?
I own two C112 projectors from Acer and want to display
different images on each of them
Konstantin
Hi Konstantin, the library
Hi Konstantin,
the library has support for multiple devices, but the functionality is not exposed in the example programs because it has not been tested (none of us has more than one projector).
Join the IRC channel and I'll give you an experimental patch to test. Please try to hang out for a while in the channel, we may be slow to answer :)
hi guys ein kleines howto
hi guys
ein kleines howto findet ihr auf ubuntuusers.de
http://wiki.ubuntuusers.de/Baustelleamer_Acer_C110
viel erfolg und spass beim schaun.
lg ralf
Hi, on my mk802 armhf i am
Hi, on my mk802 armhf i am trying to build like this:
witch to me looks ok, but when i try to access the files, it acts as if nothing is there.
i am a complete noob to linux so i am probably missing the obvious.
Could someone tell me what i do wrong ?(ps, i am installing it on a wheezy headless debian version through ssh)
Hi Paul, in order to execute
Hi Paul,
in order to execute programs in the current working directory you have to use the
./
prefix, so the command will be./picoproj -h
.The prefix is not necessary for programs in one of the directories listed in the
PATH
environmental variable. You can look up on the web for more details on that.Of course feel free to keep asking libam7xxx specific questions.
Ciao, Antonio
Tnx a lot, that did the trick
Tnx a lot, that did the trick :)
a quick followup
a quick followup question.
The device that i would like to use my picobeamer with, does not use a normal videocard.
I installed xfce, but it gives me an error about not having found a screen.
I would like it to use the picobeamer as primary (and only) screen.
Happen to know of a guide that can help me achieve this, or got any tips?
If the device has a
If the device has a framebuffer interface (
/dev/fb0
) then you can easily use am7xxx-play with a command line like./am7xxx-play -f fbdev -i /dev/fb0
.If you want to run Xfce, Xorg could use this interface too with its own fbdev driver IIRC; once you got Xorg running you can use am7xxx-play with the x11grab format instead, look at the help or at the man page.
If not even a framebuffer interface is available then you could try with the Virtual Frame Buffer (vfb) kernel driver or with the xf86-video-dummy driver for Xorg.
Any news regarding
Any news regarding C120?
Sincerely,
Hi Jonas, The Acer C120
Hi Jonas,
The Acer C120 supports a different protocol to send images to the projector via USB, it won't be supported by libam7xxx.
If I had one of those I could write a linux driver for it, but I do not plan on getting one by myself.
Regards, Antonio
Hi I want to ask for help. I
Hi I want to ask for help. I can't make the driver. When I try to compile I get the message:
CMake Error at examples/CMakeLists.txt:27 (message):
Function avformat_open_input missing. Please use a newer FFmpeg release.
I've been trying to use various ffmpeg versions but without any success. Could you advise me in what can be the trouble?
Hi, the check works here with
Hi, the check works here with either libav 0.8.7 or 9.6.
As a workaround you can try try removing these lines from
examples/CMakeLists.txt
:Let me know if that works.
The cause may be the way ffmepg/libav is packaged on your distribution, I don't know for sure.
Ciao, Antonio
Hey Antonio, We tried
Hey Antonio,
We tried installing the libam as per your instructions including commenting out the check for ffmpeg as it was creating a similar issue to the one mentioned by the anonymous user. While running make, we are now getting the following error.
Linking C executable ../bin/am7xxx-play
/usr/bin/ld: /usr/local/lib/libavformat.a(udp.o): undefined reference to symbol 'pthread_create@@GLIBC_2.1'
//lib/i386-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [bin/am7xxx-play] Error 1
make[1]: *** [examples/CMakeFiles/am7xxx-play.dir/all] Error 2
make: *** [all] Error 2
Any workaround for this? Awaiting your reply.
Hi Darshan, I need to see
Hi Darshan,
I need to see the full compilation command, it gets printed with
make VERBOSE=1
.BTW building libam7xxx works fine here even with libav11, what system are you using?
For a more interactive conversation feel free to contact me on the #am7xxx IRC channel on Freenode.
Ciao, Antonio
Hi Antonio! Thanks for the
Hi Antonio!
Thanks for the help, but the problem eventually decided a little differently. I think I need somewhere to specify what is necessary to put the library, so people do not make the same mistakes. I have things working after I performed the following:
and this patch
http://git.ao2.it/libam7xxx.git/blob_plain/refs/heads/debian:/debian/pat...
I am not sure libav-tools is
I am not sure
libav-tools
is strictly needed; about the other dependencies, they are listed inHACKING.asciidoc
already.And now I've also added a mention about the patch needed for older libav versions, thanks!
Ciao, Antonio
asus eee, lubuntu
asus eee, lubuntu 14.10 libavdevice-dev, libswscale-dev, libav-tools were missing (the other 2 were already installed) and after installing them the error
will no longer occur. Thanks.
Thanks for the comment
Thanks for the comment Mirek.
JFTR, Ubuntu 14.10 has libam7xxx packages in the official repositories.
However there are some new fixes in the git repository, so people might still want to compile it from there.
Ciao, Antonio
Glad to hear you figured it
Glad to hear you figured it out. I'm curious what methods you used to decompile the Windows software/usb traffic?
I was trying to set up a Tronsmart Mirror2TV (also an ActionsMicro device), I wonder if you have tried this device, it might be doing the same protocol, except over network instead of usb? It's supposed to be uPnP/dlna, but before sending a file it's sending some binary jibberish, then the media file, over the network using a couple tcp sockets.
I used IDA to disassemble and
I used IDA to disassemble and navigate the code (bokken or objdump can be used too) and some vim+gcc scripting to get to the correspondent C code (I'll write about this approach sooner or later).
About the USB data: I captured it with usbmon+tcpdump and analyzed it in wireshark.
The device you mention seems to use Miracast, it's unlikely it uses the same protocol as in am7xxx projectors.
You can take a look at OpenWFD and see if it works with it.
Ciao, Antonio
Hello, great work! PPX 2230
Hello, great work!
PPX 2230 works?
Cheers.
Hi, the PPX 2330 is
Hi,
the PPX 2330 is supported, I don't know how different it is from the 2230.
Can you please provide the USB ids of the PPX 2230 in Display mode?
Join the #am7xxx IRC channel on Freenode or send me an email if you need directions about how to get the USB ids.
Ciao, Antonio
Hello, The PPX 2230 don't
Hello,
The PPX 2230 don't have Display Mode :(
Any hack possibility?
Cheers.
Maybe, I need more details,
Maybe, I need more details, join the IRC channel or write me an email so I can give you directions on how to know more about the device.
Ciao, Antonio
The driver works fine with my
The driver works fine with my random-brand projector.
Thank you very much, Antonio. For the driver and the help in IRC.
C.
PS: i'll blog soon about it in my site (in spanish).
Ciao, Antonio: I recently
Ciao, Antonio:
I recently upgraded from UbubuntuStudio 14.04 trusty (LTS) to UbuntuStudio 14.10 utopic. I was very pleased that the new version had libam7xxx. The problem is that when I try to run the program, it recognizes the projector but does not display anything at all:
What it is happening?
I don't know nothing about computers, etc., but if it worked when I was on UbuntuStudio 12.04 (not tried on 14.04) I can not figure out what I am doing wrong.
Thank you and sorry if I am asking nonsenses.
Hi Quico, ideally it should
Hi Quico,
ideally it should just work, maybe we are hitting some differences between Ubuntu and Debian that I am not aware of.
It looks like a problem of permissions, the libam7xxx0.1 package installs some udev rules to make the device accessible to users in the
plugdev
group.So, check if your user is in the
plugdev
group with thegroups
command.For the time being you should be able to use the projector by running the command as root using
sudo
(i.e.$ sudo am7xxx-play -f x11grab -i :0
).Let me know about the groups thing.
Ciao, Antonio
Thank you, Antonio: For your
Thank you, Antonio:
For your quick and clear response. When I type "groups", I guess that my user is recognized as being in the plugdev group but (due to my ignorance, again) I am not sure and I don't understand what the terminal is trying to tell:
When I try to make the projector run as superuser, the problem remains:
Am I right and this is not the problem?, or Should I try to make my user to get another permission status?.
Thank you again: Quico.
Hmm, permissions look OK
Hmm, permissions look OK indeed and even if they weren't it should have worked with sudo anyway, it could be some USB issue.
We should look at the libam7xxx debug output, unfortunately in order to enable it a recompilation is needed, if you are willing to do it come find me in the #am7xxx IRC channel on Freenode, ore send me an email.
Ciao, Antonio
Thank you, Antonio: I'll look
Thank you, Antonio:
I'll look forward on how to do that compilation and will send you an email in few days.
Grazie, ciao:
Quico.
Hi all, Ihave some problem
Hi all,
Ihave some problem to add the PPA: http://git.ao2.it/libam7xxx.git to the mint repository. When I try to do it next message comes:
No se puede agregar el PPA: 'No JSON object could be decoded'
Can you please help?
Anto
Hi that address is of a git
Hi that address is of a git repository, not a Debian packages repository, it won't work with apt.
I do not provide packages for Ubuntu, but I know that libam7xxx is available from Ubuntu 14.10 on.
Ciao, Antonio
Hi, 1st: Great job! 2nd: I've
Hi,
1st: Great job!
2nd: I've tried every possible solution for this and all packages were built without any errors which leaves one question... is my picopix 3610 am7xxx compatible.. I've google it and no response!
-lsusb says it's an HTC chipset and therefore I'd like to know if these are compatible with libam7xxx? do you know?
-when I throw am7xxx it says it can't open device 11... what does it mean?
what should I do?
thx
Hi Filipe the PicoPix 3610 is
Hi Filipe the PicoPix 3610 is currently not supported by libam7xxx so that's why you get the error. However I am not sure if it will ever be supported.
By quickly looking at its firmware (you can use
rkunpack
from rkflashtool) I see that it is one of the Android/Linux based projectors, I have never worked with these so I don't know if they use the same USB protocol.If you could provide a dump of the USB communication under Windows I will take a look at what the protocol looks like.
Also send me via email the output of
lsusb
andlsusb -vvv -d xxxx:yyyy
for the device.Ciao, Antonio
P.S. awesome dog in your picture, is it an Amstaff?
Firstly, I am simply using my
Firstly,
I am simply using my imagination to understand what is going on here. I was searching for drivers to access my (stupid) Pico projector on my linux. This projector was bought during the year 2011 and is a FAVI E1-LED PICO. After coming across this website found out that you guys are doing more than possible of just connecting to the internal memory of a projector via the USB. If I am not wrong can you kindly tell me if the FAVI model aforementioned uses the AM7XX chipset? Sorry I am not being lazy here but tried finding that out myself without any luck (or brain maybe). Can someone wake me up?
Regards,
#0K
Post new comment