News:

Registered a URL and setup a forum as the IPCam stuff really needed its own site vs my irregular blog posts about IPCam hacking at http://www.computersolutions.cn/blog

Author Topic: Progress status  (Read 10991 times)

  • No avatar
  • *****
February 26, 2011, 06:54:45 pm
Thought I'd update on progress so far.

My own Kernel with JFFS2, USBDEV, Loadable Module support - done.
Drivers for common hardware - onboard ethernet; audio; uart; - built into kernel

Drivers for hardware that differs dependent on board (i.e. usb wifi, camera) will be loaded as .ko modules.
 
wifi -  rt73, vt6656, zydas (rt73 currently in use on my dev hardware)
webcam - spca5xx, gspca, pwc (spca5xx currently in use on my dev hardware)
some .ko compiled, but untested due to lack of hardware.

Userland binaries.

FTP, Telnet, Opkg, Video4Linux tools + capture, webserver - done.


Still to be completed:

Package Management setup with opkg files on this server so can add modules and additional binaries on the fly.

System to tie the userland binaries together.  Plan on using shell script called through mathopd cgi for initial testing.

PTZ functionality (mostly done, just need to test / read values to see what to pump into the gpio ports for movement).

Motion detection.

---


Priority for me is opkg and tying it together with some scripts to add/remove features, so that I can build on that.

Once I have that done, I'll be in a better position to know how I'll implement cgi within the browser, as the next thing we have to do is replicate existing functionality so that we can be backwards compatible - is this a requirement for people?

Motion detection is last on the list for me.

PTZ will be done fairly soon, its a matter of watching what values I need to put in the gpio ports identified and making a few small executables to perform each movement.

Essentially we're at a point where pretty much all the pieces we need are implemented or mostly implemented, so now its going to be a matter of putting them together.

I guess I should release some of the work I've done so people can start to play.

Lawrence.


February 26, 2011, 09:04:56 pm
Amazing progress again, in such short time!

How have you managed getting the webcam module working? Is it the 2.6 one backported? Or a re-write or something NDA'ed from the 2.4 tree that foscam supplies?

Same question goes for any other previously binary only drivers?

Btw, does 2.4 have the builtin webserver and would that be feasable at all, or was that 2.6 only? (Is it even smaller then mathopd at all?

As for a build system, I know openwrt has a really awesome build system, but probably better would be openbricks, which I think is openwrt on steroids :) Technically aren't that very different, openwrt is mostly based on Makefiles whereas openbricks on shellscripts.

February 27, 2011, 01:08:26 am
Very interesting! (just a way to tell you i read every post you made :P)

  • No avatar
  • *****
February 27, 2011, 03:50:21 am
@Oliver -
Foscam doesn't make any camera's.
The camera's are made by another company for them.

That factory also makes other pretty much identical camera's with the same hardware that have different names.

I don't have anything from the factory with regards to source code (I have been given the odd spec document though).

What I've done so far is look at the hardware and existing software, note that its all based on the Nuvoton / Winbond N745 Board Support Package (BSP), and work from there.

Finding the first BSP up on the metavert.com site was probably the most useful thing so far.  Without the BSP and the data sheets inside the BSP, I wouldn't have gotten anywhere.

Adding drivers etc is a matter of compiling or backporting for the kernel we use.
I have put some of the wifi drivers sources in the files section of this site.

http://www.openipcam.com/files/uCLinux/drivers/

While I have, and do chat to the people who are making the hardware on occasion, I'm not getting any assistance that I would consider helpful from them.  They're a bit confused why I'm doing it really.
Assistance I've had usually goes something like -
Me: How do you talk to the ptz? gpio? or i2c?
Them: gpio. 

Thats about as much information as I get typically.

What I have found helpful is the MCUOS forums  http://www.mcuos.com (Chinese only), as well as lots and lots of googling, and comments from posts at similar places -like the Irish Jesus blog http://irishjesus.wordpress.com/2010/03/30/hacking-the-foscam-fi8908w/  when its not blocked here, and some of the earlier stuff on the French blogs http://forum.hardware.fr/hfr/HardwarePeripheriques/Webcam/fi8918w-visioncam-camhed02ipw-sujet_50586_1.htm


Useful stuff like
http://hi.baidu.com/kkernel/blog/item/ff919681141beddebc3e1e23.html
and
http://bbs.21ic.com/icview-181873-1-1.html / http://mcuos.com/archiver/tid-1151.html
and

http://dangerousprototypes.com/forum/viewtopic.php?f=4&t=1197

You'll note on the second page cough, "someone", cough cough, tells you how to do the cam drivers  ;).

Plus some chatting to people who've been following my blog posts and added me on Skype.
ontheownz, Eric Pine etc have been useful for motivation or bits when I've been stuck.
Plus the swedish contingent like Sven Halling who added incentives for this.

...and of course the 3 or 4 posters on this site who give feedback, just so I know that I'm not talking to myself  8)

May 07, 2011, 08:49:31 am
Hello, Lawrence.
Quote
My own Kernel with JFFS2, USBDEV, Loadable Module support - done.
Drivers for common hardware - onboard ethernet; audio; uart; - built into kernel


So where can I get that magic firmware on that site? Or could You send me Your .config from N745 folder and I can load it and compile on my machine.

Regards, Igor!
« Last Edit: May 07, 2011, 11:04:08 am by moldov »

  • No avatar
  • *****
May 10, 2011, 08:49:15 am
I'm uploading my dev stuff to the files folder here - http://www.openipcam.com/files/OpenIPCAM_Kernel_Source_plus_User_Files_April_2011/
It should be uploaded  in about an hour.  Its a bit messy, but should be a good starter.

I'll need to knock up some instructions on folders etc.  Currently setting up a VM for this, and will upload that once done.
So people who want to develop can download the VM, open in VMWare, and run.

I'll setup a git repo with these files also (once I get the default VM going).
Then we can base off this or Olivers.

My Config is attached.
Note that I do dubious things to the MakeFile in the user folder (laziness abounds), so be warned ;)
This doesn't compile the JFFS (but I have it working).

Once I get a VM going I'll neaten this up a bit.






May 10, 2011, 07:24:29 pm
Lawrence,

thanks a lot I'll download all the tools and play with:) I'm waitng for OpenCam (like OpenWRT) project when I can assemble my own kernel with following drivers and tools. It would be a really usefull stuff.
Seems that I got to donate something:) I found the donation button:)!!!!
If You need some help from me, just ask. There should be a great project!

  • No avatar
  • *****
May 12, 2011, 09:41:17 pm
Thank you for the donation!

Ideally I want to use opkg for adding features over our base Kernel.

Its all setup and compiled, I just need to put it together on the site, I've been a bit lazy on that but getting back into it again.

May 15, 2011, 12:16:28 am
Quote
Ideally I want to use opkg for adding features over our base Kernel.

Its all setup and compiled, I just need to put it together on the site, I've been a bit lazy on that but getting back into it again.

Sure, it would be great. I tried to compile the sources which You provide to me, but out of luck. Lots of errors:(
So I'll be waiting for opkg or whole Virtual Machine to play.

Thanks again, Igor!

  • *****
May 21, 2011, 11:14:56 pm
Lawrence,

re:
Quote
Foscam doesn't make any camera's.
The camera's are made by another company for them.

That factory also makes other pretty much identical camera's with the same hardware that have different names.

What is that company's identity? Do they have a web presence?

  • *****
May 31, 2011, 01:16:51 pm
...I tried to compile the sources which You provide to me, but out of luck. Lots of errors:(
...

Ditto - the problem is that the zip file corrupted all of the symbolic links.

Lawrence - did you use the "-y" zip option?

June 04, 2011, 08:32:22 am
Lawrence,


Could You put the compiled kernel for my hardware on the server.

I have the following hardware in my Foscam clone:

WiFi  - VT6656 VNT6656G6A40
SDRAM 8MB - Hynix 943F HY57V641620FTP-7
FLASH 4MB - Winbond W19B320BBT7H

The camera driver I think is this one:
new USB device :807b5004-7e8740
hub.c: new USB device 1, assigned address 2
detect_sensor: mi360
dvm cmos successfully initialized
dvm camera registered as video0

I cannot compile the sources provided by You. The romimg.bin is OK.
I couldn't configure the proper kernel with JFFS and all the drivers.
I started menuconfig but it has stuck.

moldov@moldov-VirtualBox:/home/NUVO/uClinux-dist$ make menuconfig
config/mkconfig > config.in
make -C /home/NUVO/uClinux-dist/config/scripts/lxdialog all
make[1]: Entering directory `/home/NUVO/uClinux-dist/config/scripts/lxdialog'
make[1]: Leaving directory `/home/NUVO/uClinux-dist/config/scripts/lxdialog'
Using defaults found in .config
Preparing scripts: functions, parsing..done.


Thanks and regards, Igor

  • No avatar
  • *****
June 04, 2011, 01:45:44 pm
I think i screwed up the links in the zip, you're right.

However, if you unzip the bsp, install the command line tools from that over the zip, should be able to compile.
Will test that in a second or two.

I need to get my own dev environment setup again (then migrate that to git),  so I can be where I was in February.

At the moment I've been working on movement - looks like thats almost done though (famous last words!)

  • No avatar
  • *****
June 04, 2011, 03:31:13 pm
Fixing my zip file (as I'm a dufus)

As I didn't zip it including the filesystem links we need to re-add them

Here is a list of the links in the default BSP

lrwxrwxrwx 1 root root    78 Jun  5 09:56 config.arch -> vendors/Winbond/W90N745/config.arch
lrwxrwxrwx 1 root root    84 Jun  5 09:54 asm -> ../../linux-2.4.x/include/asm-armnommu
lrwxrwxrwx 1 root root    70 Jun  5 09:54 linux -> ../../linux-2.4.x/include/linux
lrwxrwxrwx 1 root root    68 Jun  5 09:54 scsi -> ../../linux-2.4.x/include/scsi
lrwxrwxrwx 1 root root    32 Jun  5 09:54 asm -> asm-armnommu
lrwxrwxrwx 1 root root    30 Jun  5 09:54 arch -> arch-ixp425
lrwxrwxrwx 1 root root    26 Jun  5 09:54 proc -> proc-armv
lrwxrwxrwx 1 root root    32 Jun  5 09:54 arch -> arch-W90N745
lrwxrwxrwx 1 root root    26 Jun  5 09:54 proc -> proc-armv
lrwxrwxrwx 1 root root    28 Jun  5 09:52 gnuc.h -> lbl/gnuc.h
lrwxrwxrwx 1 root root    76 Jun  5 09:53 TinyLogin.html -> tinylogin.lineo.com/TinyLogin.html


Assuming you used /home/NUVO for my zip file (as per install instructions) this should fix it

cd /home/NUVO/uClinux-dist
rm config.arch
ln -s vendors/nuvoton/nuc745/config.arch config.arch

cd /home/NUVO/uClinux-dist/lib/include
rm asm linux scsi
ln -s ../../linux-2.4.x/include/asm-armnommu asm
ln -s ../../linux-2.4.x/include/linux linux
ln -s ../../linux-2.4.x/include/scsi scsi

cd /home/NUVO/uClinux-dist/linux-2.4.x/include
rm asm
ln -s asm-armnommu asm

cd /home/NUVO/uClinux-dist/linux-2.4.x/include/asm
rm arch proc
ln -s arch-nuc700 arch
ln -s proc-armv proc

cd /home/NUVO/uClinux-dist/user/tcpdump
rm gnuc.h
ln -s lbl/gnuc.h gnuc.h


#Force recompile of make menuconfig binaries
cd /home/NUVO/uClinux-dist/config/scripts/
rm *.o
rm tkparse
cd /home/NUVO/uClinux-dist/config/scripts/lxdialog
rm *.o
rm lxdialog


#Finally - add the compiler tools to the path
#And make clean / make

PATH=/usr/local/arm_tools/bin/:$PATH
cd /home/NUVO/uClinux-dist
make clean
make
make dep



If anything else needs to be modified, will add.
« Last Edit: June 04, 2011, 03:57:50 pm by admin »

June 04, 2011, 08:02:59 pm
I'm getting really nag :-[

Could'n t compile again. I remake all the links again.
Quote
root@moldov-VirtualBox:/home/NUVO/uClinux-dist# make dep
make ARCH=armnommu CROSS_COMPILE=arm-elf- -C linux-2.4.x dep
make[1]: Entering directory `/home/NUVO/uClinux-dist/linux-2.4.x'
rm -f include/asm-armnommu/arch include/asm-armnommu/proc
(cd include/asm-armnommu; ln -sf arch-nuc700 arch; ln -sf proc-armv proc)
make[2]: Entering directory `/home/NUVO/uClinux-dist/linux-2.4.x/arch/armnommu/tools'
/home/NUVO/uClinux-dist/linux-2.4.x/scripts/mkdep getconstants.c | sed s,getconstants.o,/home/NUVO/uClinux-dist/linux-2.4.x/include/asm-armnommu/constants.h, > .depend
/home/NUVO/uClinux-dist/linux-2.4.x/scripts/mkdep: 1: Syntax error: ")" unexpected
make all
make[3]: Entering directory `/home/NUVO/uClinux-dist/linux-2.4.x/arch/armnommu/tools'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/NUVO/uClinux-dist/linux-2.4.x/arch/armnommu/tools'
make[2]: Leaving directory `/home/NUVO/uClinux-dist/linux-2.4.x/arch/armnommu/tools'
make[2]: Entering directory `/home/NUVO/uClinux-dist/linux-2.4.x/arch/armnommu/boot'
make[2]: Nothing to be done for `dep'.
make[2]: Leaving directory `/home/NUVO/uClinux-dist/linux-2.4.x/arch/armnommu/boot'
scripts/mkdep -- init/*.c > .depend
scripts/mkdep: 1: Syntax error: ")" unexpected
make[1]: *** [dep-files] Error 2
make[1]: Leaving directory `/home/NUVO/uClinux-dist/linux-2.4.x'
make: *** [dep] Error 2