BadgeHacker Quick Loader available for #hackablebadge
Ken Gracey
Posts: 7,392
in Propeller 1
Hey all,
A while back we posed this question: http://forums.parallax.com/discussion/162392/need-a-quick-loader-and-downloader-for-hackable-electronic-badge
We found a developer (Propeller IDE programmer Brett Weir) and specified what we wanted in the tool. This tool has now been created and you can download it and try it for yourself at https://github.com/parallaxinc/BadgeHacker/releases
BadgeHacker is an open source tool that downloads firmware and allows for really fast configuration of your Parallax Hackable Electronic Badge. You can enter your name, make it scroll, turn on certain LEDs, and upload contacts that have been stored on your badge.
The first commercial user of BadgeHacker is the Serpentine Gallery in London. They're adorning many guests with the Hackable Electronic Badge as they walk into the door of the new Simon Denny gallery.
Let us know what you think!
Ken Gracey
A while back we posed this question: http://forums.parallax.com/discussion/162392/need-a-quick-loader-and-downloader-for-hackable-electronic-badge
We found a developer (Propeller IDE programmer Brett Weir) and specified what we wanted in the tool. This tool has now been created and you can download it and try it for yourself at https://github.com/parallaxinc/BadgeHacker/releases
BadgeHacker is an open source tool that downloads firmware and allows for really fast configuration of your Parallax Hackable Electronic Badge. You can enter your name, make it scroll, turn on certain LEDs, and upload contacts that have been stored on your badge.
The first commercial user of BadgeHacker is the Serpentine Gallery in London. They're adorning many guests with the Hackable Electronic Badge as they walk into the door of the new Simon Denny gallery.
Let us know what you think!
Ken Gracey
Comments
Ray
All functions seem to be working on this platform. Pretty Cool!
What is the "send" icon supposed to do?
That sends your updated contact information to the badge. This may be redundant as I believe some of it happens on the fly. The command parser in the badge allows you to send items one element at a time or in groups.
Jon
Ray
FWIW, over the holidays I'm going to attempt my own badge GUI that is a very simple replacement for the terminal interface. BH is actually quite complicated under the hood, and I want something simpler to play with for myself (though I don't mind changing things through a terminal).
Verified, change line 145 to 14 NOV an all is fine.
Anyway, expect another BH update shortly. I'm not going to post it because the changes are so small and BH has to be modified to deal with the new PING response.
I'm thinking of using this project as a means for learning B4J (BASIC for Java). I don't program in C well enough, nor understand how to us Qt, so I'm taking a whole new road.
https://github.com/parallaxinc/BadgeHacker/releases/tag/0.6.2
On mine, doing a trial run, I keep getting 'Simon Denny' to appear, I guess somewhere along the line that will disappear. The nearest I can tell, with this version, you can place a name on your badge, and maybe have the badge send your selected data to another badge. Since I have two badges, I never got the send part to work between the two badges, I assume it is supposed to be auto magic.
Also when you plug in, and have the BH program running, I thought that the program would load up with the name that is on the badge, and then given a choice to update the specific database file with new contact information, if the badge was exposed to another badge that was handing out information.
Any insight as to where this program is heading, feature wise?
As for the BH program internals I see it is all in Spin, but I did not see where and when openspin.xxx got loaded, I assume that is how the badge gets programmed? Since BH is using QT, why didn't it just use all the programs in a C format as opposed to using Spin and C?
Ray
The badge code came long before the idea of BadgeHacker. I was asked to write the badge code, and as I don't write in C, I chose Spin, the native language of the Propeller. I translate interesting C code to Spin all the time. I'm going to live on the assumption that any person claiming to be a C programmer can translate my badge code to C. In fact, I think Andy Lindsay has a port of the original code (pre serial commands).
After Parallax released the badge they were contacted by a non-technical client for an event. Ken asked me to add the ability to change badge information without having to download new code. I did this by adding my parser object which "listens" to the serial port and processes known commands. If you connect a terminal at 115200 baud you can do this:
NSMSG Jon McPhalen
This will set the non-scrolling message (badge name) to my name. If you want to add spaces and other non-alphanumeric characters you need to put them in quotes -- like this:
SMSG "Jon McPhalen" "I Wrote The Badge Code"
This will change the lines in the scrolling message. To activate scrolling you would type:
SCROLL YES
You can find all the details of the parser commands in the Spin source code -- including one that's not documented in the Help output to the terminal (PING). After the parser was installed and working through a terminal, Ken asked me if it would be possible to create a GUI for people that don't visit these forums could use with the badge. I told him it was possible, we just need to have a GUI that will send the same things we can type into a terminal. I have in fact done this with simple Android apps controlling a Propeller on the DEF CON 22 badge that has been hacked with a Bluetooth radio. As Brett Weir is writing the x-platform PropellerIDE program, he was the natural person to ask about creating the BadgeHacker GUI. For the last couple of weeks Ken, Brett, and I have worked closely to make sure that it all works as smoothly as we can make it.
This lets one light the badge as they please. The user LED status is maintained between power cycles and returns after then logo demo. It's just decoration. That non-technical event I referenced had to do with an art gallery.
Hopefully this sheds a bit of light. The badge was originally created for people like us who jump head-first into programming. Non-programmers wanted to put them to use so we added a parser that one can use to change badge text through a simple terminal. Finally, the BadgeHacker x-platform app was created so that non-technical types didn't have to go looking for a compatible terminal.
I hope that clarifies things. It's open source for a reason. Jump in a create your own versions!
After I did some initial programming using PropGCC, and the Badge, I came away with the feeling that using an App approach could be a way to go, instead off having to create specific programs every time you wanted to do something with the Badge, over and over again. Need something that is a little more automated. I did not even get into the gathering and transferring of data between the Badges, I need a different way to go with that, again changing the initial program, again and again is getting tiresome.
You mentioned B4J, so I downloaded that, and installed it on my Win 7 box, now I will see how far I can get with, going the Java way. I was also surprised that the Aps that are created, can be run on Linux and other platforms. I remember back a few years ago when jazzed was working with QT and providing source for SimpleIDE, I looked at the QT platform and found that very difficult to deal with. I hope B4J does not turn out the same way.
I am glad that this thread came up, now it has brought up some interest for me, and maybe I will have to finish up what I started before. Thanks again.
Ray
I was trying to follow your other threads dealing with battery and such in C, but I was having such a problem setting up SimpleIDE.
I don't do C, but I want to learn. I am going to have to delete all instances of SimpleIDE and do a new install.
I am looking forward to trying your and Andy's programs.
You guys have done some amazing stuff with the badge and GUI. I am impressed.