RFID Reader Software (VB.NET)
Chris Savage
Parallax EngineeringPosts: 14,406
Attached is an application created in Visual BASIC 2005 Express which allows a Parallax RFID Reader connected to a PC to read tag data. This application has a small form which allows you to select and open the COM Port for the RFID Reader·and Enable or Disable reading as necessary.· By default the RFID Reader is enabled when the COM Port is opened.· Optionally·you can trigger·a System Beep during each read. ·The Reader is disabled for·1.5 seconds after a read.· This·delay is provided to avoid duplicate reads.· The Reader is then re-enabled.· Once tags are read into the Text Box they can be copied into a database or other application, speeding tag entry.
·
The RFID Reader is connected to the PC using the schematics provided at this link.· The specific schematics are the transistor-based and MAX232 based plans (both use the DTR line for /ENABLE control).· Of course, for those who wish to use our RFID Reader in PC-based applications we will also be releasing a USB version soon.
·
NOTE:· The source code and application attached below is free and open-source but is not supported by Parallax Inc.· I will try to answer the questions I can in this thread, however, I am hoping that those who have the RFID Reader and know VB programming will be able to help create a better community-supported free application.
·
For those that are interested in modifying or enhancing the application, Visual BASIC Express 2008 can be downloaded free from the Microsoft website at http://www.microsoft.com/express/vb/
Copyright (c) 2008 Parallax Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Post Edited (Chris Savage (Parallax)) : 5/22/2008 10:06:52 PM GMT
·
The RFID Reader is connected to the PC using the schematics provided at this link.· The specific schematics are the transistor-based and MAX232 based plans (both use the DTR line for /ENABLE control).· Of course, for those who wish to use our RFID Reader in PC-based applications we will also be releasing a USB version soon.
·
NOTE:· The source code and application attached below is free and open-source but is not supported by Parallax Inc.· I will try to answer the questions I can in this thread, however, I am hoping that those who have the RFID Reader and know VB programming will be able to help create a better community-supported free application.
·
For those that are interested in modifying or enhancing the application, Visual BASIC Express 2008 can be downloaded free from the Microsoft website at http://www.microsoft.com/express/vb/
Copyright (c) 2008 Parallax Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Post Edited (Chris Savage (Parallax)) : 5/22/2008 10:06:52 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
http://msdn.microsoft.com/en-us/vbasic/bb466226.aspx?wt.slv=RightRail
The database keeps a record of who each tag is assigned to and displays it in the log window. It also allows for editing and deleting. In addition to displaying the tag number the string was extended to include the user name and a time stamp to create an attendance record.
The source (VB solution) is too big a file to upload here but if anyone wants it PM your email and I will forward it.
If there are any problems or questions please let me know.
Jeff T.
EDIT: I forgot to include the setup files in the executable zip so I attached here as setup.zip, extract all files to the same folder.
Post Edited (Unsoundcode) : 9/5/2009 3:53:57 AM GMT
That is great! It looks pretty simple to use as well. Congratulations on being the first to customize and post something! Out of curiosity, how large is the source files zipped?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
The database is very simple to design if you follow the Microsoft tutorials and requires practically no coding.·After designing the database the tutorial goes on to show you how to connect it to a project. All that I did was to create the database and add it in to your source. The only code that I put there was two short sub routines that check to see if the tag is new. That code has a couple of lines that one might find·of use, it took me a while to figure it out.
If you would like the source let me know, it also has a search feature now.
Jeff T.
I would like to see what you have done, especially since you've already done the research and put the time into it. I have an e-mail link to the left. If you could mail it there I would be most appreciative. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
What is the password?
Thank you Chris. [noparse]:)[/noparse]
This looks like a great program.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller RECONAUTOR
If you like my avatar then check this out Propeller Domed Stickers for sale
Building Blocks To The Propeller Chip
Can someone please test this program? Thank you
I don't have all the features working but It would be nice to know if I am on the right track and I don't own an RFID reader.
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller RECONAUTOR
If you like my avatar then check this out Propeller Domed Stickers for sale
Building Blocks To The Propeller Chip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Did you have the same problem with the code I posted with the database. It uses the original source with Chris's certificate.
I tried·the CG_RFID·the interface opened but·threw an exception when it received data.
Jeff T.
EDIT Chris, forgot to mention I emailed the database source did it get through. I have problems with attachments and my server at times.
I also uploaded the setup files again as there might have been confusion with them being two seperate files in my previous attachment.
Post Edited (Unsoundcode) : 6/5/2008 6:17:56 PM GMT
Yes, I did get the code; sorry…I get so much e-mail that I usually prioritize them by urgency. Sometimes that makes me forget the non-urgent ones for a few days…lol
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I just unchecked the "Sign the ClickOnce Manifest" checkbox under project settings->signing.
@Everyone
Is there a way I can test my code. I have a spare BS2 laying around and a BOE.
Could I write a short BS2 program to emulate the RFID reader, perhaps sending random Id's every 10 seconds?
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller RECONAUTOR
If you like my avatar then check this out Propeller Domed Stickers for sale
Building Blocks To The Propeller Chip
go to the application properties - look under 'signing' and 'security' and uncheck references to 'Clickonce' manifests .. you can then remove the .pfx file from the assembly..
for more info have a read about crypt32.lib and crypt32.dll ...and clickonce manifests..
Rgds,
John
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
Computer Guy this code will emulate two RFID tags at 10 sec intervals
main:
PAUSE 10000
SEROUT tx,baud,[noparse][[/noparse]10,"1234567890",13]
PAUSE 10000
SEROUT tx,baud,[noparse][[/noparse]10,"0987654321",13]
GOTO main
Jeff T.
Can someone please test this. It works with my BS2 RFID emulator however so does the previous version uploaded, and it didn't work for Jeff.
Jeff do you have the latest version of the .net framework. perhaps thats why it didn't work?
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller RECONAUTOR
If you like my avatar then check this out Propeller Domed Stickers for sale
Building Blocks To The Propeller Chip
The time was formatted better on the second.
One small thing, a line feed or carriage return is being appended to the Tag ID
How did you create the database BTW I would be interested to look at your solution.
Jeff T.
I will upload my code sometime today. Have some house work to finish first.
I am yet to implement a database, however I am using a DataGridView component to display the Tag ID and time data.
When a tag is scanned I check to see if it exists in the DataGridView (something like)
Like I said I will upload my code later today.
Hope that helps.
Will be adding a database feature later today as well. I am thinking of using XML or MDB.
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller RECONAUTOR
If you like my avatar then check this out Propeller Domed Stickers for sale
Building Blocks To The Propeller Chip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
More is yet to be added.
@Chris
Yes, because I don't have an RFID reader and therefore don't understand the operational characteristics as much as most people on this thread it took me a while to realise that the DTR was the cause of the BS2 not functioning properly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller RECONAUTOR
If you like my avatar then check this out Propeller Domed Stickers for sale
Building Blocks To The Propeller Chip
No problem…I think to some degree it’s a learning exercise for us all. I know that the most extensive programs written for this module won’t even be seen by most of us because they’ll be proprietary and used within a company/business.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I have also uploaded the source for those interested.
To enter or edit a name just click on a cell and start typing or press F2. To finish editing click somewhere else or press Enter.
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller RECONAUTOR
If you like my avatar then check this out Propeller Domed Stickers for sale
Building Blocks To The Propeller Chip
Post Edited (computer guy) : 6/12/2008 7:53:39 AM GMT
Also if there are any features that people would like I would be happy to add them. Unless they want to add it themselves
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller RECONAUTOR
If you like my avatar then check this out Propeller Domed Stickers for sale
Building Blocks To The Propeller Chip
First of all i would like to say this forum is awesome.
Okay, i've downloaded the rfid reader source from the first post.
When i run the program, there's an error saying the datetimeoffset is not defined.
I've tried defining it but it still doesnt't work.
Did i define it wrongly?
Any idea how i should define it or get around this problem?
The picture is attached below.
Thanks in advance.
I'm using Microsoft Visual Studio 2005 by the way.
Post Edited (matnosg) : 9/23/2008 1:14:25 AM GMT
Anyway here's another way to get around it for now and perhaps introduce a new concept. The line thats giving an error is only a 1.5 second timer so use the following code in place of the error line and in place of the DO..LOOP.
Dim mytimer As New Stopwatch
Do Until mytimer.ElapsedMilliseconds > 1500
mytimer.Start()
Application.DoEvents()
Loop
mytimer.Stop()
mytimer.Reset()
Jeff T.
Which version of VB are you using? If it is prior to 2005 that function may not be defined. See Jeff’s work-around. That section of the code is designed to generate a 1.5 second delay. Feel free to make any changes you like to the code to make it useful for you. You may also post any updates or additions you think others will benefit from. I hope this helps. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
to just read the tag or plz guide me to any way to read the tag by using Javelin Demo Board with serial RFID reader
Regards
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
how i can do that because i am really stuck with that [noparse]:)[/noparse]
regards
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
how that can done do i need to change anything in javlin code and which part ?? thats all and also the same in VB code if i need to change anything
Thanks a lot for your appreciated and useful help [noparse]:)[/noparse]
Regards