Adding a camera to a project used to be a chore, but modern camera modules make it simple. But what if you want to read QR codes? [James Bowman] noticed a $7 module that claims to read QR codes so he decided to try one out.
The module seems well thought out. There’s a camera, of course. A Qwiic connector makes hooking up easy. An LED blinks blue when you have power and green when a QR code shows up.
Reading a QR code was simple in Python using the I2CDriver library. There are two possible problems: first, if the QR code contains a large amount of data, you may exceed the I2C limit of 254 bytes. Second, despite claiming a 110-degree field of view, [James’] testing showed the QR code has to be almost dead center of the camera for the system to work.
What really interested us, though, was the fact that the device is simply a camera with an RP2040 and little else. For $7, we might grab one to use as a platform for other imaging projects. Or maybe we will read some QR codes. We’d better pick up a few. Then again, maybe we can just do it by hand.
I wish he would have tested a QR code at full capacity and put a minimum and maximum distance where it works. Admittedly the 110 degree FOV and this lens is not ideal for the application.
Nevermind I see that it really doesn’t chunk the code and limits the user to 254 bytes. I understand the manufacturer doesn’t open-source it despite being based on the C++ version if the popular unmaintained zebra crossing library, but what are you gonna do?
I feel this is a low hanging fruit to solve with programming. Maybe I pick 2 up from my redistributor and try to run my own firmware on it. Entirely non-competitive. They are doing something nice here, the price for an MCU and arducam is really fair.
Yeah, I don’t see how sending more than 254 bytes via I2C is such a struggle. The problem of how to transport more stuff than a vehicle can contain is a solved one.
“We might grab one” that’s a bit rude why not pay for it like everyone else?
I bought the GM861S for $5.30 of Aliexpress back in February. It has UART and USB interfaces and just dumps a text stream of whatever it scans.
http://www.growbarcode.com/productinfo/888748.html
It’s a lot easier to deal with than I2C in my opinion. You can program it via UART or QR codes found in the datasheet.
QR-codes are not open source
I prefer matrix free
A QR code is not software, so it can’t be”open source”. And there’s open source QR code libraries out there. So what on earth are you gibbering about?
My guess would be that it’s not officially an open standard. Perhaps the reading of them was reverse engineered and thus far the creators of the QR code have decided not to hassle anyone about it. Unless they officially release the standard to the public domain then use of any library “open source” or not remains legally questionable.
It’s an ISO and JIS standard. It’s freely licensed to anyone complying with the standards.
You could get in trouble for calling something a QR Code that isn’t one. But probably not
Denso Wave released all the specs publicly right from the very beginning, no reverse engineering needed. They wanted it to be used widely.
The only thing they did was hold onto a key patent but freely licensed it to everyone as long as the specs were followed correctly. The market would absolutely have made a hundred slightly different but incompatible versions the first chance they got (“bought our QR code reader cameras? You also need to spend $2000/year to license our QR code generator software because only it will generate codes that our cameras will read”)
So yes, it wasn’t “entirely open”, but not in any way that would impede anyone other than a bad actor.
Are these even still available? The manufacturer link from the Github page is dead.
Adafruit sells them
https://www.adafruit.com/product/5744
Where’s the 254 byte limit coming from? The article claims it’s from the I2C protocol, but the specification (UM10204) explicitly says that’s not the case: “The number of bytes that can be
transmitted per transfer is unrestricted”.
So is it just a limitation of the python library the author is using?
It’s not because of the “i2c protocol”, it’s because of the “module’s protocol”, which happens to use i2c. The module sends 256 bytes in response to any read request. So if the QR code is longer than that it gets truncated.
Not only is it clear the device has garbage firmware, their documentation also says this:
“This module includes an image sensor, and we want to make sure that this doesn’t pose a threat to any of our users’ privacy. We’ve designed the module so that it is as resistant as possible to anyone accessing the raw image data, and only the metadata derived from each frame is available. We’ve also built it to have as slim an interface as possible, to reduce the possibility of malicious interference and make it simpler for third parties to audit our privacy claims.
This approach does constrain what developers can do with the device. One obvious restriction is that we don’t allow you to access the image data, but we also don’t support flashing the firmware or model updating, because doing so could allow unchecked changes to the sensor’s behavior. Even though there’s a microcontroller on the board, we’re hoping that you’ll be able to get enough value out of its pre-programmed behavior to compensate for the inconvenience of this user protection approach.”
It’s complete bullshit. No user’s privacy is protected by doing this. The only thing it protects is the manufacturer, and it’s pretty weak at that as well.
I might grab one just to reverse engineer it, it won’t be hard.