Seems reasonable under the circumstances. I don't know whether you could get your program to run the command on the user's behalf (find the bit I'd patched in the IDE, duplicate my patch, restart the program) or if as well as running sudo adduser... he'd have to logout/login to get the changed group membership to stick.
In any event I congratulate you on actually /knowing/ about the dialout group, rather than (as so many do) saying "run this as root" :-)
Hmm, I wonder. I've not tried this, but if your program used a variation on my patch to apply the relevant POSIX capability to its own binary, then restarted itself (by invoking the binary and exiting) it might /just/ be possible to get access to the port without having to logout/login.
MarkMLl