Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: DonglePi, a USB Stick Giving You the Raspberry Pi IOs on a PC (github.com/gbin)
92 points by gbin on Feb 25, 2015 | hide | past | favorite | 41 comments



Very cool!

"DonglePi is released under a dual license. It is GPL for educational and personal use.

It is under a commercial license if you want to produce it and sell it."

Hm.

Am I right in thinking that it doesn't work like this? You can dual license, but you can't say "only some people using it certain (educational, noncommercial) ways may choose the GPL version".

I'm also not sure how good a fit the GPL is for hardware designs. Seems like it might be better to GPL the software, then CC-noncommercial the hardware side, with an option to pay for a commercial license.

(but of course IANAL)

Anyway, this is such a good idea and such an obvious candidate for Kickstarter that I'm surprised to see it on Github first.

[EDIT] grammar


I've seen dual licensing of software lots of times before. Though most of the ones that come to mind are "GPL, but if you don't want to have to GPL the code you're linking to it, you'll have to buy a commercial license for this", not "GPL only under these conditions."


I think this is the intent of the linked project. The wording is wrong; you can't say "GPL except for commercial products" but I think he intends to use the word "commercial" to mean "proprietary", in which case it works.

It's unfortunate because there are tons of commercial products that use the GPL (including my own product), and this perpetuates the old tired trope that libre licenses don't work on products you pay for. But my suspicion is that it's just sloppy wording rather than attempting to add an invalid clause to the GPL.


GPLv3 has a interesting hack in which it says you can ignore additional restrictions. DonglePi was gplv2, so it is sadly not applicable in this case but it would had made things interesting.


Licensing hardware under the GPL doesn't make any sense. The GPL was written to be applied to software written in compiled languages; it refers to its subject as "the Program", and places requirements on how you may "copy and redistribute" it, or make use of its "source code". It's not clear how this even applies to some types of computer applications (e.g, interpreted scripts), let alone to physical artifacts like a circuit board.


Most hardware these days has schematics and designs consisting of software. It's a fairly clear mapping between the source files and the compiled files (usually gerber files for circuit boards, EPS or DXF files for case designs, etc) that the terms of the GPL can still apply to.


I tried to follow the Qt licensing model (commercial vs non-commercial use) but IANAL either.

Honestly, the goal here is more about investing in the next design like a low latency USB3 version if somebody decides to produce this one.

As for github vs kickstarter first: I would love to bring more expertise on the project as I am more a software guy than an hardware guy.

So if anybody is interested in improving the HW design and make a kickstarter out of it, feel free to contact me !


The Qt model is basically so that people can pay a license fee and not have to follow the terms of GPL and have to make their source available.


The issue is your wording. Qt's model says it's licensed under the GPL/LGPL for anyone who wants to use it under the terms of the GPL/LGPL, whether for commercial or non-commercial use - or you can contact them for a license to get out of that.

The issue is that if you say "it's GPL so long as you don't use it commercially", that's not actually the GPL (which never mentions the commercial/non-commercial distinction), and users/developers can't combine your work with GPLed work.


IANAL either - but I believe if the author wants those restrictions they would have to modify and include a custom version of the GPL. If they did this I would stay far away as any project that included his library would automatically be licensed under his custom GPL.

I would suggest to the author to just license it under the GPL if they want it restrictive - and offer a commercial license for people who don't want to give up custom code.

I don't think a lot of people realize that a condition of the GPL is that if you distribute it in compiled form you must make available the source (exception would be server type applications like wordpress which Affero GPL was supposed to close that "loophole"). You may sell GPL software, but once someone buys it they may give it away for free[1].

[1] - http://www.gnu.org/licenses/gpl-faq.html#DoesTheGPLRequireAv...


He could very well write a custom GPL that is compatible with regular GPL, thus allowing any project to include his project to be GPL or his custom GPL, not only his GPL variant.


Except the GPL is actually non-free:

https://en.wikipedia.org/wiki/GNU_General_Public_License#Der...

However you could make a derivative, but it's of little value.


The preamble text of the GPL is non-free, as is the usage of the name GPL and GNU in it.

I could not find if GPL and GNU is trademarked, as that would serve a similar purpose.


The project would have to allow commercial use, which would contradict his custom GPL.


> Am I right in thinking that it doesn't work like this?

Yeah, it doesn't work that way, though IIRC MySQL AB originally, and for quite a while, did the same thing.


Working in CS and Systems & Control education, this is something I'd back if it were on kickstarter.


Alternately, it could hypothetically give you more IOs for an existing RPi over USB ;)

On another note, I'm pretty sure your particular dual-licensing scheme is invalid; the GPL does allow commercial use of a thing licensed under it, so people hoping to "produce it and sell it" would be legally able to do so (though perhaps with a bit of indirection, like forking it under the GPL's terms as a "personal" project, leaving out the commercial restrictions (since enforcing them would be a GPL violation), then letting someone else thus use it for commercial purposes without restriction (other than the GPL's copyleft requirements).

Unless by "produce and sell it" you mean "produce and sell it under non-GPL terms or without schematics", in which case that is acceptable and useful. In any case, clarification would be wise.


thx for the advice, I gonna look into it.


Very cool.

Only thing I don't like is that when something goes really wrong with my circuit, I could probably harm my PC. Normally I just risk destroying RPi.


Indeed, at least I've added a fuse and Schottky diodes to protect the PC but I'd love some advises on how to be sure people won't fry their USB controllers :)


An isolating transformer, like the ADUM3160 ( http://www.analog.com/en/products/interface-isolation/isolat...) should be more than overkill in protecting there.


Interesting, thanks for the pointer !


I use an Olmex isolator [1], which I believe is also based on Analog's ADuM chip. Its worth knowing that the ADuM only supports USB "Full speed" mode (12Mbit/sec) and not the normal "High Speed" mode (480Mbit/sec).

[1] http://uk.farnell.com/olimex/usb-iso/usb-isolator-1000vdc-fo...


It's awesome that you made it all open source. You could probably spin up some kickstarter since making them in bulk would be cheaper (plus you get something for all the work you've done). I'd be happy to get one.


Resettable PTC fuse for overvoltage and P-Channel MOSFET for reverse voltage protection without a large voltage drop.


Yep. Although not related to this kit specifically, a friend of mine built a energy meter much like a kill-a-watt using a raspberry pi.

It plugged into 120 vac on one side, and usb to computer on the other side. He didn't end up doing enough to isolate the 120 vac side from the usb side and fried his computer. It was pretty impressive damage as it managed to fry the motherboard, CPU and memory.


haha nice :) I made wifi power meter using $15 chinese plug watt meter and ESP8266. No api no fancy stuff, just a webpage with three numbers.


Your licensing scheme is confusing and possibly unenforceable.


Why doesn't anyone make a real PC with GPIOs? I am sure there are at least a few hackers out there who would be interested but if you want real high speed GPIOs you need either expensive hardware like a special card from National instruments or a low powered single board computer like Pi, Edison or a gumstix. I would love for Intel to breakout a nice 20 pin header on some of their boards.


On sufficiently old/industrial PCs, the parallel port is a pretty usable GPIO header, especially the more modern implementations with bi-directional pins.

It's easy to use one to switch a transistor[1], for instance, and there is a Python library to control the port[2]. An optoisolator is a good idea since computers are expensive and isolation is cheap.

The DonglePi looks nice since it will exposes I2C, SPI, and PWM. I could see it being handy to test out I2C and SPI parts before integrating them into custom boards.

1. http://www.next.gr/uploads/139-016e0f9471.gif

2. http://pyserial.sourceforge.net/pyparallel.html


Would this potentially give a PI way more GPIO pins?


A better device for this would be a [Guzunty CPLD](https://github.com/Guzunty/Pi/wiki) as a Rasperry Pi shield ! It adds a 25 additional input/output expansion lines and also protects the GPIO pins of the Raspberry Pi !


Depending on how you might want to use the GPIO pins, this is a clear yes, or no... Traditionally, GPIO is somehow a strange beast when integrated as tightly on SOCs like the Broadcom on the Raspberrypi.

On one side, it's a pretty dumb interface: You put a bit in a memory address and the output changes state. No fancy logic, everything done in software. On the other hand, it's very tightly integrated on the CPU, so you have a very fast path to toggling them.

If you really need this tight integration because you want to trigger interrupts from an external source, or want to bit-bang a non-standard serial protocol, you'll have little luck: The USB latency will make it orders of magnitude slower than "native GPIO." and the better solution will be to directly hard-code parts of the logic into the external microprocessor, and speak to this special purpose hardware.

If you are only interested in turning on- or off a few lights, one of the popular GPIO expanders via i2c will be cheaper and probably just as slow :-).

But: A huge strength of this project would be if the i2c-over-usb and spi-over-usb ports get decent native support in-kernel-support in Linux, because that's where you can get pretty decent performance with the well-defined protocols. That's something that would fill a huge gap in available products, both for the PC and the 'pi.

{I've tried to get something running on a special-purpose CH340(?) uart/i2c/spi-to-USB bridge, but unfortunately the two latter modes are severly underdocumented...}


Yes. It's a general purpose microcontroller board, programmed to provide GPIO signals via USB.

I prefer to use USB peripherals for my Pi. Peripherals that are recognized as a USB-to-serial adapter can talk to the Pi, or to any desktop PC. This lets me move my peripherals and code (mostly Python) back and forth between platforms, and do the lion's share of debugging on my PC if I want to.

My peripherals are homemade, since I also enjoy playing with microcontrollers, but something like this is nice because you can get it working and start using it without needing a bunch of esoteric development tools. Likewise with that port expander chip from Microchip.

It can be a conceptual hurdle for a beginner to master a bunch of disparate concepts, such as basic wiring, microcontroller programming, and the Raspberry Pi, just to reach "hello world" stage. Starting with a few of those things already done can be a comfort.


Sort of. This appears to be an Atmel ARM board with the pins broken out in a Pi-compatible way. I imagine you could reprogram this to act as an I/O expander, but at that point, you're probably better off just getting a dedicated GPIO expander.


PCF8574 FTW!


Look at GPIO expander chips like the MCP23008. They're only a couple bucks and give you GPIO pins you can control over the Pi's I2C bus. You can run a few of them off an I2C bus using different addresses too. Can see the chip and some tutorials for using it here: https://www.adafruit.com/product/593


yes, it is seen as a standard CDC device so you can use donglePi from a Raspberry Pi.


I can see this being really useful in its own right, but unless its 100% compatible, to be honest I don't see the use in it as a development or test platform for the RPi.


There's not much point for a development/test platform for the Pi in the first place given its ridiculously low cost.

I think the appeal here is to add GPIO directly to a PC simply because having one computer is simpler than having two, and there are a lot of cases where you'd like to just toggle a pin here and there without having a middleman machine.


Yeah, see your point. Also now I think about it it would also be good to be able to live-debug code in Visual Studio while connected to GPIOs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: