RFID open does not cause to Attach event raising

Technical Discussion on the PhidgetRFID
Wipatel

RFID open does not cause to Attach event raising

Postby Wipatel » Tue Nov 22, 2011 7:52 am

I'm using Phidget21.net version 2.1.8.76.
RFID is attached.
So, here is code

Code: Select all

mngr = new Phidgets.Manager();
mngr.Attach += _mngr_Attach;
mngr.Detach += mngr_Detach;
mngr.open();

Code: Select all

void _mngr_Attach(object sender, Phidgets.Events.AttachEventArgs e)
{
        RFID rfid = new RFID();
   rfid.Attach += rfid_Attach;
   rfid.open(serial);
}

As I run application, manager's Attach event occurs immediately, but after calling rfid.open method rfid's event Attach is not raised.
In all examples and parts of code this seems to be working perfectly and I wonder what am I doing wrong. waitforattachment doesn't work either.
And, btw, I run this code in a separate thread.
Plz, help!
Thanks in advance.

User avatar
Patrick
Lead Developer
Posts: 3078
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: RFID open does not cause to Attach event raising

Postby Patrick » Tue Nov 22, 2011 9:56 am

Why are you using the Manager at all? Are you sure you're using the right serial number?

-Patrick

Wipatel

Re: RFID open does not cause to Attach event raising

Postby Wipatel » Tue Nov 22, 2011 1:23 pm

Manager is useful when I need to operate with multiple RFIDs, and it is handy to see the list of all available devices from phidget. Anyway it works just fine and serial number is right.

chtvnn
Fresh meat
Posts: 2
Joined: Wed Jun 04, 2014 11:23 pm
Contact:

Re: RFID open does not cause to Attach event raising

Postby chtvnn » Wed Jun 04, 2014 11:26 pm

Hello,
I also encounter the same problem. I need to know all the attached/detected phidgets in the system. Is there any solution to make the attached event of the manager work? Thank you!

chtvnn
Fresh meat
Posts: 2
Joined: Wed Jun 04, 2014 11:23 pm
Contact:

Re: RFID open does not cause to Attach event raising

Postby chtvnn » Fri Jun 06, 2014 5:30 am

I found out the problem. The source should be phidget rather than rfidphidget in the attach code block. :?


Return to “RFID”

Who is online

Users browsing this forum: No registered users and 1 guest