Одна из причин, по которой я купил плату RIoT, заключалась в том, что она имеет разъем для камеры. Поэтому я заказал модуль CAM8000-D у Farnell (номер детали 2362812 ). На странице продукта Farnell не было ясно, идет ли он с 30-контактным кабелем FPC, но, к счастью, он поставляется вместе с ним:
CAM8000-U
Это 2-мегапиксельная (1600 × 1200) камера CMOS, установленная на плате адаптера с 30-контактным разъемом FPC для кабеля. Embest имеет Руководство по быстрому старту для модуля CAM8000-D на своем сайте Dropbox , но, к сожалению, в нем мало информации.
Поэтому я подключил камеру к плате, и с новой прошивкой Android SVN2591 (см. «Перепрошивка нового образа Android на RIoT Board ») у меня есть значок приложения камеры:
Но когда я захотел его использовать, изображения не было (только черный). Поэтому я попытался переключиться на другую камеру (переключение передней / задней камеры):
Но это не помогло: похоже, оно блокировало Android :-(.
After rebooting Android, it was even worse: if I want to access the camera, there is an error telling me “Can’t connect to the camera”. All what I can do is clicking OK and then the camera window closes :-(.
So what now? There must be something wrong with the camera at the physical layer maybe? And indeed, that 30pin FPC cable has conductive connectors only on one side of the cable:
With a multimeter I checked the traces from board to board. And then I realized: the camera board has been shipped with the wrong side of the cable connected to the board ?
Correct would be with the with the conductive leads down to the board:
So I fixed that, and have the boards connected with the correct side up (the one with the blue ribbon):
The boot log (see “Terminal Connection to the RIoT Board“) shows that the camera is detected:
Linux video capture interface: v2.00 ----ov2656_probe ----v4l2_int_device_register success ----Setting mclk to 24 MHz ----pidh= 0x26, pidl= 0x56
But using it from the application reports:
----Setting mclk to 24 MHz ----pidh= 0x26, pidl= 0x56 ----Setting mclk to 24 MHz ----pidh= 0x26, pidl= 0x56 ERROR: v4l2 capture: slave not found!
I got an Embest contact, and it was suggested to reflash the firmware again. And indeed after that the camera is working!!!!
?
What was wrong?
So after some more testing, it was clear what is happening: When I had the camera connected with the wrong cable orientation, I switched the front/back camera. As soon as this happens to a non-existing camera, it reports an error and quits. Unfortunately, it stores that wrong camera setting somewhere in the system, and I only can revert that with re-flashing the Android on the board. The good things is that I have done that now so many times that I can do this blindfolded ;-).
Summary
The CAM8000-D camera is a nice 2 mega-pixel camera for the RIoT board. The firmware shipped on the board does not support it out of the box, so a new firmware needs to be flashed first (SVN2591 or higher). But before using it, the cable orientation has to be carefully checked. And once connected, do not switch to another (front/back) camera if you do not have a second camera attached. If that happens, then the Android firmware SVN2591 gets screwed up, and you cannot switch back: only reflashing the firmware seems to help.
So now I have ordered the USB camera CAM8100-U (Farnell part number 2136552) to have both a front and back camera :-).
Happy Picturing ?