How to use your Nokia N95 as a wireless Webcam

by Ross McKillop on November 19, 2008

Linux Symbian

SmartCam turns a Symbian Series 60 phone with bluetooth and camera into a webcam ready to use with your PC. It is open source software, licenced under the GPLv2 and will run on Linux or Windows. There are commercial applications that will do the same thing, but I believe in using and supporting free, open source software whenever possible.

In this tutorial I will be installing SmartCam on Fedora 9 as the SmartCam developer has already tested and confirmed that SmartCam works on Ubuntu 8.04. Yes, SmartCam does use the Video4Linux API. See http://en.wikipedia.org/wiki/Video4Linux for a list of compatible applications. I personally use SmartCam with aMSN quite frequently.

  1. First things first, visit http://sourceforge.net/projects/smartcam/ and click the Download link in the green box.

  2. click to enlarge

  3. We’re going to install the Linux version, so click the Download link for smartcam linux.

  4. click to enlarge

  5. The latest Linux version at the time of writing is v2008.09.18.2. Download the zip archive and remember where you saved it. I saved it in ~/Download

  6. click to enlarge

    I’ll be doing the next few steps on the command line as it involves compiling a kernel module for SmartCam.

  7. Navigate to the directory where you saved the SmartCam zip file.

    [kmurray@radon ~]$ cd ~/Download

  8. Unzip the archive.

    [kmurray@radon Download]$ unzip smartcam_v_2008.09.18.2.zip
    Archive: smartcam_v_2008.09.18.2.zip
    creating: smartcam/
    inflating: smartcam/COPYING
    inflating: smartcam/ReadMe.txt
    creating: smartcam/release/
    inflating: smartcam/release/smartcam.ko
    inflating: smartcam/release/smartcam
    creating: smartcam/release/phone_files/
    inflating: smartcam/release/phone_files/SmartCamS603rdEd.SIS
    inflating: smartcam/release/phone_files/SmartCamS602ndEd.SIS
    inflating: smartcam/release/phone_files/jSmartCam.jar
    [file listing snipped to save space]

  9. Now we compile the SmartCam kernel module. You will need to ensure that you have the kernel development headers installed. In Fedora it’s as simple as yum install kernel-devel

    [kmurray@radon Download]$ cd smartcam/src/driver/
    [kmurray@radon driver]$ make -C /lib/modules/`uname -r`/build M=`pwd` modules
    make: Entering directory `/usr/src/kernels/2.6.26.6-79.fc9.i686′
    CC [M] /home/kmurray/Download/smartcam/src/driver/smartcam.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC /home/kmurray/Download/smartcam/src/driver/smartcam.mod.o
    LD [M] /home/kmurray/Download/smartcam/src/driver/smartcam.ko
    make: Leaving directory `/usr/src/kernels/2.6.26.6-79.fc9.i686′

  10. Kernel modules usually live somewhere in /lib/modules/`uname -r`/. Just to keep things tidy, we’ll copy the module there.

    [kmurray@radon driver]$ sudo cp smartcam.ko /lib/modules/`uname -r`/extra

  11. Now update the module dependancies.

    [kmurray@radon driver]$ sudo /sbin/depmod -a

  12. Load the module.

    [kmurray@radon driver]$ sudo /sbin/modprobe smartcam

  13. Verify that it loaded.

    [kmurray@radon driver]$ /sbin/lsmod | grep smartcam
    smartcam 9880 0
    videodev 29824 1 smartcam

    [kmurray@radon driver]$ ls -l /dev/video*
    lrwxrwxrwx 1 root root 6 2008-11-15 13:59 /dev/video -> video0
    crw-rw—- 1 root root 81, 0 2008-11-15 13:59 /dev/video0

  14. As you may have noticed, we have a minor problem here. /dev/video0 is only accessible to root. Unless you plan on only using your webcam as root, which is a very bad idea, you need to change this. Rather than change the permissions of /dev/video0 every time you reboot, you can change your udev rules to allow all users to access /dev/video0.

    Using your favourite text editor, open /etc/udev/rules.d/50-udev-default.rules. I used vim.

    [kmurray@radon driver]$ sudo vim /etc/udev/rules.d/50-udev-default.rules

    Search for the video4linux stanza and change the line that reads:

    KERNEL==”video0″, SYMLINK+=”video”

    to this:

    KERNEL==”video0″, SYMLINK+=”video”, MODE=”0666″

  15. Remove and reload the SmartCam kernel module.

    [kmurray@radon driver]$ sudo /sbin/modprobe -r smartcam
    [kmurray@radon driver]$ sudo /sbin/modprobe smartcam

  16. Verify the permissions of /dev/video0.

    [kmurray@radon driver]$ ls -l /dev/video*
    lrwxrwxrwx 1 root root 6 2008-11-15 14:05 /dev/video -> video0
    crw-rw-rw- 1 root root 81, 0 2008-11-15 14:05 /dev/video0

    Now /dev/video0 is available to all users.

  17. Now compile the SmartCam application.

    [kmurray@radon driver]$ cd ../../src/app/
    [kmurray@radon app]$ gcc `pkg-config –cflags –libs gtk+-2.0 gthread-2.0` -lbluetooth smartcam.c -o smartcam

  18. Make the SmartCam application available to all users.

    [kmurray@radon app]$ sudo cp smartcam /usr/local/bin/

  19. Make the SmartCam icons available to all users.

    [kmurray@radon app]$ sudo mkdir /usr/share/pixmaps/smartcam/
    [kmurray@radon app]$ sudo cp icons/*.png /usr/share/pixmaps/smartcam/

  20. I also chose to create a menu entry for SmartCam under Applications -> Sound & Video. Click System -> Preferences -> Look and Feel -> Main Menu.

  21. click to enlarge

  22. This is where you add or remove custom Applications Menu entries.

  23. click to enlarge

  24. In the left pane, click on Sound & Video.

  25. click to enlarge

  26. Click the New Item button on the right hand side and fill in the fields as follows:

  27. click to enlarge

  28. Click the Choose Icon button at the top left and type /usr/share/pixmaps/smartcam in the file field at the top, then click on logo.png and click OK.
  29. The window should now look like this:

  30. click to enlarge

  31. Click OK and close the Menu Editor. Then click Applications -> Sound & Video and you will see a menu entry for SmartCam.

  32. click to enlarge

  33. Now that the computer is set up, you need to install SmartCam on your N95. The SmartCam zip file you downloaded earlier also contains the SmartCam application for your phone. The version you want to install on your N95 is in the archive under release/phone_files/SmartCamS603rdEd.SIS. See my previous tutorials on how to install applications on your phone if you are unfamiliar with the process (How to install N95 apps via USB | How to install N95 apps via bluetooth) Once you have SmartCam installed on your phone, you will find it in your Applications folder.
  34. You must start SmartCam on your computer first. Click Applications -> Sound & Video -> SmartCam.
  35. Now start SmartCam on your phone.
  36. Select Options -> Start
  37. If you have previously connected to your computer via bluetooth you will already see it in the list. If not, simply select More Devices. Either way, choose to connect to your computer.

  38. Here’s what it looks like on my phone and on my computer.


  39. At the time of writing, SmartCam only supports bluetooth connections. Hopefully in the future the developer will implement USB and/or Wifi as well. Either way, I still think SmartCam is a fantastic piece of software!

  • http://www.jusdy.co.cc Jusdy J.

    how about windows??

  • ninja

    yea, could you explain it for windows please.

  • http://mrgorefest.blogspot.com MrGorefest

    I love you!! :D
    it works great for me!!

  • Patrick

    Hi there,

    I already use a webcame (Logitech on my 80.4 Ubuntu machine). Can you tell me if changing the settings as shown above:

    KERNEL==”video0″, SYMLINK+=”video”

    to this:

    KERNEL==”video0″, SYMLINK+=”video”, MODE=”0666″

    Will have a negative effect on the webcam connectivity I already have?

    Many thanks.

    Patrick

  • http://supermorph.5druids.com Des

    i think it’ll work patrick

    i think its just a app for wireless access to the camera in the windows version,
    aka no compiling stuff or permission changes,

    most likley a install and run only feature

  • Rob

    hi, i have a nokia 6120 classic, supposedly compatible, any idea how to installto the phone?

  • Patrick

    Hi Des,

    Thanks for the information. Just had a look at the site your name links to.

    I’ve read a bit about Joomla before. Seem like a killer application.

    Regards,

    Patrick

  • http://supermorph.5druids.com des

    yeah, thanks

    it is actually quite good, fully customizable, a seperate admin area.

    soon as i have finished it i plan to use it as a online community with a flash gaming area.

  • Patrick

    Eeeek!

    No sure what is going on here. Any one with a clue-stick for me?

    Thanks.

    /Desktop/N95-mod/smartcam_v_2008.09.18.2/smartcam/src/app$ gcc `pkg-config –cflags –libs gtkclear+-2.0 gthread-2.0` -lbluetooth smartcam.c -o smartcam
    smartcam.c:20:21: error: gtk/gtk.h: No such file or directory
    In file included from smartcam.c:37:
    icons/SmartCamApp.png.h:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘smartcam_png_inline’
    In file included from smartcam.c:38:
    icons/logo.png.h:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘logo_png_inline’
    In file included from smartcam.c:39:
    icons/disconnected.png.h:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘disconnected_png_inline’
    smartcam.c:65: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    smartcam.c:66: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    smartcam.c:67: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    smartcam.c:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    smartcam.c:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    smartcam.c:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘main_wnd_minimized’
    smartcam.c:72: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    smartcam.c:73: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    smartcam.c:74: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    smartcam.c:76: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘main_wnd_pos_x’
    smartcam.c:77: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘main_wnd_pos_y’
    smartcam.c:176: error: expected ‘)’ before ‘*’ token
    smartcam.c: In function ‘display_disconnected’:
    smartcam.c:184: error: ‘status_icon’ undeclared (first use in this function)
    smartcam.c:184: error: (Each undeclared identifier is reported only once
    smartcam.c:184: error: for each function it appears in.)
    smartcam.c:184: error: ‘disconnected_icon_pixbuf’ undeclared (first use in this function)
    smartcam.c:185: error: ‘image’ undeclared (first use in this function)
    smartcam.c:185: error: ‘logo_icon_pixbuf’ undeclared (first use in this function)
    smartcam.c: In function ‘set_disconnected’:
    smartcam.c:198: error: ‘logo_icon_pixbuf’ undeclared (first use in this function)
    smartcam.c:198: warning: passing argument 1 of ‘write_device_frame’ makes pointer from integer without a cast
    smartcam.c: In function ‘set_connected’:
    smartcam.c:205: error: ‘status_icon’ undeclared (first use in this function)
    smartcam.c:205: error: ‘smartcam_icon_pixbuf’ undeclared (first use in this function)
    smartcam.c: At top level:
    smartcam.c:223: error: expected ‘)’ before ‘*’ token
    smartcam.c: In function ‘comm_thread’:
    smartcam.c:267: error: ‘GtkWidget’ undeclared (first use in this function)
    smartcam.c:267: error: ‘image’ undeclared (first use in this function)
    smartcam.c:267: error: expected expression before ‘)’ token
    smartcam.c:268: error: ‘GError’ undeclared (first use in this function)
    smartcam.c:268: error: ‘error’ undeclared (first use in this function)
    smartcam.c:279: error: ‘GdkPixbufLoader’ undeclared (first use in this function)
    smartcam.c:279: error: ‘pixbuf_loader’ undeclared (first use in this function)
    smartcam.c:293: error: ‘GdkPixbuf’ undeclared (first use in this function)
    smartcam.c:293: error: ‘pixbuf’ undeclared (first use in this function)
    smartcam.c:296: warning: passing argument 1 of ‘write_device_frame’ makes pointer from integer without a cast
    smartcam.c: At top level:
    smartcam.c:322: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘delete_event’
    smartcam.c: In function ‘load_inline_icons’:
    smartcam.c:338: error: ‘smartcam_icon_pixbuf’ undeclared (first use in this function)
    smartcam.c:338: error: ‘smartcam_png_inline’ undeclared (first use in this function)
    smartcam.c:338: error: ‘FALSE’ undeclared (first use in this function)
    smartcam.c:339: error: ‘disconnected_icon_pixbuf’ undeclared (first use in this function)
    smartcam.c:339: error: ‘disconnected_png_inline’ undeclared (first use in this function)
    smartcam.c:340: error: ‘logo_icon_pixbuf’ undeclared (first use in this function)
    smartcam.c:340: error: ‘logo_png_inline’ undeclared (first use in this function)
    smartcam.c: In function ‘unref_inline_icons’:
    smartcam.c:345: error: ‘smartcam_icon_pixbuf’ undeclared (first use in this function)
    smartcam.c:346: error: ‘disconnected_icon_pixbuf’ undeclared (first use in this function)
    smartcam.c:347: error: ‘logo_icon_pixbuf’ undeclared (first use in this function)
    smartcam.c: In function ‘clean_smartcam’:
    smartcam.c:366: error: ‘logo_icon_pixbuf’ undeclared (first use in this function)
    smartcam.c:366: warning: passing argument 1 of ‘write_device_frame’ makes pointer from integer without a cast
    smartcam.c: At top level:
    smartcam.c:375: error: expected ‘)’ before ‘*’ token
    smartcam.c: In function ‘show_quit_dialog’:
    smartcam.c:400: error: ‘GtkWidget’ undeclared (first use in this function)
    smartcam.c:400: error: ‘label’ undeclared (first use in this function)
    smartcam.c:401: error: ‘GtkHBox’ undeclared (first use in this function)
    smartcam.c:401: error: ‘dialog_hbox’ undeclared (first use in this function)
    smartcam.c:402: error: ‘GtkImage’ undeclared (first use in this function)
    smartcam.c:402: error: ‘dialog_icon’ undeclared (first use in this function)
    smartcam.c:404: error: ‘GtkDialog’ undeclared (first use in this function)
    smartcam.c:404: error: ‘dialog’ undeclared (first use in this function)
    smartcam.c:407: error: ‘main_window’ undeclared (first use in this function)
    smartcam.c:408: error: ‘GTK_DIALOG_MODAL’ undeclared (first use in this function)
    smartcam.c:410: error: ‘GTK_RESPONSE_CLOSE’ undeclared (first use in this function)
    smartcam.c:414: error: ‘GTK_TYPE_HBOX’ undeclared (first use in this function)
    smartcam.c:415: error: ‘GTK_TYPE_IMAGE’ undeclared (first use in this function)
    smartcam.c:416: error: ‘GTK_STOCK_DIALOG_ERROR’ undeclared (first use in this function)
    smartcam.c:418: error: ‘FALSE’ undeclared (first use in this function)
    smartcam.c:421: error: ‘TRUE’ undeclared (first use in this function)
    smartcam.c:424: error: invalid type argument of ‘->’
    smartcam.c:425: error: ‘destroy’ undeclared (first use in this function)
    smartcam.c: At top level:
    smartcam.c:511: error: expected ‘)’ before ‘*’ token
    smartcam.c:529: error: expected ‘)’ before ‘*’ token
    smartcam.c: In function ‘show_main_window’:
    smartcam.c:556: error: ‘main_window’ undeclared (first use in this function)
    smartcam.c:556: error: ‘main_wnd_pos_x’ undeclared (first use in this function)
    smartcam.c:556: error: ‘main_wnd_pos_y’ undeclared (first use in this function)
    smartcam.c: In function ‘hide_main_window’:
    smartcam.c:563: error: ‘main_window’ undeclared (first use in this function)
    smartcam.c:563: error: ‘main_wnd_pos_x’ undeclared (first use in this function)
    smartcam.c:563: error: ‘main_wnd_pos_y’ undeclared (first use in this function)
    smartcam.c: At top level:
    smartcam.c:567: error: expected ‘)’ before ‘*’ token
    smartcam.c:593: error: expected ‘)’ before ‘*’ token
    smartcam.c: In function ‘main’:
    smartcam.c:603: error: ‘GtkWidget’ undeclared (first use in this function)
    smartcam.c:603: error: ‘vbox’ undeclared (first use in this function)
    smartcam.c:604: error: ‘align’ undeclared (first use in this function)
    smartcam.c:605: error: ‘frame’ undeclared (first use in this function)
    smartcam.c:606: error: ‘status_menu’ undeclared (first use in this function)
    smartcam.c:607: error: ‘status_menu_item’ undeclared (first use in this function)
    smartcam.c:611: error: ‘GError’ undeclared (first use in this function)
    smartcam.c:611: error: ‘error’ undeclared (first use in this function)
    smartcam.c:636: error: ‘status_icon’ undeclared (first use in this function)
    smartcam.c:636: error: ‘disconnected_icon_pixbuf’ undeclared (first use in this function)
    smartcam.c:638: error: ‘TRUE’ undeclared (first use in this function)
    smartcam.c:639: error: ‘status_popup’ undeclared (first use in this function)
    smartcam.c:640: error: ‘status_activate’ undeclared (first use in this function)
    smartcam.c:643: error: ‘main_window’ undeclared (first use in this function)
    smartcam.c:643: error: ‘GTK_WINDOW_TOPLEVEL’ undeclared (first use in this function)
    smartcam.c:644: error: ‘delete_event’ undeclared (first use in this function)
    smartcam.c:645: error: ‘destroy’ undeclared (first use in this function)
    smartcam.c:646: error: ‘track_minimize’ undeclared (first use in this function)
    smartcam.c:650: error: ‘FALSE’ undeclared (first use in this function)
    smartcam.c:652: error: ‘GTK_WIN_POS_NONE’ undeclared (first use in this function)
    smartcam.c:654: error: ‘smartcam_icon_pixbuf’ undeclared (first use in this function)
    smartcam.c:663: error: ‘GTK_SHADOW_IN’ undeclared (first use in this function)
    smartcam.c:665: error: ‘image’ undeclared (first use in this function)
    smartcam.c:665: error: ‘logo_icon_pixbuf’ undeclared (first use in this function)
    smartcam.c:672: error: ‘statusbar’ undeclared (first use in this function)

  • http://supermorph.5druids.com des

    sounds to me like that gtk.h is missing (near the top of ur post)

    other than that im not too sure.
    i have basic build skills, but not too great on resolving things like that lol sorry.

    hope u get it working.

  • azmo_35

    Hi, i try follow this tutorial but i’m stuck all ways on the begin i am on Ubuntu 8.04 kernel 2.6.24-23, new to this but i wanted learn, many thanks, azmo.