It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

RFID reader under VB -- help

Moderator: dafunkymunky

RFID reader under VB -- help

Postby bobolaco on Thu May 05, 2005 9:12 am

currently working on a school's project .. using RFID modules ..
just try to achive the following ..

Private Sub MSComm1_OnComm()

If (MSComm1.CommEvent = comEvReceive) Then
TagData = MSComm1.Input
If (TagData = "52588B45") Then
frmLock.Hide
Else
frmLock.Show
End If
Else: If (MSComm1.CommEvent = comEventBreak) Then frmLock.Show
End If

End Sub

=======================================
my plan for the above code is ..to hopefully to acheive ..
when the tag's not within the range .. the code will turn the frmLock form back on ..but however, i am only able to turn it off when i put the tag within range ..
can anyone give me a clue of how to make sure .. somehow when the tag's off range ... what constant can i use to monitor on the serial port to turn the frmLock back ?
bobolaco
 
Posts: 4
Joined: Thu May 05, 2005 8:47 am

Postby dafunkymunky on Thu May 05, 2005 9:40 am

well interesting topic though i'm not sure about his

if you get the solution please post the solution here i would be interested in it

--DAFUNKYMUNKY
--------DAFUNKYMUNKY--------
::THE::NECESSARY::[D]EVIL::
....errr i mean munky....
User avatar
dafunkymunky
100+ Club
 
Posts: 183
Joined: Fri Apr 08, 2005 7:32 am
Location: India

hi ..

Postby bobolaco on Thu May 05, 2005 7:38 pm

try to achieve:
tag in range -- > frmlock hide
tag off range -- > frmlock show right away
---------------------------------
only direction i have is ..
some functions that might monitor when "no tag info" happens ..??
-------------------------------
reference info:
this is what i want to make exactly ..
http://www.iautomate.com/pcacu.html

this is the site where i get my RFID module from ..
the chip comes preloaded .. but i know nothing about asembly ..
so ..not sure if the preloaded assembly code sends out a "break" when tag's away .. in addition, i don't' know how the comEventBreak() work .. >.<
http://www.sonmicro.com
-------------------------------------------------------
alternative solutions i have in mind .. to just make the project somewhat works ..
1. tag-in, the frmlock hides, then it triggers another form
the second form will show 2 butoons , one is called LOCK, so user will need to manually lock himself again when away, and the form also loads with mouse-inactivity monitoring, the screen saver method .. so, after certain time, it calls the frmlock again ..

2. possible solution hits me when i took a shower .. >.<
i will compare to a NULL string .. 'cos i suspect that the MSComm1_onComm() function maybe somehow keeps communication with the RFID module ..so maybe NULL mscomm1.input will get me off this mess ..

anymore suggestions that will achive my project goal ? >.<
thanks for any attentions anyone provides .. thank you ..
bobolaco
 
Posts: 4
Joined: Thu May 05, 2005 8:47 am

Postby dafunkymunky on Fri May 06, 2005 5:58 am

hi bobolaco
i'm dont really know what this really is so will you please explain me..
--------DAFUNKYMUNKY--------
::THE::NECESSARY::[D]EVIL::
....errr i mean munky....
User avatar
dafunkymunky
100+ Club
 
Posts: 183
Joined: Fri Apr 08, 2005 7:32 am
Location: India

hi

Postby bobolaco on Fri May 06, 2005 6:26 am

hi,
RFID stands for Radio frequency identification.
there are "transponder" or also called TAG ..
transceiver ..with an inductor ..
so the basic idea is ..
when the TAG gets into the reading range of the transceiver ..
the TAG will be powered by the transceiver's radio frequency(not sure about the term here .. )
then the TAG will send out data stored on it continuously as long as it's in the range ..
so my project goal is .. just make a VB program that reads whatever transceive sends out to the serial port ..and i will compare the data stores in the TAG with the database ..if data matches .. it will unlock the pc ..
but i have literally none knowledge about assembly ..
so i didn't touch the hardware part .. all i am sure it does is .. it successfully retrieve one block of data from the TAG..
and i am so far able to compare the data to something to unlock the pc ..
but since the project is about security .. i also want to make it to lock up the pc when TAG is away the range from transceiver ..
but after i unhide the form .. i am not able to get it back ..
so i think i will somehow find a way to tell ..if the tag is away ..
so i suppose there's a way in the assembly to send out a "break" signal ..so in VB, i can just check for the break signal ..
-- > this is what i don't know how to do ..
so i am simply hammering my brain to think of a way to just deal with VB only .. and hope to acheive my goal ..

since i am using .. onComm to retreive the data
if msComm1.oncomm = comevreceive
bla bla bla
-------------------------------------
so my simple brain just thought .. then i can make a else statment to lock the pc again when mscomm is NOT RECEIVING .
however it's not working ..
so i find out .. guess somehow the serial port still receives something ..so it's always in the OnEvent()
i tried to detect the error constants too ..but no luck ..

so i think if i can figure out what to "look for" when TAG is off the range ..then i should be able to set up the logic .. >.<

or i am just doing something wrong with the MSComm ?

sorry that my thoughts and explaination might not sound clear and jumping around >.<
bobolaco
 
Posts: 4
Joined: Thu May 05, 2005 8:47 am

Postby dafunkymunky on Sat May 07, 2005 8:51 am

hi bobolaco

i think i understand what you are telling me
the external hardware you are talking about is something like the light device which is fixed to the mobile phones(if you have seen one) and it glows when youget a call or when when you call somebody

and one more thing i remember is the pill kinda thing you put into you body(which somebody invented) and you send electromagnetic signal to the device and you get back all the info about your body is that right??

and wait you mean locking and unlocking the pc when it running or switching it on and off when you receive and lose the data..

and why dont you use a timer to check for the the info instead of onevent
and in the timer part maybe you can even check if the info is right..

try this out and do you have the circut diagram for the stuff yu are talking about i mean powering itself not your security thing..
--------DAFUNKYMUNKY--------
::THE::NECESSARY::[D]EVIL::
....errr i mean munky....
User avatar
dafunkymunky
100+ Club
 
Posts: 183
Joined: Fri Apr 08, 2005 7:32 am
Location: India

^^

Postby bobolaco on Sat May 07, 2005 6:36 pm

Hi,
here's the link to the datasheet of the RFID module i got
http://www.sonmicro.com/download/125%20 ... asheet.pdf

i think my problem is .. i know nothing about the assembly .. and how to interface VB with it, and the MSComm :P .. so i decided to jus leave the RFID the way as it's programmed .. since i know it will send out something by default when TAG is in range .then i just use the MSComm to retreive .. i think it's how i got into this direction..

Hmm .. the timer idea's probably the way to go .. however, i don't know how to interface the port and module :P .. i think i will need to send a "command" to the microcontroller on the RFID module .. then the module will check for TAG ..then return something ...

but i will definitely need to deal with the assembly part too .. to ensure it does its job .. >.<
=============================================
my new direction:

i am just starting to work on the screen-saver timing idea now .. :P
when the "frmlock" form's hided when TAG's in ranage, it will call up a "manualLock" form,
the following are the tasks i hope to make these 2 forms to work

frmlock:
1. Top of everything, occupied the full window
2. diable win xp's CTRL-ALT-DEL functions
3. call manuallock when TAG's in range and verified
4. trapped mouse? or other stuffs to limit user's operation rights

manuallock
1. show a small LOCK button for user to call back frmlock
2. timer to call back frmlock
3. enable xp's CTRL-ALT-DEL
========================================

thanks for all the attentions :)
bobolaco
 
Posts: 4
Joined: Thu May 05, 2005 8:47 am

Postby dafunkymunky on Tue May 10, 2005 12:31 pm

nice projrct even though i dont understand a thing
--------DAFUNKYMUNKY--------
::THE::NECESSARY::[D]EVIL::
....errr i mean munky....
User avatar
dafunkymunky
100+ Club
 
Posts: 183
Joined: Fri Apr 08, 2005 7:32 am
Location: India


Who is online

Users browsing this forum: No registered users and 4 guests