News for hackers. Stuff that matters.
Re:How does USB device discovery work? [video] by amelius on Sunday July 11, 2021 @04:48PM (#27804428)
Kind of disappointing that his probably very expensive digital oscilloscope can't record the entire protocol. I mean, what is the price of ram these days?

And note that (since it's a digital signal) you don't have to sample evenly; you can also record the timepoints of the edges.

Re:How does USB device discovery work? [video] by snakke on Sunday July 11, 2021 @05:38PM (#27804687)
You're not wrong that the price of ram isn't that much these days. However, this is not simply a case of adding more ram and be done with it. There is a significant amount of extra engineering to be done.

It would in the grand scheme of things be rather easy to "just add ram" but that's not how the product lines work for oscilloscopes. It's a bit like asking "Why does Intel price their high-end chips so high? It's not like the silicon is that much more expensive or yields that differ so much that they're 500% more expensive? And the consumer chips don't even support all the features that their Xeon's do!"

And you're right, it's a digital signal, and in the normal world you would just use a logical analyzer and do it like you said. But this is for educational purposes and seeing the same tool and the actual edges is a great and clear example. That's not to say that oscilloscopes aren't useful for debugging digital signals. After all, seeing the exact glitch might help in some cases.

So yeah, basically it's a combination of product differentiation and not the entirely right tool for the job.

Re:How does USB device discovery work? [video] by AussieWog93 on Sunday July 11, 2021 @07:17PM (#27805319)
I have designed and commercially released an open source (USB) oscilloscope.

There is absolutely no reason you can't just add more RAM (and a memory controller), or even add user upgradeable memory. If the big players don't do it, a newcomer will and they'll fall further behind the curve.

Re:How does USB device discovery work? [video] by BugWatch on Sunday July 11, 2021 @11:07PM (#27806517)
Could you provide more information, please? Thanks.
Re:How does USB device discovery work? [video] by AussieWog93 on Monday July 12, 2021 @01:19AM (#27807291)
I'm not quite sure what you mean.

There is no technical barrier that prevents an oscilloscope manufacturer from adding a DRAM controller to their designs, either via an IC or as an IP core in their main FPGA.

The cost would be relatively low, too, and long traces are extremely useful especially for beginners.

Market forces will work to make this a reality.

Re:How does USB device discovery work? [video] by gsich on Monday July 12, 2021 @03:38AM (#27807992)
He probably wants a link to your scope.
Re:How does USB device discovery work? [video] by AussieWog93 on Monday July 12, 2021 @09:00AM (#27809779)
Oh yeah, that was dumb of me.

https://espotek.com/labrador

Doesn't have an on-board DRAM controller, but I did look into the feasibility of it early on. In the end, I decided it was easier to just use the memory of the attached PC. Can record 10s of continuous data without dropping a single sample.

Re:How does USB device discovery work? [video] by gsich on Wednesday July 14, 2021 @02:47PM (#27836795)
Thanks!
Re:How does USB device discovery work? [video] by gruez on Sunday July 11, 2021 @05:29PM (#27804646)
>I mean, what is the price of ram these days?

It's probably more of a bandwidth issue than a memory issue. USB 2.0 runs at 480 Mbit/s, so if the oscilloscope can decode that, it would have to be able to output/store at least that much in terms of bandwidth. A USB keyboard would never hit that type of bandwidth, but presumably a buyer of such expensive oscilloscope would expect the feature to work every time, rather than only in best case scenarios.

>And note that (since it's a digital signal) you don't have to sample evenly; you can also record the timepoints of the edges.

Depending on the signal characteristics this can actually be worse. eg. if it switches very rapidly you'd probably be better off storing the reading as PCM or something, because the timestamps (which are presumably nanosecond level) would take more space to record than the raw sample reading (a few bits at most).

Re:How does USB device discovery work? [video] by amelius on Sunday July 11, 2021 @05:31PM (#27804653)
> It's probably more of a bandwidth issue than a memory issue.

Yeah, but you can use multiple banks and write in a round-robin fashion.

> Depending on the signal characteristics this can actually be worse.

Of course, that was only an example. You should probably do something like runlength encoding.

In any case, the USB protocol is much slower than modern hardware can handle, so certainly doable.

Re:How does USB device discovery work? [video] by AussieWog93 on Sunday July 11, 2021 @07:20PM (#27805340)
Consumer grade DDR4 modules have a bandwidth of 25.6 GB/s. Even at 10 samples per bit you're laughing.
Re:How does USB device discovery work? [video] by garaetjjte on Sunday July 11, 2021 @07:17PM (#27805322)
AFAIK Keysight MegaZoom uses ASICs with on-chip sample memory, so that's why it's relatively limited. You can get oscilloscopes with more conventional architecture with FPGA connected to boatloads of external DRAM, but it comes with other tradeoffs. (usually much lower wfm/s)
Re:How does USB device discovery work? [video] by _trampeltier on Sunday July 11, 2021 @05:46PM (#27804724)
As you have seen, he could record the entire protocol with segmented memory. There is also a type of instruments called "logic analyzer" or mixed oscilloscope, where you just watch a digital signal, one or zero. The analog scope signal does say so much more than just one or zero. Of course he didn't needed really the analog signal, but it looks nice.
Re:How does USB device discovery work? [video] by towergratis on Sunday July 11, 2021 @09:19PM (#27805940)
Because it is not the right tool for the job.

A cheap logic analyzer, like DSLogic, would probably work much better for the specific use case.