Question

I have been working with a bluetooth smart card reader (Feitian br301), and it appears to have simply stopped working out of nowhere.
I thought this could be a problem with my card reader, but I have two of them for developing and both present the same issue, repeatable even with Feitian's demo app code. The demo starts out like this:

BluetoothSocket mBlueToothSocket = mBlueToothDevice.createInsecureRfcommSocketToServiceRecord(MY_UUID);
mBlueToothSocket.connect();
mInput = mBlueToothSocket.getInputStream();
mOutput = mBlueToothSocket.getOutputStream();
mReader = new ft_reader(mInput, mOutput);

This part works as expected, without any issues. But then, when I call:

mReader.PowerOn();  

Which is just a wrapper for a inner_card.PowerOn()call, it returns -2, which is an unknown to me (and to the documentation) return code.


Also, while not used on my app, only on Feitian's demo, trying to register a Handler for the device, via inner_card.registerCardStatusMonitoring(Handler) also returns an unknown error code: -1.

TL;DR

My bluetooth device creates a socket and connects to it without issue, why does it not work properly, or even register a handler, after that?

Was it helpful?

Solution

Smartcard needs to be inserted in the reader when you call PowerOn(). This method should just provide power to the card and read the ATR so if it does not work with your current card you should try it with the different card.

OTHER TIPS

This is a hardware, driver, or system issue. We do not troubleshoot that here. Take it to ServerFault or SuperUser.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top