Salto al soddisfare


Come usare il vostro Nokia N95 come Webcam senza fili

Linux Symbian

SmartCam gira un telefono di serie 60 di Symbian con bluetooth e la macchina fotografica in un webcam aspetta per usare con il vostro pc. È software aperto di fonte, autorizzato sotto il GPLv2 e funzionerà su Linux o su Windows. Ci sono applicazioni commerciali che faranno la stessa cosa, ma credo nel usando e nel sostegno liberamente, software aperto di fonte per quanto possibile.

In questa lezione privata installerò SmartCam su Fedora 9 come lo sviluppatore di SmartCam già ha esaminato e confermato che SmartCam lavora a Ubuntu 8.04. Sì, SmartCam usa il Video4Linux api. Veda http://en.wikipedia.org/wiki/Video4Linux per una lista delle applicazioni compatibili. Uso personalmente SmartCam con aMSN abbastanza frequentemente.

  1. Prime cose in primo luogo, chiamata http://sourceforge.net/projects/smartcam/ e scatti Trasferimento dal sistema centrale verso i satelliti collegamento nella scatola verde.

  2. scatti per ingrandire

  3. Stiamo andando installare la versione di Linux, così scattiamo Trasferimento dal sistema centrale verso i satelliti collegamento per linux dello smartcam.

  4. scatti per ingrandire

  5. L'ultima versione di Linux ai tempi di scrittura è v2008.09.18.2. Trasferisca l'archivio dal sistema centrale verso i satelliti della chiusura lampo e ricordi di dove lo avete conservato. Lo ho conservato dentro ~/Download

  6. scatti per ingrandire

    Farò i prossimi punti sulla linea di ordine come coinvolge compilare un modulo del nocciolo per SmartCam.

  7. Traversi all'indice in cui avete conservato la lima di chiusura lampo di SmartCam.

    [~ del kmurray@radon] $ Cd ~/Download

  8. Unzip l'archivio.

    [trasferimento dal sistema centrale verso i satelliti del kmurray@radon] $ unzip smartcam_v_2008.09.18.2.zip
    Archivio: smartcam_v_2008.09.18.2.zip
    generazione: smartcam/
    gonfiamento: smartcam/COPYING
    gonfiamento: smartcam/ReadMe.txt
    generazione: smartcam/rilascio
    gonfiamento: smartcam/rilascio/smartcam.ko
    gonfiamento: smartcam/rilascio/smartcam
    generazione: smartcam/rilascio/phone_files/
    gonfiamento: smartcam/rilascio/phone_files/SmartCamS603rdEd.SIS
    gonfiamento: smartcam/rilascio/phone_files/SmartCamS602ndEd.SIS
    gonfiamento: smartcam/rilascio/phone_files/jSmartCam.jar
    [elenco della lima snipped per risparmiare spazio]

  9. Ora compiliamo il modulo del nocciolo di SmartCam. Dovrete accertarti che facciate le intestazioni di sviluppo del nocciolo installare. In Fedora è semplice As il yum installa il nocciolo-devel

    [trasferimento dal sistema centrale verso i satelliti del kmurray@radon] $ Cd smartcam/src/driver/
    [driver del kmurray@radon] $ faccia - uname del `di C /lib/modules/ - i moduli del `del pwd del `del `/build M= della r
    faccia: 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!

Posted in Guest Blogger, Linux, Symbian, Wireless.

Related Posts:

Simple Help tutorial helps catch office thief
How to enable WiFi in EeeDora
How to read and create "barcodes" (Mobile Codes) on the Nokia N95
How to turn your Nokia N95 into a pedometer
How to turn your N95 into a wireless access point

11 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Jusdy J. says

    how about windows??

  2. ninja says

    yea, could you explain it for windows please.

  3. MrGorefest says

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

  4. Patrick says

    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

  5. Des says

    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

  6. Rob says

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

  7. Patrick says

    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

  8. des says

    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.

  9. Patrick says

    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)

  10. des says

    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.

  11. azmo_35 says

    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.



Some HTML is OK

or, reply to this post via trackback.