Open control of lab instruments: why, and is it legal?

Track: Lab instruments and hardware

Introduction to agentic AI

About this lecture

Most lab instruments are controlled by closed vendor software, often on an old Windows PC, writing files only that software can read. Agents have made it much cheaper to work out how an instrument talks, and so to write open drivers. That raises two questions for researchers and for the people who run departments: why would we want to, and are we allowed to?

  • The dream: one open control layer, open file formats, instruments combined in one experiment, protocols you can publish.
  • Why it matters now: lock-in, data protection, the US CLOUD Act, dependence on foreign services, closed formats, security.
  • The law (EU and Sweden): studying a product you lawfully own is allowed; decompiling for interoperability is allowed under conditions, and a licence cannot forbid it.
  • The pitfalls: copyright still applies, firmware, patents. This is not legal advice.
  • For leaders: what a university can require when it buys instruments.

This is a concept lecture for everyone, including heads of department and infrastructure managers. The hands-on part is Reverse engineering instruments with agents.

A typical lab: three instruments, three closed islands

The dream is one open control layer for every instrument

Vendors earn most when the whole chain is theirs

Software on the instrument PC decides where your data goes

Providers say plainly that they cannot promise EU data stays out of US hands

  • June 2025, French Senate: asked under oath whether Microsoft could guarantee that data on French citizens would never be handed to US authorities without French consent, Microsoft France’s director of legal affairs answered “No, I cannot guarantee that”, adding that it had never happened so far.
  • The CLOUD Act binds the provider, not the data centre. Location in the EU is not enough.
  • Universities hold research data with patient information, unpublished results and data under export control.
  • For instruments, the safe default is: no cloud dependency for control or for raw data.

A foreign service can be switched off by its own government overnight

  • 12–14 June 2026 (Reuters, Al Jazeera and others): after a US export-control order on national-security grounds, Anthropic disabled its two newest models, Fable 5 and Mythos 5, for all customers worldwide, days after their release. Older models stayed available.
  • Customers had no say and no notice. The cause was a government decision, not a technical fault.
  • The same can happen to instrument software that needs an online licence check, a cloud account or a vendor update server.
  • Open drivers and open formats are a form of resilience: the instrument keeps working whatever happens to the vendor or its country.

Closed file formats lock in your data, not only your instrument

Closed software on a lab PC is also a security risk

  • Vendor PCs often run an operating system without security updates, because the vendor software needs it.
  • Every closed program on the network is a black box: bugs that let attackers in, and occasionally deliberate backdoors (for example remote-support tools, or SDKs that phone home).
  • A university cannot inspect closed code; it can only isolate the PC, which makes the instrument harder to use.
  • Open drivers can be reviewed, patched and run on an up-to-date system.
  • Not a cure-all: open code also has bugs. It is just possible to find and fix them.

There are two ways to learn how an instrument talks

Lawmakers allow reverse engineering on purpose, to keep markets open

  • Without interoperability, the maker of a product controls everything that connects to it. That blocks competition and repair, and makes customers captive.
  • EU law therefore protects software and trade secrets, but deliberately leaves room to study products and to make independent programs work with them.
  • The aim is not to let you copy a product. It is to let you connect to it, and to let others compete on the parts around it.
  • Standards (USB, Ethernet, file formats) exist for the same reason.

Sweden reads written law; the US and UK lean on court cases

EU trade secret law: studying a product you lawfully have is lawful

Directive (EU) 2016/943 (Trade Secrets Directive), Article 3(1)(b): acquiring a trade secret is lawful when it is obtained by

“observation, study, disassembly or testing of a product or object that has been made available to the public or that is lawfully in the possession of the acquirer of the information who is free from any legally valid duty to limit the acquisition of the trade secret”

Recital 16:

“Reverse engineering of a lawfully acquired product should be considered as a lawful means of acquiring information, except when otherwise contractually agreed. The freedom to enter into such contractual arrangements can, however, be limited by law.”

EU software law: observing a program, and decompiling it to interoperate

Directive 2009/24/EC (Software Directive)

  • Art. 5(3): a person with the right to use a program may, without permission, observe, study or test how it works, while loading, running or storing it as they are entitled to. Recording its USB traffic while you use it normally is generally seen as this kind of study.
  • Art. 6: decompilation (reproducing and translating the code) is allowed without permission when it is indispensable to obtain the information needed for interoperability of an independently created program, if:
      1. it is done by a licensee or another person with a right to use the program (or someone acting for them),
      1. the information has not already been readily available to them,
      1. it is confined to the parts of the program needed for interoperability.

What you learn by decompiling has strict limits, and a licence cannot take the right away

  • Art. 6(2): the information may not be
    • used for anything other than the interoperability you needed,
    • given to others unless that is necessary for the interoperability,
    • used to make a program substantially similar in its expression, or for anything else that infringes copyright.
  • Art. 8, second paragraph:

“Any contractual provisions contrary to Article 6 or to the exceptions provided for in Article 5(2) and (3) shall be null and void.”

  • So a licence term “you may not reverse engineer” has no effect against Art. 5(3) or Art. 6 in the EU.

Put together: what EU law lets a lawful user do

Licences often forbid reverse engineering; in the EU, parts of that clause are void

“You may not, and you agree not to or enable others to, copy (…), decompile, reverse engineer, disassemble, attempt to derive the source code of, decrypt, modify, or create derivative works of the Apple Software (…) (except as and only to the extent any foregoing restriction is prohibited by applicable law (…)).”

(Apple software licence, section “No Reverse Engineering”)

  • The bracket is there because of laws like EU Art. 8: the clause applies only where the law allows it.
  • In the US, courts have enforced such clauses (for example Bowers v. Baystate, 2003).
  • Read your instrument software’s licence. Note what it forbids, and bring it to your legal office.

The EU rules apply in Sweden through Swedish law

US law also allows reverse engineering, with its own conditions

  • Trade secrets, 18 U.S.C. § 1839(6)(B) (Defend Trade Secrets Act): “improper means” “does not include reverse engineering, independent derivation, or any other lawful means of acquisition”.
  • DMCA, 17 U.S.C. § 1201(f): a person who has lawfully obtained the right to use a program may get around a technical protection measure for the sole purpose of identifying the parts needed for interoperability of an independently created program, if that information was not readily available and the acts do not infringe copyright.
  • DMCA exemptions: every three years the Librarian of Congress grants further exemptions to the ban on getting around protections (most recently in 2024).
  • Contracts weigh more in the US: a “no reverse engineering” licence may be enforced.

Vendors can plant tells, so keep decompiled code out of your driver

  • A vendor can put odd details in its code: an unused command, a strange constant, a deliberate quirk in a checksum.
  • If your driver reproduces the same oddity, that is evidence in court that you copied rather than worked out the protocol independently.
  • Agents make this risk larger: asked to “write the driver from the decompiled code”, an agent may translate the vendor’s code line by line.
  • Keep a clear trail: notes and a protocol spec in your own words, the driver written from the spec, every fact marked “seen in traffic” or “seen in code”.

Clean-room reverse engineering separates who looks from who writes

Patents are a separate question: check the claims, and design around them

  • Copyright protects code; a patent can protect a method, however it is coded. Clean code does not help against a patent.
  • A patent that exists is not necessarily valid: validity is only settled if it is challenged, and many are narrowed or revoked.
  • What a patent covers is in its claims. Read them, or have someone read them: often your method is simply different.
  • Best answer: design around the claim, which often makes better code anyway.
  • Practical risk: how likely is the holder to sue a university over a research driver? A question for your legal office, not for guessing.

Your own driver needs a licence, and the agent’s code needs checking

  • Choose an open-source licence for your driver and protocol notes (for example MIT or Apache-2.0; GPL if you want changes shared). Ask your university about ownership of the code.
  • Code written by an agent can contain memorised fragments of other people’s code; check before you publish (see Copyright, memorisation and credit).
  • Say in the README how the protocol was obtained (traffic recording, decompilation for interoperability) and that no vendor code is included.
  • Keep the evidence: the request to the vendor, your notes, the spec, the recordings.

The EU Data Act gives users a right to their instrument’s data

The right-to-repair directive helps consumers, not labs, for now

  • Directive (EU) 2024/1799 on promoting the repair of goods: obligations to repair for consumer products such as washing machines and phones, to be applied by member states from mid-2026.
  • It does not cover lab instruments bought by a university.
  • It shows the direction of EU policy: products that can be repaired, maintained and connected by others than the maker.
  • For instruments, the practical levers are procurement and the Data Act.

Universities can ask for openness when they buy instruments

Also: support open-source driver projects, and agree a route with the legal office before someone needs it.

Where this goes wrong

  • No request to the vendor: the information may have been readily available, and Art. 6 does not apply.
  • Copying instead of learning: decompiled code, the vendor DLL or the firmware ends up in your published project.
  • Breaking a protection (encryption, licence checks, copy protection) beyond what the law allows: a separate rule (EU: Directive 2001/29/EC Art. 6, and Software Directive Art. 7 for programs; US: the DMCA).
  • A contract you did not read: a service or research agreement can add duties the licence did not.
  • Assuming US rules in the EU, or EU rules in the US.
  • Damaging the instrument: untested commands on a shared, expensive machine.

Summary

Concept Key fact
The dream one open control layer, open formats, combined instruments, publishable protocols
Why vendors close vertical integration and lock-in; part suppliers are often open
Why now GDPR, CLOUD Act, services switched off by governments, closed formats, security
Two ways black-box recording of traffic, or decompilation of the program
Not legal advice bring the facts to your university’s legal office

Summary (continued)

Concept Key fact
EU trade secrets studying a lawfully acquired product is lawful, unless a contract says otherwise (2016/943 Art. 3)
EU software observe and test (Art. 5(3)); decompile for interoperability (Art. 6); a licence cannot forbid either (Art. 8)
Sweden upphovsrättslagen 26 g § and 26 h §; lagen om företagshemligheter (2018:558)
Pitfalls copyright on code, DLLs and firmware; patents; protections; your own licence
Leaders require openness in procurement; use the Data Act; agree a route with legal

Next (Reverse engineering instruments with agents): how to record, decode and test an instrument protocol with an agent, safely and lawfully.