maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   QR code reader for the n810 (https://talk.maemo.org/showthread.php?t=27508)

Sharpie 2009-03-15 02:33

QR code reader for the n810
 
Is there a QR code reader for the Nokia N810?

lardman 2009-03-15 10:22

Re: QR code reader for the n810
 
Yes, derf/tterribe has written some code, it's available in the maemo-barcode repo along with a test application: https://garage.maemo.org/plugins/scm...=maemo-barcode

I plan to add this functionality into the barcode reader I've been developing (https://garage.maemo.org/plugins/scm...=maemo-barcode), and can compile the test app for you this afternoon so you can try it out.

Sharpie 2009-03-15 18:14

Re: QR code reader for the n810
 
thanks. can you pm me when it's ready?

lardman 2009-03-16 07:39

Re: QR code reader for the n810
 
Oops, sorry, ran out of time yesterday. Am away until Wed, but will sort it out when I get back if someone else hasn't compiled it already. Si

MrWeasel 2009-03-16 17:00

Re: QR code reader for the n810
 
I've tried your maemo-barcode app.. amazing! Can't wait to see this working for QR-codes!

pelago 2009-03-17 16:59

Re: QR code reader for the n810
 
It's a pity the camera on the N810 faces forward not back, as I guess that makes apps like this harder to use.

lardman 2009-03-17 22:04

Re: QR code reader for the n810
 
Yes it is a shame with the N810, the N800 works well though (though I've not set the image to flip when the camera is twisted to face forwards) and the "N900" will (we're pretty sure) have two cameras, with one facing either way.

Just got back this evening, and am pretty tired so I'll get the QR code stuff compiled tomorrow.

lardman 2009-03-18 19:16

Re: QR code reader for the n810
 
QR code decoder here: http://people.xiph.org/~tterribe/tmp/qrreader

And some notes about it (quoted directly from IRC):

<derf> And... for some reason this binary is segfaulting when the x86 one did not.
Well, reverting to current svn still does, so it's not a new regression anyway.
<derf> Only happens on ~a dozen images out of 200.
<derf> I don't have time to track it down right now, but I can hand you the binary as-is.
http://people.xiph.org/~tterribe/tmp/qrreader
<lardman> ok cool, will pass that on
<derf> Note that that's for PNG input only, and unless you have a version of iconv that supports SJIS (and maybe CP437), you'll have trouble decoding codes with data in those character sets.
<lardman> ok
<derf> (it'll still produce output, just not converted to UTF-8)
<lardman> ok

...snip...

<derf> Oh, I remember what this segfault is.
libpng on the tablets is borken.

lardman 2009-03-18 19:18

Re: QR code reader for the n810
 
Before things like QR and dtmx codes can realistically be added to the mix, we probably need to develop some fast recognition codes so we can decide if it's worth trying the relevant full decoder (QR and dtmx decoders are slow compared with the 1D decoder).

Eric G 2009-10-08 03:39

Re: QR code reader for the n810
 
Bumping this topic to see if it will be ported to the N900? Also, has there been any progress toward QR codes? I got used to sending links from Mozilla to my N95 with the QR plugin, and being able to paste 1D codes into a google search for comparison shopping might be useful.

lardman 2009-10-08 09:39

Re: QR code reader for the n810
 
works on N900 and N8X0, with limitations (as I'm out of the country atm)

http://people.bath.ac.uk/enpsgp/nokia770/mbarcode/

no installable package yet, place mbarcode somewhere and install libdmtx0.

webscraping is disabled (doesn't work consistently, so best disabled to avoid segfaults), opening web links in dmtx or qrcodes is broken (I broke it just before I left), but it still displays the url on the screen. database stuff is probably also broken/only partly working so far.

but the good news: decodes 1d, qr code and datamatrix barcodes and displays the data.

code is under the maemo-barcode garage project under branches/simon_wip/maemo-barcode (iirc, can't check here).

will get back to fixing things up once I'm back from the summit, patches and ideas welcome of course.

lardman 2009-10-08 09:45

Re: QR code reader for the n810
 
oh yes, not managed to work out focus and led control on the n900 yet, but was told we should hear about this at the summit, so expect support shortly after.

MrWeasel 2009-10-08 10:14

Re: QR code reader for the n810
 
Quote:

Originally Posted by lardman (Post 341661)
opening web links in dmtx or qrcodes is broken (I broke it just before I left),

can be fixed with

Code:

Index: web.c
===================================================================
--- web.c        (revision 98)
+++ web.c        (working copy)
@@ -1750,7 +1750,7 @@
    switch (response) {
    case GTK_RESPONSE_YES:
        osso_context = osso_initialize ("com.lardman.mbarcode", "0.0.1", FALSE, NULL);
-        osso_rpc_async_run(osso_context, "com.nokia.osso_browser", "/com/nokia/osso_browser", "com.nokia.osso_browser", "open_new_window", osso_retval,  DBUS_TYPE_STRING, open, DBUS_TYPE_INVALID);
+        osso_rpc_async_run(osso_context, "com.nokia.osso_browser", "/com/nokia/osso_browser", "com.nokia.osso_browser", "open_new_window", osso_retval,  NULL, DBUS_TYPE_STRING, open, DBUS_TYPE_INVALID);
        //osso_rpc_run_with_defaults(osso_context, "osso_browser", "open_new_window", NULL,  DBUS_TYPE_STRING, open, DBUS_TYPE_INVALID);
        osso_deinitialize(osso_context);
        break;


Jaffa 2009-10-12 14:29

Re: QR code reader for the n810
 
lardman was demonstrating QR code reading at the summit.

lardman 2009-10-12 20:51

Re: QR code reader for the n810
 
And he promises to get the auto-focus and LED lighting working on the N900 asap (as well as sorting out some webscraping on all the devices, using at least Amazon, and fixing the url opening using MrWeasel's pointer).

Webscraping patches (or any other for that matter) welcome of course.

I'm also planning to add support for QR codes containing vCards, anything else specific anyone knows of that should be added in? iCal perhaps?

allnameswereout 2009-10-13 09:29

Re: QR code reader for the n810
 
Quote:

Originally Posted by lardman (Post 344824)
And he promises to get the auto-focus and LED lighting working on the N900 asap (as well as sorting out some webscraping on all the devices, using at least Amazon, and fixing the url opening using MrWeasel's pointer).

Webscraping patches (or any other for that matter) welcome of course.

I'm also planning to add support for QR codes containing vCards, anything else specific anyone knows of that should be added in? iCal perhaps?

http:// mailto: and iCalendar.

lardman 2009-10-13 11:30

Re: QR code reader for the n810
 
Http should again be working soon, but if anyone has a pointer to code for opening an email and adding calendar events please do post and I'll stick that into the app for some testing.

adem3311 2009-10-18 14:11

Re: QR code reader for the n810
 
I can't get the libdmtx0 to install on mine - it shows an error even when both files are in the same directory.

Any ideas?

MrWeasel 2009-10-18 14:18

Re: QR code reader for the n810
 
export LD_LIBRARY_PATH=/path/where/lib/is

lardman 2009-10-18 14:30

Re: QR code reader for the n810
 
Quote:

I can't get the libdmtx0 to install on mine - it shows an error even when both files are in the same directory.

Any ideas?
What's the error?

You've presumably done "sudo gainroot" to become root, then "dpkg -i libdmtx0a_0.7.0-1_armel.deb".

I've uploaded libdmtx to extras-devel too, though you shouldn't enable that really unless you know what you're doing.

Also note that you'll probably need to make the mbarcode binary executable like so "chmod a+x mbarcode", then run it like so "./mbarcode"

lardman 2009-10-18 14:33

Re: QR code reader for the n810
 
If there are any GTK+ gurus out there, could you take a look at the dialogs (botton of web.c) and see if you can work out why, after they are dismissed, the UI no longer accepts events. This seems to happen on both the N8x0 and N900.

For the next build I'll just disable the dialogs so that you can open urls and add vcards without it all locking up. Also need to tweak N8x0 url code as it seems to just open an empty browser atm.

In fact I now need to split the code (up till now the same has run on both N8x0 and N900), as there are going to be some significant differences in the camera stuff, the GUI, etc.

adem3311 2009-10-18 15:08

Re: QR code reader for the n810
 
I did the dpkg and it worked. I did the chmod a+x .media/mmc1/mbarcode and it worked


Now what? I can't open mbarcode through the terminal because it says permission denied.

qwerty12 2009-10-18 15:11

Re: QR code reader for the n810
 
Quote:

Originally Posted by lardman (Post 350330)
For the next build I'll just disable the dialogs so that you can open urls and add vcards without it all locking up. Also need to tweak N8x0 url code as it seems to just open an empty browser atm.

I still think connecting a "response" handler to the dialog's callback is more preferable to disabling it, while gtk_dialog_run() fails for you.

adem3311 2009-10-18 16:46

Re: QR code reader for the n810
 
Easy Guide: (1 way to do it)

Download both files onto a removable memory card

Rename the libdmtx0a_0.7.0-1_armel.deb to lib.deb in File Manager

Open XTerminal

Get Root

type
Code:

dpkg -i /media/mmc1/lib.deb
type
Code:

ls -l /media/mmc1
You should see mbarcode on the list

type
Code:

mv /media/mmc1/mbarcode ~user
type
Code:

chmod ugo+rx ~user/mbarcode
You're done! :)

To start it whenever you want just type
Code:

~user/mbarcode
(a script should be made to start it)

And that's my beginners guide to installing it.

lardman 2009-10-18 17:19

Re: QR code reader for the n810
 
Quote:

I still think connecting a "response" handler to the dialog's callback is more preferable to disabling it, while gtk_dialog_run() fails for you.
I'll try it, but can't really see why it should behave differently to the current code.

lamle 2010-06-03 19:19

Re: QR code reader for the n810
 
Hi all,
I am developing an application and in my application there is one part that I should search the engine based on its bar code. I examined mbarcode application for N900 in repository and would like to embed it to my application.
I have try this code
https://garage.maemo.org/plugins/scm...=maemo-barcode
It works and I got a plugin installed.
However, sorry for my stupidness but still I could not find out a way to use this plugin in my application.
I think it should be something like:
QRreader reader(myMainApplication);
reader.show();

Any help for sample code please.

lardman 2010-06-03 19:21

Re: QR code reader for the n810
 
What about going the other way round and making your application a plugin that runs within mbarcode?

Otherwise, to use the mbarcode implementation in your app, you'll need to setup the GStreamer pipeline and handle the events coming from the libzbar gst decoder element.

lamle 2010-06-03 20:27

Re: QR code reader for the n810
 
My application is quite complicated and mbarcode should be a part of it.
Can you please give me some guidelines how to do it in the second way.
Please help me with this, I have been struggling with it quite a bit but still not much achievement
Can we have codes somewhere?


All times are GMT. The time now is 10:09.

vBulletin® Version 3.8.8