demo · v130
RFCOMM Device Explorer
Chrome 130 adds SerialPort.connected (whether a previously-paired Bluetooth RFCOMM device is in range) and new connect/disconnect events on navigator.serial for Bluetooth RFCOMM ports. This explorer lists real granted serial ports and reports the browser's live connected state.
Checking Web Serial API availability…
Paired serial devices
0 devices
No devices paired yet. Click "Request serial port" or "List paired ports".
Event log — connect / disconnect / rfcomm events
—Waiting for events…
Chrome 130 additions
SerialPort.connected
Read-only boolean: true if the port is a Bluetooth RFCOMM port and the device is currently connected/in range — without opening the port.
New in Chrome 130 ✓
navigator.serial "connect" event
Fires when a previously-paired Bluetooth RFCOMM device comes into range. Allows proactive reconnection logic without polling.
New in Chrome 130 ✓
navigator.serial "disconnect" event
Fires when an RFCOMM device goes out of range. Allows graceful cleanup before the next open() attempt fails.
New in Chrome 130 ✓
Wired USB/CDC serial
connect/disconnect events already existed for wired USB serial devices in earlier Chrome versions via USBDevice tracking.
Pre-existing
// Chrome 130: SerialPort.connected + RFCOMM events
// Check if a paired Bluetooth device is in range
const ports = await navigator.serial.getPorts();
for (const port of ports) {
if (port.connected) {
console.log('Device in range:', port); // ← Chrome 130
}
}
// Listen for RFCOMM devices coming/going
navigator.serial.addEventListener('connect', event => {
console.log('RFCOMM device appeared:', event.port);
// event.port.connected === true
});
navigator.serial.addEventListener('disconnect', event => {
console.log('RFCOMM device went away:', event.port);
// event.port.connected === false
cleanupPort(event.port);
});
// Open only when connected
if (port.connected) {
await port.open({ baudRate: 9600 });
} else {
// Wait for the 'connect' event instead of polling
}