Skip to content

How remote operation works

Unverified

Remote operation has not been tested in a real environment. Please avoid using it for now. For hardware measurements, use the direct-connection standard Web UI.

Run nmrlink-server on the PC connected to the instrument, and sign in with a Google account from a browser elsewhere. The instrument does not need to be connected to the user’s PC.

On this page

Three parts

text
User browser (static Web UI)
        ↕ Firebase Authentication and Firestore
Instrument PC (Node.js and nmrlink-server)
        ↕ USB serial
      NMR instrument
  • The Web server serves HTML and JavaScript; it does not run Node.js.
  • Firebase handles sign-in and relays requests and results.
  • The instrument PC handles serial communication. The remote user’s browser does not use Web Serial API.

The two PCs need not share a LAN. Both need access to Firebase. This design does not require a public HTTP server on the instrument PC or router port forwarding.

What the administrator prepares

  1. Compatible hardware, its USB connection, and an instrument PC with Node.js 22 or later.
  2. A Firebase project on the Spark plan without billing registration, with Google sign-in and Firestore configured.
  3. Private instrument-PC configuration and an account allowlist.
  4. An HTTPS static Web server for the public UI.

Follow Administrator setup. nmrlink-server is not currently published to npm; use the GitHub repository.

User workflow

  1. Open the UI and sign in with Google.
  2. Choose “利用開始・再開” (start/resume). Access is denied if the local policy rejects the account or another session owns the instrument.
  3. Check the settings and run a Single or Double measurement.
  4. Download the results you need.
  5. Choose “利用終了・データ削除” (end session/delete data). The next user can start after cleanup completes.

Only one session can use the instrument at a time. There is no queue or reservation system. Another tab is a different session even with the same account. After reloading the same tab, use start/resume to reconnect.

Disconnection and data

Losing the connection does not immediately stop a physical measurement. The default reconnect grace period is three minutes; if disconnected during measurement, it starts after measurement finishes. Never automatically resend a measurement whose outcome is unknown.

Cloud results and requests are deleted when a session ends or expires before handing over to another user. Failed cleanup blocks handover. Downloaded files and other local copies are outside this cleanup.

The normal UI hides results from other users and rejected accounts. The instrument PC’s allowlist is not mirrored into Firestore Security Rules. This is not strict data confidentiality; do not use it for confidential records.

Build your own screen

Use RemoteClient for communication and NMRLink for analysis, graphs and files. Continue to Custom UI integration.

Try without hardware or Firebase setup

Clone the repository and run these commands at its root. The local demo needs no apparatus, Google account, Firebase configuration or billing registration.

sh
npm install
npm run demo

Open the displayed localhost URL to try demo login, session ownership, simulated measurements, deletion and handover. The first run may download emulators and Java. Press Ctrl+C in the terminal to stop. See the local demo instructions for details. A successful simulated session does not validate real remote operation.