3 ms·
That's kind of ingenious, but is sending temperature data over USB really such a hard problem in the first place? I'm not really familiar with the USB protocol.
by conistonwater 8y ago
That's kind of ingenious, but is sending temperature data over USB really such a hard problem in the first place? I'm not really familiar with the USB protocol.
- taneq 8y agoUSB doesn't work without a driver and sometimes you don't want to (or can't) install a driver. This sounds like the kind of hack that a clever (but arguably unwise) engineer would shove in to help them remotely troubleshoot a device. "Sensor not detected? OK, open up Notepad and hit Caps Lock three times quickly. Did some text appear? The sensor is fine, the problem is with your computer."
- robertAngst 8y agowhy is this unwise?
- darkpuma 8y agoHe failed to consider that people on hacker news would tut disapprovingly at his hack.
- taneq 8y agoBecause it could lead to all manner of weirdness that the user doesn't expect. Imagine someone trying to type some data into a spreadsheet and every time they hit the capslock key a strange text string appears in the cell, maybe leading to data corruption. Or even worse, it happens in some program where the typed characters are interpreted as hotkeys and instantly perform some unknown combination of actions which the user may or may not even know occurred.
- megous 8y agoIt's not that hard to pick some standard class, like CDC and have a userspace app that uses it just like a serial device. You can get info on which serial device to use via sysfs on Linux. The rest is just making up a serial protocol. No need for a special driver.
- cortesoft 8y agoWould this work for every operating system without requiring the user to do anything?
- megous 8y agoWell, define "work", "every operating system", and "requiring user to do anythig". :D Obviously you have to consider needs of your users as an engineer, when chosing any technology, for their particular problem.
- tonyarkles 8y agoIt was a long time ago, but I’m pretty sure CDC doesn’t auto-enumerate on Windows. Mac and Linux is fine. I think you still need a .inf for Windows, and for it to work generally, you need WHQL signing ($$, time). The free (money-wise) approach we ended up doing was to use WinUSB and marking the device as “vendor specific”, and using libusb to talk directly to it. That was a bit awkward, but covered Windows, Linux, and OSX for us. This was 5 years ago though. Windows 10 might directly support generic CDC devices, but Win 8.1 didn’t. Edit: sibling mentions HID. HID does work like this, but we needed more bandwidth than HID provided. CDC was perfect for what we were doing but it didn’t auto install. Mass storage auto-installs but didn’t fit what we were doing.
- ComputerGuru 8y agoUSB can and does work without custom drivers. It's the raison d'etre for HID. But that requires custom software to interface with it and parse the data or make payload requests and developers are that lazy.