Live data from Hacker News

Show HN: Giving a Broken Barcode Scanner a New Life with Elixir and Nerves

bcarrigan.com

41–50 of 60 posts

Re: Show HN: Giving a Broken Barcode Scanner a New Life with Elixir and Nerves

#41
post #6
post #2

I love these little stories, they always make me want to go out and buy a proper oscilliscope so I can start my own adventures. I'm surprised by how simple and easy to understand the data serialisation is on some bits of hardware as in this case.

Thank you for the kind words! I will echo slig and say that I have been really happy with the Rigol DS1054Z so far. I love that you can build a really capable electronics lab at home in 2018 for less than $500.

Micsig scope tablets are great too. Similar price and specs but they're also battery powered and portable!

Re: Show HN: Giving a Broken Barcode Scanner a New Life with Elixir and Nerves

#42
post #17

The laser scanner is kind of fancy, but you can get USB scanners for $10-$20 that present as keyboards. For me, the most interesting part of this is looking at Elixir.

In my previous life I worked on kiosks using POS equipment like this. Scanners are typically just keyboard interfaces. The barcodes are essentially very old school QR codes that actually type the information. Card swipers are the same to a degree. They read up to 3 levels of the magnetic strip and essentially type the card number and cvc into POS systems. Debugging these usually would involve opening up Notepad in Windows and watching it type the information.

Re: Show HN: Giving a Broken Barcode Scanner a New Life with Elixir and Nerves

#44
post #36
post #35

Earlier quoted context omitted.

For decoding serial one of those $5 logic analyzers is more than sufficient, you don't really need an oscilloscope at all. I don't really like using protocol decoding on my scope unless I need to correlate timing with an analog signal because it's tedious to set up and use for a simple digital signal. https://www.aliexpress.com/item/New-Arrival-USB-Logic-Analyz...

It's worth noting that some of those cheap logic analyser only work with pirated versions of expensive logic analysers software.

While cheap knockoff analyzers often ship with pirated software (e.g. Saleae) many, if not most, work equally as well with the open source Sigrok software.

Re: Show HN: Giving a Broken Barcode Scanner a New Life with Elixir and Nerves

#45
post #17

The laser scanner is kind of fancy, but you can get USB scanners for $10-$20 that present as keyboards. For me, the most interesting part of this is looking at Elixir.

This all reminds me of the CueCat[0] scanners I picked up for free from Radio Shack so many years ago.

[0] https://en.wikipedia.org/wiki/CueCat

Re: Show HN: Giving a Broken Barcode Scanner a New Life with Elixir and Nerves

#46
post #38

Earlier quoted context omitted.

Wow, it also has drivers for the raspberry Pi ! https://www.picotech.com/support/topic14649.html This pairing would make for a trully tiny all in one oscilliscope, i'm tempted to get a picoscope and a tiny LCD just for laughs: project #1

You may not want to do that. The sampling rate is very important on a scope, especially for analog signals because of Nyquist.

I think the idea is to use the Pi purely as a display. Picotech's scopes tend to be well specced with regard to analogue bandwidth/sampling rates - around 5x Nyquist typically.

Re: Show HN: Giving a Broken Barcode Scanner a New Life with Elixir and Nerves

#47
post #36
post #35

Earlier quoted context omitted.

For decoding serial one of those $5 logic analyzers is more than sufficient, you don't really need an oscilloscope at all. I don't really like using protocol decoding on my scope unless I need to correlate timing with an analog signal because it's tedious to set up and use for a simple digital signal. https://www.aliexpress.com/item/New-Arrival-USB-Logic-Analyz...

It's worth noting that some of those cheap logic analyser only work with pirated versions of expensive logic analysers software.

[deleted]

Re: Show HN: Giving a Broken Barcode Scanner a New Life with Elixir and Nerves

#48
post #17

The laser scanner is kind of fancy, but you can get USB scanners for $10-$20 that present as keyboards. For me, the most interesting part of this is looking at Elixir.

In my previous life I worked on kiosks using POS equipment like this. Scanners are typically just keyboard interfaces. The barcodes are essentially very old school QR codes that actually type the information. Card swipers are the same to a degree. They read up to 3 levels of the magnetic strip and essentially type the card number and cvc into POS systems. Debugging these usually would involve opening up Notepad in Wi…

The Symbol/Motorola/Zebra/whoever-owns-the-brand-this-month li2208 is cheap and can read a phone display. I think it can decode PDF417 (? The 2D barcode on the back of your driver's license) but Im not sure about QR

Re: Show HN: Giving a Broken Barcode Scanner a New Life with Elixir and Nerves

#49
post #44
post #36

Earlier quoted context omitted.

It's worth noting that some of those cheap logic analyser only work with pirated versions of expensive logic analysers software.

While cheap knockoff analyzers often ship with pirated software (e.g. Saleae) many, if not most, work equally as well with the open source Sigrok software.

Saleae gives their software away for free, there's not any need to pirate it but still using their software is morally shady IMO because they put a lot of effort into it. I prefer Sigrok anyway, even with the actual Saleae analyzers.

Also worth noting that Sigrok loads the analyzer with open source firmware, you're not using any pirated code. The hardware is basically a clone of the original Saleae logic analyzer, but the Saleae hardware is just a standard reference implementation of a cheap Cypress chip so that doesn't really bother me.

Re: Show HN: Giving a Broken Barcode Scanner a New Life with Elixir and Nerves

#50
post #35
post #27

Earlier quoted context omitted.

bigclive works on electric / electronic stuff, and he's sometimes a bit sniffy about cheap hobbyist kit. (Fair enough when he's talking about things you use with / on mains electricity where there's a risk of death.) For RS232 any 'scope is going to be fine, even a chinese clone knockoff or an ancient second hand scope.

For decoding serial one of those $5 logic analyzers is more than sufficient, you don't really need an oscilloscope at all. I don't really like using protocol decoding on my scope unless I need to correlate timing with an analog signal because it's tedious to set up and use for a simple digital signal. https://www.aliexpress.com/item/New-Arrival-USB-Logic-Analyz...

RS232 is 12V, but a couple of resistors would sort that out.

If you're a beginner I would actually recommend the Saleae Logic Analyser over this scope, unless your routinely dealing with analog or voltages over 5.5V, the Saleae is much more useful, has serial (and other) decoders built in as opposed to having to pay extra on the Rigol, has better capture and triggers plus as a bonus it doesnt have that noisy fan going all the time.

Post reply on HN