diff --git a/src/tools/serial-console/index.ts b/src/tools/serial-console/index.ts
new file mode 100644
index 00000000..9123a026
--- /dev/null
+++ b/src/tools/serial-console/index.ts
@@ -0,0 +1,13 @@
+import { DeviceAnalytics } from '@vicons/tabler';
+import { defineTool } from '../tool';
+
+export const tool = defineTool({
+ name: 'Serial Port Console',
+ path: '/serial-console',
+ description: 'Connect, read and send message to Serial Port',
+ keywords: ['serial', 'port', 'console'],
+ component: () => import('./serial-console.vue'),
+ icon: DeviceAnalytics,
+ createdAt: new Date('2025-11-11'),
+ category: 'Forensic',
+});
diff --git a/src/tools/serial-console/serial-console.vue b/src/tools/serial-console/serial-console.vue
new file mode 100644
index 00000000..20c922a8
--- /dev/null
+++ b/src/tools/serial-console/serial-console.vue
@@ -0,0 +1,135 @@
+
+
+
+
+ {{ $t('tools.pgp-encryption.texts.tag-your-browser-is-not-in') }}
+ {{ $t('tools.pgp-encryption.texts.tag-secure-context-https') }}
+ {{ $t('tools.pgp-encryption.texts.tag-this-tool-may-not-work-correctly-and-require-https-to-work-fully') }}
+
+
+
+
+
+
+
+
+ Connect
+
+
+ Disconnect
+
+
+
+
+
+
+
+
+ Send
+
+
+
+
+
+
diff --git a/src/tools/serial-console/serial.d.ts b/src/tools/serial-console/serial.d.ts
new file mode 100644
index 00000000..cbbbab83
--- /dev/null
+++ b/src/tools/serial-console/serial.d.ts
@@ -0,0 +1,17 @@
+// serial.d.ts
+interface SerialPort {
+ open(options: { baudRate: number }): Promise
+ close(): Promise
+ readable: ReadableStream | null
+ writable: WritableStream | null
+ getInfo(): { usbVendorId?: number; usbProductId?: number }
+}
+
+interface Serial extends EventTarget {
+ getPorts(): Promise
+ requestPort(options?: { filters: Array<{ usbVendorId?: number; usbProductId?: number }> }): Promise
+}
+
+interface Navigator {
+ serial: Serial
+}
diff --git a/src/tools/serial-console/useSerialPort.ts b/src/tools/serial-console/useSerialPort.ts
new file mode 100644
index 00000000..476d401c
--- /dev/null
+++ b/src/tools/serial-console/useSerialPort.ts
@@ -0,0 +1,153 @@
+// composables/useSerialPort.ts
+import { onBeforeUnmount, ref } from 'vue';
+
+export function useSerialPort() {
+ const isConnected = ref(false);
+ const outputLines = ref([]);
+ const baudRate = ref(9600);
+ const lineEnding = ref<'CR' | 'LF' | 'CRLF'>('LF');
+ const availablePorts = ref([]);
+
+ let port: SerialPort | null = null;
+ let reader: ReadableStreamDefaultReader | null = null;
+ let writer: WritableStreamDefaultWriter | null = null;
+ let inputDone: Promise | null | undefined = null;
+ let outputDone: Promise | null | undefined = null;
+ let disconnecting = false;
+ let reconnectAttempts = 0;
+ const maxReconnects = 3;
+
+ function appendOutput(data: string) {
+ outputLines.value.push(data);
+ }
+
+ async function listPorts() {
+ availablePorts.value = await navigator.serial.getPorts();
+ }
+
+ async function connect(selectedPort?: SerialPort) {
+ try {
+ port = selectedPort || await navigator.serial.requestPort();
+ await openPort();
+ }
+ catch (err) {
+ appendOutput(`[Connect error] ${err}`);
+ }
+ }
+
+ async function openPort() {
+ try {
+ await port!.open({ baudRate: baudRate.value });
+ isConnected.value = true;
+ reconnectAttempts = 0;
+
+ const decoder = new TextDecoderStream();
+ inputDone = port!.readable!.pipeTo(decoder!.writable);
+ reader = decoder.readable.getReader();
+ readLoop();
+
+ const encoder = new TextEncoderStream();
+ outputDone = encoder.readable.pipeTo(port!.writable!);
+ writer = encoder.writable.getWriter();
+
+ appendOutput('[Connected]');
+ }
+ catch (err) {
+ appendOutput(`[Open error] ${err}`);
+ attemptReconnect();
+ }
+ }
+
+ async function disconnect() {
+ if (!port || disconnecting) {
+ return;
+ }
+ disconnecting = true;
+ appendOutput('[Disconnecting...]');
+
+ try {
+ reader?.cancel();
+ await inputDone?.catch(() => {});
+ reader?.releaseLock();
+
+ await writer?.close().catch(() => {});
+ await outputDone?.catch(() => {});
+ writer?.releaseLock();
+
+ await port.close();
+ appendOutput('[Disconnected]');
+ }
+ catch (err) {
+ appendOutput(`[Teardown error] ${err}`);
+ }
+ finally {
+ isConnected.value = false;
+ disconnecting = false;
+ }
+ }
+
+ async function readLoop() {
+ try {
+ while (true) {
+ const { value, done } = await reader!.read();
+ if (done) {
+ break;
+ }
+ if (value) {
+ appendOutput(value);
+ }
+ }
+ }
+ catch (err) {
+ if (!disconnecting) {
+ appendOutput(`[Read error] ${err}`);
+ attemptReconnect();
+ }
+ }
+ }
+
+ async function send(data: string) {
+ if (!writer || !isConnected.value) {
+ return;
+ }
+ const ending = lineEnding.value === 'CR'
+ ? '\r'
+ : lineEnding.value === 'CRLF'
+ ? '\r\n'
+ : '\n';
+ writer.write(data + ending);
+ appendOutput(`> ${data}`);
+ }
+
+ async function attemptReconnect() {
+ if (reconnectAttempts >= maxReconnects) {
+ appendOutput('[Reconnect failed]');
+ return;
+ }
+ reconnectAttempts++;
+ appendOutput(`[Reconnecting... attempt ${reconnectAttempts}]`);
+ await new Promise(resolve => setTimeout(resolve, 1000 * reconnectAttempts));
+ try {
+ await openPort();
+ }
+ catch (err) {
+ attemptReconnect();
+ }
+ }
+
+ onBeforeUnmount(() => {
+ disconnect();
+ });
+
+ return {
+ isConnected,
+ outputLines,
+ baudRate,
+ lineEnding,
+ availablePorts,
+ connect,
+ disconnect,
+ send,
+ listPorts,
+ };
+}