LogbookReachy Mini

2012 iPad mini: the tablet nobody was waiting for, now the robot's remote

Log
28 of 39
Date
Reading
3 min read

In the drawer sat a first-generation iPad mini, released in 2012. Thirty-two gigabytes, a battery that still holds, and a system stuck forever on iOS 9.3.5: the last version Apple gave it. The 2011 phone that served as the robot’s remote is waiting for a new battery. The tablet took over.

Three closed doors

Wi-Fi first. The password was right, and the tablet still refused to connect. The home network runs in mixed mode, the older WPA2 security and the newer WPA3 at the same time. iOS 9 predates WPA3, and the mix confuses it. The fix already existed on the router: a secondary WPA2-only network, meant for connected devices.

Then the App Store. Apple ID accepted, verification code accepted, and still “Cannot connect to iTunes Store”. To find out why, I read the tablet’s system log over the USB cable. Apple’s servers answer “403”, meaning “forbidden”. Not a wrong password, not a wrong clock: a refusal, on Apple’s side. No new app will ever install.

Finally, the browser. What remains is Safari, in its 2016 version. Before writing anything, I ran it through a test page that reports its answers back to the computer. It knows neither arrow functions, nor let and const, nor fetch, nor CSS grid. It can, however, send old-style requests, lay out pages with flexbox, and above all keep a connection open with the server to receive messages from it (EventSource). Screen: 1024 × 768, not Retina.

No app possible, so a web page, written in the JavaScript this Safari understands.

The robot only talks to itself

First try, first refusal. The robot accepts commands sent by a web page, as long as it comes from the machine itself: localhost, or its desktop app. A page served by another device on the network gets “origin not allowed”. That’s a browser protection called CORS, and it is set up properly.

The workaround: a small server on the computer serves the page and relays its commands to the robot. To the browser, everything comes from the same address. To the robot, the computer is the one talking. The relay only lets through a list of driving commands: not the robot’s Wi-Fi, not its updates, not its shutdown.

What the remote does

At the top, a status light: green awake, orange asleep, red unreachable. Next to it, the volume, face tracking and a Stop button.

On the left, the camera image, through the same relay as for the phone: a Raspberry Pi that turns the robot’s video into plain JPEG images, which this old Safari displays without effort. Below, Wake up and Sleep.

On the right, a pad: the head follows the finger, with the same recipe as on the phone (twenty-five positions per second, each covering 30% of the remaining distance, so the head glides instead of jerking). One slider for height, one for the antennas, and something new: body rotation.

At the bottom, three tabs: favourites, then all 86 emotions and all 19 dances the robot can play.

Screenshot of the remote at iPad mini size: at the top the robot's state, asleep, the volume and a Stop button; on the left the camera area, off, with Camera, Photo, Wake up and Sleep buttons; on the right the head pad, the height slider, the antenna and body sliders; at the bottom the Favourites, Emotions and Dances tabs with eighteen emotion buttons.

The tablet also takes orders from the computer

Since this Safari can keep a connection open, the page listens to the server all the time. From the computer, one command line is enough to show a big message on the tablet, switch tabs, start an emotion or a dance, turn the camera on, or reload the page after an update. Orders are only accepted when they come from the computer itself.

Taking over the whole tablet, opening any app remotely, would mean jailbreaking it. No need: the page is enough.

The takeaway

An old tablet doesn’t need apps to be useful. You need to know what its browser understands, measure it rather than assume it, and write for it. Everything else happens on the server side, where the tools are modern.

Lire en français