 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible schrieb:
> The impressive thing is, as far as I can tell, almost all barcode
> scanners support almost all kinds of barcodes. Even though each coding
> scheme is utterly unrelated to any of the others. God only knows how
> this is physically possible...
Not much magic in there.
Barcodes are designed to have a lot of redundancy, so that reading
errors can be detected.
So a barcode scanner just checks whether the code it just read makes
sense (i.e. check digits match etc.) when interpreted as any of the
codes it supports.
Conflicts seldom occur /because/ the barcodes are so dissimilar. Still,
it is a good idea to configure the scanner to recognize only barcodes
you actually expect to use, especially if you expect to work with
barcodes that may be smudged or otherwise messed up.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Gyscos schrieb:
> Isn't there some bars at the beginning or the end that indicate the encoding ?
No, not really. Though many barcodes include some "frame" to (a)
identify the side at which the barcode starts, and/or (b) calibrate for
the size of the barcode; such frames can often double-act to prevent
misinterpreting other barcode types.
For instance, Code39 IIRC always starts and ends with the bars it uses
for the Asterisk (*).
EAN-13, on the other hand, uses one pair of simple bars at the
beginning, end, and in the middle, respectively, to calibrate for size,
while the reading direction can unambiguously be inferred from any
"character" of the barcode "payload".
But these "frames" are only standardized for each individual barcode
type, and there is no universal scheme to identify the type. All you can
do is test for which types of barcode this particular specimen reads
without error.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> It's great fun. EAN-13 is apparently an "extension" of UPC-A,
Those are used in supermarkets mainly, which is why you find them on all
products sold to the public.
For non-public uses (eg on shipping cartons, internal parts of products etc)
the company is obviously free to make up or use their own standard for the
bar code. You didn't find any 2D barcodes?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
>> It's great fun. EAN-13 is apparently an "extension" of UPC-A,
>
> Those are used in supermarkets mainly, which is why you find them on all
> products sold to the public.
Yeah, apparently UPC-A is for America, EAN-13 is supposedly for
everywhere, but almost all scanners support both. They can only encode
numbers though - usually standardised product codes.
> For non-public uses (eg on shipping cartons, internal parts of products
> etc) the company is obviously free to make up or use their own standard
> for the bar code.
Yeah, the shipping box I've got has several extremely wide barcodes.
These codes encode letters as well, but I can't determine exactly which
system they are. (Assuming they're even a standard one...)
> You didn't find any 2D barcodes?
None.
However... The Royal Mail allow you to print your own stamps, for a fee.
You give them money, they give you a PDF file containing a 2D barcode
[which presumably encodes the date of purchase, since it apparently
expires after so many days].
Now I'm thinking... it appears to be a standard Data Matrix barcode, so
if I could figure out WTF the data encoded in it is, I could print as
many of them as I like, without a fee...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Interesting fact: I actually have a barcode scanner here. Specifically,
our tape robot has a barcode scanner. We've never used it, but
apparently our Director of IT has suddenly decided that we're going to.
In a few days' time I should have a stack of preprinted barcode labels.
I wonder what kinds the scanner can read?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Now I'm thinking... it appears to be a standard Data Matrix barcode, so if
> I could figure out WTF the data encoded in it is, I could print as many of
> them as I like, without a fee...
Won't they encode a serial number in there? As soon as they detect a 2nd
stamp in the system with the same serial number (or with one they know they
haven't sold yet) there will be trouble.
Also it probably has some checksum, you'd need a shed load of stamps to
figure it out probably.
And hope they don't encode your IP address or payment details in there too.
A bit like that system on Blu-Ray discs, where every player plays back a
very slightly different version, so when someone rips and uploads to
BitTorrent, they can tell exactly which player it was ripped from.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Now I'm thinking... it appears to be a standard Data Matrix barcode,
>> so if I could figure out WTF the data encoded in it is, I could print
>> as many of them as I like, without a fee...
>
> Won't they encode a serial number in there? As soon as they detect a 2nd
> stamp in the system with the same serial number (or with one they know
> they haven't sold yet) there will be trouble.
Yeah, this is probably the main problem. If they know which numbers
they've actually sold and which ones have actually been used, there's
not much you can do.
> Also it probably has some checksum, you'd need a shed load of stamps to
> figure it out probably.
Well, if you were going to reverse-engineer it, sure. But if you could
figure out the algorithm...
It's like Windows license keys. Each one is a 20-character alphanumeric
string. There must be some algorithm that Windows uses to decide whether
the key you just entered is valid. If you somehow knew what that
algorithm is.......
> And hope they don't encode your IP address or payment details in there too.
If you *knew* how they generate the barcode, you could put an arbitrary
IP address in there. (Besides, knowing somebody's IP address doesn't
really tell you a whole heap.) Payment details might be more fun...
> A bit like that system on Blu-Ray discs, where every player plays back a
> very slightly different version, so when someone rips and uploads to
> BitTorrent, they can tell exactly which player it was ripped from.
Really? That's news...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Also it probably has some checksum, you'd need a shed load of stamps to
>> figure it out probably.
>
> Well, if you were going to reverse-engineer it, sure. But if you could
> figure out the algorithm...
How are you going to figure out the algorithm without access to lots of
stamps you know are valid?
> If you *knew* how they generate the barcode, you could put an arbitrary IP
> address in there.
Isn't the problem here that you're trying to work out how to generate the
barcode?
>> A bit like that system on Blu-Ray discs, where every player plays back a
>> very slightly different version, so when someone rips and uploads to
>> BitTorrent, they can tell exactly which player it was ripped from.
>
> Really? That's news...
http://www.freedom-to-tinker.com/tags/aacs?page=1
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>>> Also it probably has some checksum, you'd need a shed load of stamps
>>> to figure it out probably.
>>
>> Well, if you were going to reverse-engineer it, sure. But if you could
>> figure out the algorithm...
>
> How are you going to figure out the algorithm without access to lots of
> stamps you know are valid?
I suppose the fatal assumption here is that the encoding of the
information into the barcode is trivial. If these guys are sensible, it
won't be...
>>> A bit like that system on Blu-Ray discs, where every player plays
>>> back a very slightly different version, so when someone rips and
>>> uploads to BitTorrent, they can tell exactly which player it was
>>> ripped from.
>>
>> Really? That's news...
>
> http://www.freedom-to-tinker.com/tags/aacs?page=1
Interesting. So the film actually ends a different way depending on
which player you play it with?
I bet that'll be popular...
[But then again, all these copywrite notices and "piracy is stealing"
ads and aggressive copy-protection systems only piss off paying
customers. They have no effect on criminals...]
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Interesting. So the film actually ends a different way depending on which
> player you play it with?
>
> I bet that'll be popular...
LOL, I suspect they can do it slightly more subtly than that! They only
need to make some tiny changes to some of the pixels to be detectable. In
theory they could do what you suggest though, would be fun :-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |