John Costik got the call at the office in 2012. It was his wife, Laura, with terrible news: Their 4-year old son, Evan, was headed into the emergency room.

His blood sugar reading was sky high, about 535 mg/dl, and doctors had discovered he had Type 1 diabetes. The first three days in the hospital were a blur during which the Costiks, engineers in Rochester, N.Y., received a crash course in managing the basics of diabetes care.

For starters, they were told to log their son's numbers on paper forms. It was their first hint that diabetes management did not occupy a place on technology's bleeding edge. The methods for guesstimating carbohydrate intake also seemed imprecise, John Costik found, and the process generated a lot of wasted data.

"The last thing you want to do is find some form and fill it out," he said. "You're really just emotionally trying to cope with it, and that data in that book isn't necessarily useful to the people with diabetes."

Translator

To read this article in one of Houston's most-spoken languages, click on the button below.

Several months later, Costik fitted his son with a Dexcom G4 continuous glucose monitor. A hair-thin sensor under Evan's skin recorded an exact blood sugar reading at 5-minute intervals, 24 hours a day.

But all that data left with Evan every morning when he headed off to day care. Costik wanted something better: continuous access to his son's glucose readings.

So he examined the device's software code and wrote a simple program that transmitted the monitoring data to an online spreadsheet he could view on a Web browser, Android mobile phone or, eventually, his Pebble smartwatch.

"I wanted our lives to be simple," Costik said, "and I wanted Evan to live a long time, and diabetes to be a nuisance, not a huge struggle."

Costik shared a photograph of his simple hack on Twitter - and discovered a legion of parents who were eager to tailor off-the-shelf devices into homemade solutions. Together, they have set in motion a remarkable, egalitarian push for improved technology to manage diabetes care, rarely seen in the top-down world of medical devices.

In 2014, the last year for which data is available, the Centers for Disease Control and Prevention estimated that 29 million adults were living with diabetes. Of these, 5 to 10 percent had Type 1, which develops when the body's immune system destroys pancreatic beta cells.

Now, as consumer gadgets weave themselves ever more tightly into everyday life, patients and their families are finding homespun solutions to problems medical-device manufacturers originally did not address. Industry executives say the pace of user-driven innovation was one reason the Food and Drug Administration recently reclassified remote glucose-monitoring devices, hastening approval for new models by big companies like Dexcom and Medtronics.

James Wedding, a civil engineer who lives outside Dallas, saw Costik's Twitter post and used his code to set up a remote monitor system for his daughter, Carson, who is now 12.

"Once I got all the pieces together, I remember crying - not quite in sadness, just in utter amazement - the first time I could see her numbers displayed on my computer screen and she was on the other side of the house," Wedding said.

"It is such a change in your relationship when the first question out of your mouth when you talk to your son, your daughter, your spouse, your brother, whatever, is no longer, 'Hey, what's your number?' It's 'How was math class? How was work? What are you up to today?' "

Lane Desborough, an engineer in California, got in touch with Costik after seeing his tweet, ultimately creating an open-source system based in part on Costik's code. It allows anyone to hack existing glucose monitors so they transmit readings to the cloud, where they can be read by patients and caregivers.

Desborough called the project Nightscout. The Nightscout group on Facebook, known as CGM in the Cloud, provides free tech support for users trying to improve on monitoring devices.

About two dozen users have even started a project called Open APS, in which they are pairing insulin pumps with glucose monitors in an effort to create an open-source artificial pancreas system. These wearable devices, which automate insulin delivery, are being tested in academic settings, but these early adopters are not waiting for the results of those continuing clinical trials.

Costik now works at the Center for Clinical Innovation at the University of Rochester, where he strives to improve management options for all patients; Desborough is now the chief engineer at Bigfoot Biomedical, a startup in Palo Alto, Calif., that plans to create an artificial pancreas.

More recently, the home tinkering projects have buoyed a patient-led initiative to make generic insulin. Anthony Di Franco, a founder of the biotech hacker space Counter Culture Labs in Oakland, Calif., has had diabetes for 10 years. Di Franco saw what parents with diabetic children were doing with glucose monitoring devices and wondered why, even with insurance coverage, a three-month supply of insulin often totaled hundreds of dollars.

"I was frustrated with the situation," he said.

With available laboratory tools, and a wealth of available academic literature, he set out to learn whether insulin could be home-brewed on a small scale. After some research, Di Franco realized, "We can do it, and we can do it now. All of the tools already exist."

Last year, the Open Insulin Project raised $16,656 in one of the more ambitious efforts to radically transform diabetes care. So far, the small team of researchers has inserted the genes that make proinsulin (the form of insulin produced by the human body) into E. coli bacteria and began culturing the organism on a larger scale.

The intent is not to make insulin at home, or on an industrial scale. Any drug that is injected comes with substantial risks and would face considerable regulatory scrutiny. Rather, the hackers hope to be able to demonstrate the technological feasibility. Within a year or two, Di Franco said he envisions handing off the protocols and any intellectual property to a generics manufacturer.

"One thing that would make me happy," he said, "is that if more people who needed insulin got a hold of it by whatever means necessary."

Dr. Jeremy Greene, a physician and historian at Johns Hopkins University, who recently wrote in The New England Journal of Medicine about the lack of generic insulin, said patients with diabetes had a long history of tinkering with existing technology, even in ways that were not officially sanctioned.

Greene argues that while manufacturers in insulin are making innovations - the newest forms of insulin are substantial improvements over earlier products - they stop producing the older forms once they lose patent protection. Patients and their insurers pay a high price for patented insulin or go without.

Biohackers are attempting to resurrect an older product to address the lack of generic insulin, Greene said.

"I don't think that we should be surprised that a population of technologically savvy patients, whose lives are dependent on access to a supply of a biological agent, should be interested in taking means of production into their own hands, especially at time when insulin prices have risen at unpredictably alarming rates."