Systems and methods are described, including a system for electrostimulation. The system includes a patch (22), including a plurality of electrodes (24a, 24b), and a mobile device (28). A processor (30) of the mobile device is configured to receive an input from a subject (20) that indicates that the subject is experiencing a headache, and, in response to the input, while the patch is coupled to the subject, wirelessly communicate a control signal that causes the electrodes to stimulate the subject. Other embodiments are also described.