-
Notifications
You must be signed in to change notification settings - Fork 552
Open
Description
I am able to connect with the NFC reader, but cannot make it beep nor read any NFC cards.
Environment
- Library version: react-native-ble-plx 3.5.0
- React Native version: 0.72.3"
- Dev machine: macOS 14 (Sonoma)
- Permissions:
NSBluetoothAlwaysUsageDescriptionpresent in Info.plist - iOS setup: Followed per react-native-ble-plx iOS example setup
Hardware
- Primary device: ACS ACR1255U-J1 (BLE) — advertised name:
ACR1255U-J1-001592 - Also tested: ACS ACR1311U-N2 (BLE)
GATT Profile Discovered
Main Service: 0000fff0-0000-1000-8000-00805f9b34fb
0000fff1-...— write (command characteristic)0000fff2-...— notify (response characteristic, notify-only)0000fff3-...— read, notify (varies per unit)
Other services: Generic Device Info (180A) and Battery (180F) read successfully
Expected Behavior
- After connecting, discovering services, and enabling notifications on
FFF2, monitoring should deliver notifications - Writing ACS commands to
FFF1should produce responses onFFF2 - Beep commands should trigger the reader's built-in buzzer
Actual Behavior
- ✅ Connection successful; services and characteristics discovered
- ✅ Successfully read values from
180Aand180Fcharacteristics (BLE session works) - ❌ Attempts to read
FFF2fail as expected (notify-only characteristic) - ❌ Monitoring
FFF2produces no notifications - ❌ Writes to
FFF1"succeed" (both with/without response), but:- Reader does not beep
- No notifications arrive on
FFF2
Logs (truncated)
📡 Service 3: 0000fff0-0000-1000-8000-00805f9b34fb
1. 0000fff1… Properties: write
⚠️ Read attempt failed (as expected for write-only)
✅ Can write
2. 0000fff2… Properties: notify
⚠️ Read attempt failed (notify-only)
✅ Can notify/indicate
3. 0000fff3… Properties: read, notify
⚠️ Read attempt failed (on some runs)
✅ Can notify/indicate
NFC Status: 🔐 Authenticating with master key...
NFC Status: ✅ Authentication sent
NFC Status: 🔄 Starting auto-polling...
NFC Status: ✅ Sleep disabled
NFC Status: 🔊 Testing beep...
NFC Status: ✅ Beep sent
NFC Status: ✅ Init complete
NFC Status: 👂 Listening for cards...
Minimal Reproduction (iOS)
Following the documented iOS sequence: connect → discoverAllServicesAndCharacteristics → find FFF1/FFF2 → monitor FFF2 → write to FFF1.
// 1. Connect and discover
const device = await manager.connectToDevice(id, { autoConnect: false });
await device.discoverAllServicesAndCharacteristics();
// 2. Resolve FFF1 (write) and FFF2 (notify) from FFF0 service
const services = await device.services();
const fff0 = services.find(s => s.uuid.toLowerCase().includes('fff0'));
const chars = await fff0.characteristics();
const cmd = chars.find(c => c.uuid.toLowerCase().includes('fff1')); // write
const rsp = chars.find(c => c.uuid.toLowerCase().includes('fff2')); // notify
// 3. Start monitoring FFF2 BEFORE any writes
const sub = rsp.monitor((error, ch) => {
if (error) {
console.log('Monitor error:', error);
return;
}
if (ch?.value) {
console.log('📥 Notification received:', ch.value);
// ❌ This never fires for us
}
});
// 4. Helper function to send commands
const send = async (bytes) => {
const b64 = bytesToBase64(bytes);
try {
await cmd.writeWithResponse(b64);
} catch {
await cmd.writeWithoutResponse(b64);
}
};
// 5. Typical ACS initialization + beep sequence
await send([0xE0, 0x00, 0x00, 0x48, 0x00]); // Disable sleep (escape)
await send([0xE0, 0x00, 0x00, 0x40, 0x01]); // Auto poll ON (escape)
await send([0xE0, 0x00, 0x00, 0x28, 0x01, 0x50]); // Long beep (escape)
// 6. Then Get UID (APDU)
await send([0xFF, 0xCA, 0x00, 0x00, 0x00]); // Expect notification on FFF2
// ❌ Never arrivesMetadata
Metadata
Assignees
Labels
No labels