RFID Reader Software (VB.NET)

2456

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited October 2008 Vote Up0Vote Down
    The two options were mutually exclusive. You would either do one or the other. If you don’t know how to program in Visual BASIC then your options are reduced down to the Javelin code and in that case you should really post in the Javelin Forum on this since that’s where you would get that kind of help. As far as what the RFID software is looking for, it just wants the same data that the RFID Reader currently sends out. So to modify your Javelin program to do that is what you’re probably looking for. This thread is for supporting the RFID software itself so that is why I recommended you post in the other forum, so you’re on topic.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
    Chris Savage | Engineering Tech | Main Office: (916) 624-8333 | Direct to Tech Support: (888) 997-8267 | Website | Twitter | Google+
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited October 2008 Vote Up0Vote Down
    Chris, and others interested in javelin code for the RFID reader

    Feel the beat started a javelin thread here:
    http://forums.parallax.com/showthread.php?p=758477

    and I posted a javelin class there.

    @Feel the beat,
    Please post new questions regarding the rfid reader
    in the above thread.

    regards peter
    ·
  • matnosgmatnosg Posts: 7
    edited November 2008 Vote Up0Vote Down
    transdot.gif
    Thanks·Unsoundcode and Savage.

    It works but it can't detect any tags. Can anyone guide me with the parallax rfid reader connections with the board of education for the rfid reader program to work? thanks
  • UnsoundcodeUnsoundcode Posts: 1,429
    edited November 2008 Vote Up0Vote Down
    Hi·matnosg, if you are using the BOE I assume you are interfacing to the PC through the Stamp, if this is the case can you post the code , as an attachment , that you are using with the Stamp

    If you have tried to connect the RFID to the BOE can you describe the connections you·have tried·between the RFID and BOE.

    Can you also say which Stamp module you have in the BOE.

    Jeff T.
  • matnosgmatnosg Posts: 7
    edited November 2008 Vote Up0Vote Down
    Unsoundcode im using the rfid reader program that you sent me through email. i couln't upload it since the size is too big.
    but here's the basic stamp editor code i used to program my basic stamp 2 module.

    For the parallax rfid reader, i connect it to the boe using this connection shown in this website http://www.parallax.com/dl/docs/prod/audiovis/RFID-Reader-v1.1.pdf
  • UnsoundcodeUnsoundcode Posts: 1,429
    edited November 2008 Vote Up0Vote Down
    This code is from an earlier post in this thread, download this to your Stamp and see if the RFID PC software is working, if thats ok then we can add some more code to test the Reader.


    main:
    PAUSE 10000
    SEROUT 16,16780,[noparse][[/noparse]10,"1234567890",13]
    PAUSE 10000
    SEROUT 16,16780,[noparse][[/noparse]10,"0987654321",13]
    GOTO main

    Jeff T.
  • matnosgmatnosg Posts: 7
    edited November 2008 Vote Up0Vote Down
    yes it works.
    but how do i make the rfid reader being able to scan my tag id?
    is my connections on the boe correct?
    do i need to take out the basic stamp 2 module for the reader application to work?

    thanks!

    ·
  • UnsoundcodeUnsoundcode Posts: 1,429
    edited November 2008 Vote Up0Vote Down
    No try the following code with the RFID reader first matnosg,

    TagID Var Byte(10)
    main:
    LOW 0
    SERIN 1,396,[noparse][[/noparse]Wait($0A),STR TagID\10]
    HIGH 0
    PAUSE 100
    SEROUT 16,16780,[noparse][[/noparse]10,STR TagID\10,13]
    PAUSE 100
    GOTO main

    you may have to go into the VB code and comment out all the references to DTR, try this first and tell me what happens.

    Jeff T.
  • matnosgmatnosg Posts: 7
    edited November 2008 Vote Up0Vote Down
    thanks unsoundcode it works now.
    thank you alot!
  • matnosgmatnosg Posts: 7
    edited November 2008 Vote Up0Vote Down
    Sorry for the trouble again.
    After some editing, i ecountered some problem.
    I insert the tag id manually to the rfid.mdf table in visual studio before running the program.
    When i insert one tag id in the rdid.mdf table, the program works.
    but when i insert more than one tag id in the rfid.mdf table, it doesnt work.
    Instead of showing the tag id and details in the textbox, the message box "New tag found" pops up and only after that it shows the tag id and details in the text box.
    What should i edit in the prgram codes? Thanks in advance

    I've attached the reader application which i edited from Unsoundcode's rfid reader program
  • CarlDCarlD Posts: 7
    edited November 2008 Vote Up0Vote Down
    matnosg said...

    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?

    I'm using Microsoft Visual Studio 2005 by the way.
    DateTimeOffset is new in .NET 2.0 SP1.· Sounds like you're on plain VS 2005 w/o SP1.
  • UnsoundcodeUnsoundcode Posts: 1,429
    edited November 2008 Vote Up0Vote Down
    Hi matnosg, the database is something I added in to Chris Savage's code using the tutorials from the Microsoft web site so·that particular·side of things is not supported here in this forum. It was intended as more of a simple·example on how to take his program a step further for anyone that was interested.

    Having said that it does work and has potential for improvement, if you PM me I will try and answer any questions on the program as it stands if you want to expand on it you will need to look to the Microsoft site.

    With regard to the problem you have now firstly the idea is to swipe the tag then enter the users data before issuing the tag, you must hit the save icon before closing the program. If you are running the program in debug mode the data will not be saved unless adjust one of the properties of "RFID.mdf" in solution explorer. The property is "Copy to Output Directory = Copy if newer"

    hope this helps

    Jeff T.
  • bdbbdb Posts: 30
    edited December 2008 Vote Up0Vote Down
    Hello Chris,

    First, thanks for posting the program. I have just gotten the USB version of the RFID reader and this was a great way to test it and see that everything was working before I tried some coding on my own.

    On a realated, I am developing a Python program to read the RFIDs (it looks like, for reading a serial port, the pySerial module is the best shot, USPP doesn't have the methods I want and I'm just starting to look at pylibusb - but my impression is that using it would be smashing a mosquito with a sledge hammer - although I could be wrong - I chose python because I'm tryiing to learn it).

    At this point, I'd be happy to email directly, but I need to put in a better reading routine (right now, I misread about 1/10 events - dropped digits) and I also need to figure out how to have the program dectect which COM port is the RFID Reader (which I can probably do with pylibusb). Once I've improved it a little, I'd be glad to post to the forum if you think that would be helpful.

    I tried to look at your code, but I've never used Visual Basic (or any of the Microsoft Visual suites) and can't find a full listing of the code events. A big part of my development was running your code and using portmon to see the info passed back and forth to the reader so I knew what to do with Python. So again, thank you so much.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited December 2008 Vote Up0Vote Down
    Hello,

    There is no way to detect which serial port the RFID Reader is on unless it is sending data. If you want to make it detectable in an end user application you can employ some sort of loopback scheme as we do on our development boards so that the software can identify which port has a board connected to it.

    I am not very familiar with Python, but reading the device serially is essentially the same whether it is a serial or USB RFID Reader. To the PC it is simply a COM port. As far as what is happening it is actually pretty straightforward. I can break it down for you and hopefully this will help.

    When a tag is waved near the RFID Reader and the reader is enabled it automatically sends out a 12-byte packet of data. This packet is always 12 bytes and always begins with $0A and always ends with $0D. The 10 bytes in between correspond to the actual tag ID information being sent.

    The DTR line is used to enabled/disable the RFID Reader. DTR must be HIGH to enable the RFID reader. Once a valid tag is read DTR is generally brought LOW to prevent additional tag data from ending up in the PC serial port buffer. Usually this is around 1 to 1.5 seconds and the unit is then enabled again.

    As with any RF system it is possible to get invalid tag data from noise. You need to handle this in your code. The Reader still retains the 12-byte format, however the tag data may not match any tag. I hope this helps. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
    Chris Savage | Engineering Tech | Main Office: (916) 624-8333 | Direct to Tech Support: (888) 997-8267 | Website | Twitter | Google+
  • sreesree Posts: 1
    edited December 2008 Vote Up0Vote Down
    unsoundcode,

    could you please send me the source code for your rfid software in vb??

    my email: sreesankar123@gmail.com
  • LibadLibad Posts: 8
    edited January 2009 Vote Up0Vote Down
    Hello to all Im rather new to Parallax-rfid readers-and Visual Basic

    and after learning/looking around I notice that there are really no· apps for Rfid reader's·besides custom software so·I decided to build an app that the everyday person could use.

    the app can

    log you out of window's,

    launch a net url in your default browser or·the browser built into the app which happen to display your picture, name, id and play media right from inside the browser it self

    set a picture to each id

    set media like playlist of movie's picture's and Music to each id

    play media in app browser or in app media player or even your default player

    open app of your choice on scan

    user's password protected

    and a little more, its easy to use, and was made using the serial port

    I add to it every day so what it will do always changes

    I have added the shell(textbox.text) this way in a sense do what you want

    I did not post the software here but if you want it email me [url=mailto:ttec518@aol.com]ttec518@aol.com[/url]

    to connect I used the max232 line driver with 4 capacitors usb cable and serial cable the usb is for 5v without extra parts but it can be done all in one I made more than one cable, the data sheet for the ic tells the story of·where the capacitors should be.
  • tpw_mantpw_man Posts: 276
    edited January 2009 Vote Up0Vote Down
    This is kinda sorta a modification, but I made a version for Mac using REALBasic. It does the same things as the VB.net one, but has a different interface, and tells the time the Tag ID was recorded. The source is attached, but how should I attach the executable? Unfortunately REALBasic generates horrendously large executables (9.1 MB!!) and cannot be zipped down to 2MB.
    In case you were wondering about the tags in the pic, my RFID reader has not arrived yet [noparse]:([/noparse], so my prop is sending out random tags every second.

    EDIT: Macintosh executable and source code now downloadable HERE.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1011, so be surprised!


    Advertisement sponsored by dfletch:
    Come and join us on the Propeller IRC channel for fast and easy help!
    Channel: #propeller
    Server: irc.freenode.net or freenode.net
    If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com

    Post Edited (tpw_man) : 1/10/2009 10:25:51 PM GMT
    609 x 431 - 47K
  • SRLMSRLM Posts: 5,036
    edited January 2009 Vote Up0Vote Down
    You could post the executable on a webpage, and link to it. That's what I do with pictures, since Chrome (my browser) doesn't support the upload dialog. I use pages.google.com, but apparently it's no longer available to new users.
  • JamesDoughertyJamesDougherty Posts: 48
    edited January 2009 Vote Up0Vote Down
    I have never personally done any programming on a Mac, but I had a friend years ago that I did game programming with that swore by·Cocoa (I think that's the name of it). Anyway, Have you tried that to create it? It should produce a pretty small executable·since it is C/C++ based. Could be worth a shot.
    tpw_man said...
    This is kinda sorta a modification, but I made a version for Mac using REALBasic. It does the same things as the VB.net one, but has a different interface, and tells the time the Tag ID was recorded. The source is attached, but how should I attach the executable? Unfortunately REALBasic generates horrendously large executables (9.1 MB!!) and cannot be zipped down to 2MB.
    In case you were wondering about the tags in the pic, my RFID reader has not arrived yet [noparse]:([/noparse], so my prop is sending out random tags every second.

    EDIT: Macintosh executable and source code now downloadable HERE.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James Dougherty

    Ariel Productions
    http://www.arielproductions.com/
  • JamesDoughertyJamesDougherty Posts: 48
    edited January 2009 Vote Up0Vote Down
    While I am at it, I might as well give a different version as well. Here is a C# version that has events, error handling, etc all in a class for the reusable factor. I'm working on a more generic version that isn't so geared toward the RFID, but serial communication in general. I would like to go more low level using some Kernel32 API to see if I can build more of a "sniffer" as well so it doesn't lock the com port. It might be possible using the createfile() function with the read/write flags or may have to be done using ASM. Anyway, now I'm just rambling; have a good one.

    http://forums.parallax.com/showthread.php?p=774539



    @Parallax - What interface do you use in the debug terminal? Is this an inhouse custom activex (or whatever) or is it something you purchased? I like how you have the activity indicators on there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James Dougherty

    Ariel Productions
    http://www.arielproductions.com/
  • tpw_mantpw_man Posts: 276
    edited January 2009 Vote Up0Vote Down
    The activity indicators are probably little images that get changed on events. Also, I don't think Cocoa programming would be any different from Windoze programming, which looks horrible to use(at least to an 11 year old). I'm more at home with little command line knickknacks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1011, so be surprised!


    Advertisement sponsored by dfletch:
    Come and join us on the Propeller IRC channel for fast and easy help!
    Channel: #propeller
    Server: irc.freenode.net or freenode.net
    If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com
  • JamesDoughertyJamesDougherty Posts: 48
    edited January 2009 Vote Up0Vote Down
    @tpw_man - Sure it looks horrible when you don't understand it. High level languages are nice, but you have to remember that they are high level (usually for RAD). Everything has it's place and purpose. Cocoa is different from Windows because you have a diferent file system, the sockets are programmed differently, etc. Sure C is C and C++ is C++, but the environments are different. So if C/C++ looks ugly on Windows then it would look ugly on Mac, *nix, etc. as well then; right? Just remember one thing... It may look ugly, but it's very fast and low level (hence the reason C/C++ is used for game programming). With that being said, I mostly use VB.NET and C# .NET for the software I write for my clients (I still do VC++, VB6, etc. to support older clients). When you can save time and write the program in half to a quarter the amount of code and time then why not.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James Dougherty

    Ariel Productions
    http://www.arielproductions.com/
  • tpw_mantpw_man Posts: 276
    edited January 2009 Vote Up0Vote Down
    Sorry, I actually meant the GUI layer. But I chose REALBasic because of its nice cross-platform(i.e Mac) code and easy GUI development. I use C++ for an array of little command line knickknacks that I wrote. But I feel we are going off topic a little bit.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1011, so be surprised!


    Advertisement sponsored by dfletch:
    Come and join us on the Propeller IRC channel for fast and easy help!
    Channel: #propeller
    Server: irc.freenode.net or freenode.net
    If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com
  • LibadLibad Posts: 8
    edited January 2009 Vote Up0Vote Down
    Hello to all!

    ·Well now that I have learned a bit more about RFID readers, Im ready to finish my inital project which is Automation, so far·I have made my computer do lots of stuff·when scanning tags, if the id's·match·(open close things·play media shutdown ect.). Im not even sure what·I am trying to ask but here it go's

    I would like to turn things on off via serial port·I know for this·I need relays of all sizes depends on what im turning on/off- Question can·I use BS2 for this instead of serial port?

    Next is IR sender reciver- Now I know how to build this but the way I do it is not actual processing of code just measuring pulses on the line-problem is I have no idea if I send these pulses to the ir sender if it would work,plus it's slower, can/will a BS family member work for this and do a better job?shakehead.gif

    Lastly is I would like to open my safe with the rfid, now·I know this can be done with the BS2 but I would like one rfid reader to take care of everything (computer+safe) can the sout pin of the rfid reader be shared by the computer and the BS2? (If I put 1 id# in the BS2 for the safe the it should only open with that id tag right? and the computer will not do anything beside log the time/id#/name safe)

    Im sorry if·I sound crazy but my goal is complete Automation I plan on having a reader in each room and as you scan in from room to room at least 40% of the room setting change (tv.music.tv stations.lights.ect) I would also like to add a phone feature to this but I dont have much to go off of with that beside using the computer modem which im not a fan of.

    thanks so much for any help in advance and thanks for letting me post here

    FYI: MY program now can save and retrive user and there settings it also now logs the date/time id# and name attached to id# not to metion that the browser for the program has a notepad built into it for easy note taking without leaving the browser right along with your fav playlist and user picture

    [url=mailto:TTEC518@aol.com]TTEC518@aol.com[/url]
  • JamesDoughertyJamesDougherty Posts: 48
    edited January 2009 Vote Up0Vote Down
    @Libad - Post this in "The Sandbox" as you will A) get a better response there and B) you wont derail the thread like I almost did blush.gif Maybe a mod can move it there for you and then remove your post and my post(s)?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James Dougherty

    Ariel Productions
    http://www.arielproductions.com/
  • LibadLibad Posts: 8
    edited January 2009 Vote Up0Vote Down
    Ok im sorry I will not post this stuff anymore.
    I wont lie I dont understand, but I get the pic
    Nice day to all
  • JamesDoughertyJamesDougherty Posts: 48
    edited January 2009 Vote Up0Vote Down
    I think you may have misunderstood me. It's great that you are posting and trying to help better yourself. I just suggested created a new thread in the sandbox about this as you will get more/better help there. Sorry if I came off wrong, I was just trying to help you out.
    Libad said...
    Ok im sorry I will not post this stuff anymore.
    I wont lie I dont understand, but I get the pic
    Nice day to all
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James Dougherty

    Ariel Productions
    http://www.arielproductions.com/
  • LibadLibad Posts: 8
    edited January 2009 Vote Up0Vote Down
    oh ok lol i searched google for "the sandbox" but no luck and thank you for an arrow in the right direction
  • JamesDoughertyJamesDougherty Posts: 48
    edited January 2009 Vote Up0Vote Down
    You're welcome. I should have provided a link for you. Come to think of it the Basic stamp one may be better.

    Post in here: http://forums.parallax.com/forums/default.aspx?f=5

    Sorry about the confusion.
    Libad said...
    oh ok lol i searched google for "the sandbox" but no luck and thank you for an arrow in the right direction
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James Dougherty

    Ariel Productions
    http://www.arielproductions.com/
  • LibadLibad Posts: 8
    edited January 2009 Vote Up0Vote Down
    Hi all

    ok i really would like some one to test my program

    for serial rfid reader (serial port data reader) I have but I really would like advice and input pos and neg Please help I also will be adding bluetooth to use with and or instead of rfid, this is all for automation i know the program has some bugs

    and maybe a little confuseing but i included a·text file on how to use it and this is not finished so its not perfect.I would also like to know if it run on computers without visual basic

    Thanks in advance
Sign In or Register to comment.