Read RFID to PC using Cerberus and/or Hydra+ Mainboards

I’ve been struggeling getting my Cerberus or Hydra+ mainboard to read RFID and then send them to pc.

The reading part was done pretty fast, outputting it to a N18 display module.

Is it even possible to do with these mainboards or do I really need a Spider for this functionality?

Tried using the method decribed in this:
https://www.ghielectronics.com/docs/20/usb-client
But I dont think I’m allowed to use GHI.USB

I have a usb client SP and a USBserial, the only way I can think of is using the USBSerial module now and creating a windows application to pick up the serial data being send over?
using something like described here:
https://www.ghielectronics.com/docs/149/device-to-pc-communication

Or am I missing someting obvious here?

Would prefer to use the USB both for powering the device and sending keystrokes and a Enter/newline over so the RFID reader can dump its readings into notepad/Excel etc, only need this build once to check a bunch of our rfid tags and label them.

You can’t use USB Client functionality for anything other than debugging on the Cerb family or Hydra. That’s called out on the specifications info on the catalog page https://www.ghielectronics.com/catalog/product/530 So you would need a device that supports that -

Even if you could, you would still have needed to have an app that runs on the PC and connects to the endpoint/s you expose, and in the simplest form you would have used CDC which shows up as a serial port - meaning you still need to do exactly the same thing as you need to do when you use the USBSerial module.

The unfortunate thing is that there’s no way to use the USBSerial module to inject power into your device. It has no regulation to allow you to take the 5v down to 3v3 that the mainboards need. You need to power things through a separate mechanism - that could be just two USB cables.

Personally if I was going to attempt this, I’d use a non-Gadgeteer USB to TTL serial port device that has 3v3 regulation onboard. (warning: this is not a novice tip) Connecting one of the common devices like a CP2102 http://www.ebay.com.au/itm/400524497015 that has this, to a breakout module or extender or g-plug that is connected to a U socket would allow you to power the board over that as long as it’s power requirements were modest.

For full USB keyboard capabilities (to type into notepad for example) you need a larger device that supports that. But I think given you want to have bi-directional comms (pressing space to read the next tag for example) I think I’d just create an app that wrote its own log file rather than worrying about dual control. But if you’re looking for alternatives, looks like the Fez Panda III will support that (uses the pre-release SDK so may not be suitable for you or sufficiently field tested yet) as well as the Cobra2

–EDIT
Nvm at the end of your post you gave me some examples of hardware.
Am I looking for USB client - Extended or USB host enabled specification?

Allright thanks for the quick reply.
What would I need to make use of the Microsoft.SPOT.Hardware.Usb and GHI.Usb assemblies?

As for bidirectional, that’s not really needed I think, the RFID will be read whenever it comes close to the module not when pressing a key.
So just sending over simple keystrokes will do when a valid RFID card has been read.

Something along the lines of:


void ProgramStarted()
        {
            Debug.Print("Program Started");            
            rfidReader.IdReceived += rfidReader_IdReceived;

        }
void rfidReader_IdReceived(RFIDReader sender, string ID)
        {
            // Start keyboard
			Keyboard kb = new Keyboard();
			Controller.ActiveDevice = kb;
			
			foreach (char c in ID)
			{
				if ( Controller.State == UsbController.PortState.Running)
				{
					//would need som logic to do char c here
					kb.Stroke(Key.H);
				}
			kb.Stroke(Key.Enter);
			}
        }

you are looking for USB Client functionality.

USB Host is when you plug a keyboard into the USB port on a Spider and use it to control program execution (menu for example).

In your code snippet, I would start the keyboard in ProgramStarted(), but basically the idea is sound.