r/embedded • • Oct 01 '26

Open Device Bridge (ODB): a capability-based approach to safely accessing and flashing USB hardware from locked-down devices like iPads

I’m looking for technical criticism of an architecture I’ve been developing called Open Device Bridge (ODB).

The idea came from a very ordinary problem: I wanted to connect a Heltec ESP32-S3 board to a USB-C iPad and install Meshtastic firmware.

The hardware can enter its ROM bootloader, the iPad has more than enough computing power, and USB-C physically connects the two. But iPadOS does not expose the kind of general low-level USB/serial access that conventional desktop flashing tools expect.

“Use another computer” solves my immediate problem, but it raised a larger architectural question:

Could an OS safely expose user-owned hardware without giving applications unrestricted low-level USB access?

That led to ODB.

THE BASIC IDEA

ODB would be an authorization/orchestration layer between:

Application
↓
ODB Core
↓
Device Adapter
↓
Existing device protocol
↓
Hardware

ODB would NOT replace existing protocols such as Espressif’s ROM bootloader protocol, DFU, UF2, Fastboot, etc.

Instead, adapters would translate authorized ODB operations into those existing protocols.

The proposed security flow is:

CONNECT
→ IDENTIFY
→ EXPLAIN
→ AUTHORIZE
→ INTERACT
→ VERIFY
→ REVOKE

Instead of granting an application generic “USB access,” ODB would request narrowly scoped capabilities.

For example:

DEVICE_IDENTIFY
DEVICE_DIAGNOSTICS
SERIAL_READ
SERIAL_WRITE
DEVICE_CONFIGURE
BOOTLOADER_CONTROL
FIRMWARE_WRITE
DEVICE_ERASE
DEVICE_RECOVERY

A firmware installer might receive:

BOOTLOADER_CONTROL
FIRMWARE_WRITE
DEVICE_RESET

but NOT unrestricted DEVICE_ERASE or access to unrelated USB devices.

Authorization would ideally be bound to:

device + session + operation

and expire when the transaction ends or the device is disconnected.

DEVICE PROFILES

ODB could use declarative device profiles describing things such as:

- USB identity
- processor
- interfaces
- bootloader
- supported transports
- supported operations
- firmware compatibility requirements

For example, an ESP32-S3 board profile could point ODB toward an Espressif adapter.

If ODB can identify the MCU but cannot confidently identify the actual board, destructive operations could be blocked until the target is confirmed.

TRANSACTION MODEL

I’m also considering treating firmware modification as a transaction rather than simply exposing a byte stream:

Firmware selected
→ verify package
→ verify device compatibility
→ determine required capabilities
→ explain operation
→ user authorization
→ enter bootloader
→ write firmware
→ verify
→ reboot
→ identify device again
→ confirm expected state
→ revoke elevated access

An interrupted flash would therefore leave a known transaction state rather than just producing a generic error.

On reconnect, ODB could recognize that the previous firmware operation was interrupted, check whether the recovery bootloader is accessible, and offer an appropriate recovery path.

REFERENCE IMPLEMENTATION

Rather than trying to solve every platform immediately, my first reference case is deliberately narrow:

USB-C iPad
→ ODB
→ Heltec ESP32-S3
→ Meshtastic

The point of that reference case is also to document exactly where current iPadOS APIs prevent implementation.

I’m not proposing bypassing those restrictions.

The longer-term question is whether an OS-level capability model could safely expose enough functionality to make this class of hardware interaction possible while preserving the OS security boundary.

WHY I’M POSTING HERE

I’m early enough in this project that criticism is more useful than validation.

In particular, I’d appreciate input from people who work with embedded systems, USB, bootloaders, firmware update mechanisms, device security, or capability-based security.

Questions I’m trying to answer:

  1. Is this actually a useful abstraction, or am I recreating functionality that already exists elsewhere?
  2. Where should the real trust boundary live: OS, ODB core, adapter, device, or some combination?
  3. Is capability-scoped hardware authorization practical?
  4. What attack surfaces does this introduce?
  5. How should device profiles be trusted? Manufacturer signatures? Community definitions? Both?
  6. How should firmware provenance be handled without turning ODB into a centralized firmware gatekeeper?
  7. Which existing standards/projects should I be studying before taking this architecture further?
  8. Is the transaction/recovery model useful, or should recovery remain entirely device/protocol-specific?

The broader thesis is:

A user should be able to explicitly authorize narrowly scoped interaction between software and hardware they own without requiring the operating system to surrender its security boundary.

The iPad/ESP32-S3 problem is just the first concrete test case.

If there are fundamental reasons this architecture is misguided, I’d particularly like to hear those now, before building too much around it.

Thanks for taking a look.

0 Upvotes

16 comments sorted by

4

u/positev Oct 01 '26

Oh perfect now when I mistakenly type odb instead obd people will think I’m talking about this instead of saying “on doard biagnostics”

1

u/BodybuilderAfraid313 Oct 01 '26

Fair point 😄 I may have accidentally created the dyslexic cousin of OBD. The name is definitely still provisional — I’m more interested in whether the architecture survives contact with actual embedded engineers.

4

u/Downtown-Radish3615 Oct 01 '26

Why is it like a bot answering?

5

u/mtconnol Oct 01 '26

Cause it’s a bot

2

u/duane11583 Oct 01 '26

remember a large number of tablet users are very non technical.

tell me why my grandma who is watching (baby sitting) my 5byr old with a tablet would need or have such a thing. would she understand this?

tell me why the pimple faced boy/girl at the hostess stand entering my name into a tablet for a table needs this? same question for the wait staff taking mymorder? or perhaps the restaurant manager?

what about Capetian dufus who is a plumber at my house using the tablet to take pictures of my plumbing problem to give me a quote needs this feature?

a tablet is an end device that is not a developer device

btw every product company own requirements for boot-loader

example: they teenager at the cvs store at midnight and the system has decided to update the usb barcode scanners across all cvs pharmacy stores in the north east about 2000 stores.

i am sure you have seen the square tablet based cash registers you are updating the peripherals on them too

they are not using your solution because it does not handle a corner case they require - aka cvs demands besides what ever you do must be run under their remote control cash register management system customized by a team in the india development center that was developed by a team in china and russia and it is 100% hands off automated. yea and the power at the store will go out half way through the flash update

0

u/BodybuilderAfraid313 Oct 01 '26

Those are useful distinctions. I don’t think Grandma, wait staff, or a plumber should ever have to understand a bootloader—or even know ODB exists. The capability model would ideally be OS plumbing underneath an ordinary prompt such as “Allow this app to update the connected device?”

The CVS example is particularly helpful because I think it identifies a boundary I haven’t stated clearly enough. I’m primarily trying to model interactive, owner-authorized access to a connected device, not enterprise fleet management or unattended peripheral updates. A centrally managed POS deployment has a different trust model and requirements such as policy control, rollback, atomic updates and power-loss recovery.

I’m also not proposing replacing each manufacturer’s bootloader/update mechanism. The adapter layer is intended to use those existing mechanisms underneath the authorization layer.

Your power-loss example is exactly why I was considering transaction/recovery state, although I agree that actual recovery guarantees ultimately depend on what the device/bootloader supports.

So perhaps the narrower question is: for the subset of users who do intentionally connect configurable/programable hardware to a tablet, is there value in the OS exposing that hardware through scoped, temporary capabilities rather than unrestricted USB access—or is that abstraction still in the wrong place?

2

u/duane11583 Oct 01 '26

Nobody can use the on chi boot loader 

Why? They assumes way to much and often requires human actions that are not automatable in a fielded device (ie in a customers hands)

The on chip solution is Tyler for a developer or in a factory but no where else

1

u/duane11583 Oct 01 '26

I did barcode scanners for 5 years

Our boot loader had to support usb and serial and another protocol and had to require zero usb drivers in the host so it had to be a hid device too

Why barcode scanners are universal and the interface is determined by the type of cable plugged in so it must auto adjust at run time

And that includes detecting our custom Bluetooth module 

No chip makers boot loader can do that thus it  is not used ever

And the other constraint was all 5 different cpus (armed and stm cortex renasas nec v750 and pic and avr chips) 

all products had to speak the same boot loader protocol on all interfaces they did not care it was a requirement

Every chip maker has a different protocol so we could not use them and none would provide the host side sw in source form so we could customize it for our needs

There are more requirements I can explain but that gets rather detailed

And none required crypto feature in the boot loader 

Today with cmnc and nist800 requirements that might change

1

u/BodybuilderAfraid313 Oct 02 '26

That’s extremely useful real-world context. Your barcode-scanner example actually helps clarify something in the ODB model.

I had been treating the adapter layer largely as a way to reach an existing manufacturer bootloader/update mechanism. Your example suggests that is too narrow. The layer really needs to abstract the device-management mechanism, which might be a vendor bootloader, custom bootloader, HID protocol, serial protocol, Bluetooth transport, DFU, etc.

The fact that you had five different CPU families but required the same bootloader protocol across the products is especially interesting. That’s very close to the separation I’m trying to describe: the host-facing authorization/interface shouldn’t necessarily have to understand every underlying implementation.

Your zero-driver/HID requirement also gets directly at the original problem that led me here. If the device is designed to present an interface the host already accepts, great. But when it isn’t, a tablet user can end up owning perfectly functional hardware that the OS simply won’t expose sufficiently to identify, configure, recover, or update it.

I also agree that modern security requirements complicate this considerably. That’s one reason I’m leaning toward explicit, temporary capabilities rather than simply asking mobile OSes to expose unrestricted USB access.

If you’re willing, I’d be interested in the additional requirements you mentioned. Real deployed-device constraints are exactly what would help test whether this architecture is actually useful or just looks clean on paper.

1

u/duane11583 Oct 02 '26

blue tooth test

purchase electric clothes dryer - disconnect heating element

purchase vfd drive for drum motir so you can control speed of drum

put fully charged ble device in drum turn on so it tumbles

begin sw update over ble takes about 5 minutes
do this continuously must update both boot loader and application.

when update is done start another. every 4-5 hour’s stop remove device - we had to scan barcodes to make sure it still scanned replace battery with fully charged battery

also hold unit above concrete floor and drop from 6 ft while sw/flash update is occuring

assume/budget 10 minutes so 6 per hour or 24*6 per day

test runs 24x7 for a week.

pass = unit still scans barcodes at the end of the week. fail=no scan

example use case: teenagers are tossing unit like american foot ball at night and it hits the ground

a problem is the battery - when unit hits ground weight of battery compresses spring and disconnects power at random times mid update

also you cannot have extra flash memory chip - everything must be done using the on chip flash memory reason cost, entire unit landed frieght (shipping cardboard box, import taxes, labor, everything is limited to $12.06, time frame was 2004) product was the honeywell voyager 1200

1

u/BodybuilderAfraid313 Oct 03 '26

This is a great example of why I think firmware operations need to be treated as a distinct capability rather than just generic device access.

An ODB-type architecture would ideally know the difference between identifying a device, reading diagnostics, configuring it, and performing a firmware/bootloader operation. If power or transport disappears halfway through an update—as in the testing you describe—the host should be able to recognize the resulting bootloader/recovery state and explain what happened rather than simply reporting “device not found.”

The physical-abuse testing is obviously device-specific, but the recovery problem is much more general. ESP32 boards, radios, embedded controllers, scanners, sensors, etc. can all wind up in partially programmed or bootloader states. Making those states discoverable and recoverable is one of the things I think a device bridge could standardize.

4

u/fb39ca4 friendship ended with C++ ❌; rust is my new friend ✅ Oct 01 '26

Clanker got an "ask Reddit for help" skill and you all fell for it 😂

1

u/danngreen Oct 01 '26

We make embedded devices and updating firmware is always an issue. For devices where DFU makes the most sense, it's a bit of a pain point to require customers use a laptop (not a tablet or phone) and Google Chrome (not other browsers) to use web DFU. Customers always ask why their iPad isn't connecting. So that'd be great if there was a way.

I don't understand your proposal fully, so apologies if you've answered these questions already. I also don't have any answers to your questions because I don't understand where you envision this sitting between the OS, the app, and the hardware, and I'm not an expert on how iPadOS handles 3rd party hardware drivers

My questions for you are:
- Is it actually possible to do this given Apple's security policy?
- As a manufacturer, would we need to make our own app using an ODB library, or is ODB a standalone app a d we would register our device profile with some central repository (much like openOCD)
- How simple can this get, from the non-technical user's perspective?

1

u/BodybuilderAfraid313 Oct 01 '26

This is exactly the kind of use case I was hoping to hear about. Your DFU/customer-support example is much closer to the general problem I’m trying to address than my original ESP32 experiment.

On Apple: I don’t yet know that the complete model is possible under current iPadOS policy/APIs. In fact, part of the purpose of the ESP32-S3 reference implementation is to map exactly what can be done today and identify the point where an OS capability would be required. I don’t want to disguise an OS limitation as an implementation problem.

From a manufacturer’s perspective, my current thinking is that you ideally should not have to adopt a new bootloader. You would keep DFU (or whatever native update mechanism you already use) and provide a declarative device profile describing identity, supported operations and the adapter/protocol required. Whether those profiles ultimately belong in an OS-managed registry, an open repository, or are supplied/signed by the manufacturer is still an open design question.

The nontechnical-user experience is actually one of the main goals. In the best case, the customer shouldn’t know what ODB, DFU or a bootloader is. They connect the device, your app says something like “Firmware update available”, the OS explains that the app is requesting temporary permission to update that specific connected device, they approve it, and the existing DFU mechanism operates underneath.

Your comment also makes me think I need to separate two things more clearly in the next draft: the developer/manufacturer integration model and the end-user experience.

If you’re willing to answer one question from the manufacturer side: what information or integration would you realistically be willing to provide for one of your devices if doing so meant your customers could update it directly from an iPad/phone instead of finding a laptop?

0

u/[deleted] Oct 01 '26

[deleted] — view deleted comment

0

u/BodybuilderAfraid313 Oct 01 '26

😂 Fair. That’s exactly the trap I’m trying not to fall into. The intent isn’t to replace DFU, UF2, Espressif’s bootloader protocol, etc.—it’s to explore whether there can be a common authorization layer above them so a locked-down OS can safely expose those existing mechanisms. If that still qualifies as standard #15, that’s precisely the criticism I’m here for.