The most full featured Scratch-like environment for coding, to my knowledge that is close to your listed criteria is http://www.mblock.cc/
It currently in beta development for enabling bluetooth uploads and supports a range of "extension" plugins. I believe you can also add functionality by writing your own extensions if you have sufficient programming knowledge.
Your requirements for the software might be a little steep. Expecting a children's visual design tool to be able to provide a graphical API to libraries written by an open source community is quite a coding challenge. You can get a feel for this by trying to use any reverse engineering C++ to UML diagram tools.
I recommend perhaps using one of these scratch tools to build simple firmware as a learning tool with the idea of progressing to an actual programming language soon after.
In any case I hope you find what you're looking for among these options for your project.