JanOS

Repurposing Smartphones as IoT Hardware

When it comes to choosing which hardware to use to prototype a new connected device, there are more options that you can shake a stick at. But before you start comparing processor speeds and counting GPIO pins, consider whether you need to shell out $100 or more for an Arduino or Raspberry Pi, plus the add-ons that would let it talk to wireless networks over Wi-Fi, cellular or other protocols. There are cheaper devices out there with all of the same capabilities…and you might have one in your pocket right now.

Yes, we’re talking about smartphones. Tucked inside just about any handset are all the same kinds of components found in typical development boards, plus: Wi-Fi, Bluetooth and cellular radios; several gigabytes of storage; speakers and microphones; cameras; accelerometers, gyroscopes and compasses; and even touchscreens. And while the newest top-end model from Motorola or Apple might break the bank, low-end or used models are both plentiful and cheap—especially in countries outside the U.S.

That’s the insight that motivated JanOS, an operating system developed specifically to control the mainboard of a mobile phone as though it’s an embedded computing device on the Internet of Things. Named for Jan Jongboom, who has driven the bulk of the project at Norwegian telecom subsidiaryTelenor Digital, JanOS is built on the same foundation as Firefox OS. Essentially, it’s a replacement for the Firefox OS user interface that assumes the phone no longer has its own display; that means developers can still interact with the hardware using Firefox OS APIs, as well as some new ones introduced by JanOS.

JanOS can run on any rooted device that is capable of running Firefox OS, which includes those designed specifically for Firefox OS as well as Android devices for which Firefox OS has been ported. As more ports show up, more phones will be compatible as scrap parts for building JanOS devices. Jongboom has also posted the source code on GitHub, so other developers may be able to help improve the project and more quickly extend it to other phones’ chipsets.

The idea of repurposing smartphone hardware could have big implications for manufacturing Internet of Things devices. For one thing, it’s a clever way to reuse the hardware from outdated or discarded phones; for another, it could give IoT developers the option to buy hardware that, thanks to the ubiquity of mobile phones, is already being manufactured in bulk—and at dirt-cheap bulk prices.

On the other hand, components like the ESP8266 module—which packs Wi-Fi connectivity and processing power into small, inexpensive boards and can be programmed with the popular Arduino development environment—are already bringing down the cost of accessible IoT hardware.

To learn more about the JanOS project, check out Jongboom’s presentation from JSConf.EU 2014 in the video below.

Related: IoT Hardware Roundup, ESP8266 Development Module

JanOS
[gravityform id="38" title="false" description="false" ajax="true" tabindex="49"]
<div class='gf_browser_unknown gform_wrapper' id='gform_wrapper_38' ><div id='gf_38' class='gform_anchor' tabindex='-1'></div><form method='post' enctype='multipart/form-data' target='gform_ajax_frame_38' id='gform_38' action='/repurposing-smartphones-as-iot-hardware-janos/#gf_38'> <div class='gform_body'><ul id='gform_fields_38' class='gform_fields top_label form_sublabel_below description_below'><li id='field_38_2' class='gfield field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label gfield_label_before_complex' >Your Name</label><div class='ginput_complex ginput_container no_prefix has_first_name no_middle_name no_last_name no_suffix gf_name_has_1 ginput_container_name' id='input_38_2'> <span id='input_38_2_3_container' class='name_first' > <input type='text' name='input_2.3' id='input_38_2_3' value='' aria-label='First name' tabindex='50' aria-invalid="false" /> <label for='input_38_2_3' >First</label> </span> </div></li><li id='field_38_3' class='gfield field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_38_3' >Can you share a high level overview of what you are looking for?</label><div class='ginput_container ginput_container_textarea'><textarea name='input_3' id='input_38_3' class='textarea medium' tabindex='54' aria-invalid="false" rows='10' cols='50'></textarea></div></li><li id='field_38_4' class='gfield field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_38_4' >Best way to reach you?</label><div class='ginput_container ginput_container_text'><input name='input_4' id='input_38_4' type='text' value='' class='medium' tabindex='55' aria-invalid="false" /></div></li> </ul></div> <div class='gform_footer top_label'> <input type='submit' id='gform_submit_button_38' class='gform_button button' value='Submit' tabindex='56' onclick='if(window["gf_submitting_38"]){return false;} window["gf_submitting_38"]=true; ' onkeypress='if( event.keyCode == 13 ){ if(window["gf_submitting_38"]){return false;} window["gf_submitting_38"]=true; jQuery("#gform_38").trigger("submit",[true]); }' /> <input type='hidden' name='gform_ajax' value='form_id=38&amp;title=&amp;description=&amp;tabindex=49' /> <input type='hidden' class='gform_hidden' name='is_submit_38' value='1' /> <input type='hidden' class='gform_hidden' name='gform_submit' value='38' /> <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' /> <input type='hidden' class='gform_hidden' name='state_38' value='WyJbXSIsIjI0MzNjYTY3YTUxNWM5ZTM5NmFkOWNiZWJiMjkyMDYyIl0=' /> <input type='hidden' class='gform_hidden' name='gform_target_page_number_38' id='gform_target_page_number_38' value='0' /> <input type='hidden' class='gform_hidden' name='gform_source_page_number_38' id='gform_source_page_number_38' value='1' /> <input type='hidden' name='gform_field_values' value='' /> </div> </form> </div> <iframe style='display:none;width:0px;height:0px;' src='about:blank' name='gform_ajax_frame_38' id='gform_ajax_frame_38'>This iframe contains the logic required to handle Ajax powered Gravity Forms.</iframe> <script type='text/javascript'>jQuery(document).ready(function($){gformInitSpinner( 38, 'https://www.postscapes.com/wp-content/plugins/gravityforms/images/spinner.gif' );jQuery('#gform_ajax_frame_38').on('load',function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_38');var is_confirmation = jQuery(this).contents().find('#gform_confirmation_wrapper_38').length > 0;var is_redirect = contents.indexOf('gformRedirect(){') >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery('html').css('margin-top'), 10) + parseInt(jQuery('body').css('margin-top'), 10) + 100;if(is_form){jQuery('#gform_wrapper_38').html(form_content.html());if(form_content.hasClass('gform_validation_error')){jQuery('#gform_wrapper_38').addClass('gform_validation_error');} else {jQuery('#gform_wrapper_38').removeClass('gform_validation_error');}setTimeout( function() { /* delay the scroll by 50 milliseconds to fix a bug in chrome */ jQuery(document).scrollTop(jQuery('#gform_wrapper_38').offset().top - mt); }, 50 );if(window['gformInitDatepicker']) {gformInitDatepicker();}if(window['gformInitPriceFields']) {gformInitPriceFields();}var current_page = jQuery('#gform_source_page_number_38').val();gformInitSpinner( 38, 'https://www.postscapes.com/wp-content/plugins/gravityforms/images/spinner.gif' );jQuery(document).trigger('gform_page_loaded', [38, current_page]);window['gf_submitting_38'] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('.GF_AJAX_POSTBACK').html();if(!confirmation_content){confirmation_content = contents;}setTimeout(function(){jQuery('#gform_wrapper_38').replaceWith(confirmation_content);jQuery(document).scrollTop(jQuery('#gf_38').offset().top - mt);jQuery(document).trigger('gform_confirmation_loaded', [38]);window['gf_submitting_38'] = false;}, 50);}else{jQuery('#gform_38').append(contents);if(window['gformRedirect']) {gformRedirect();}}jQuery(document).trigger('gform_post_render', [38, current_page]);} );} );</script><script type='text/javascript'> jQuery(document).bind('gform_post_render', function(event, formId, currentPage){if(formId == 38) {} } );jQuery(document).bind('gform_post_conditional_logic', function(event, formId, fields, isInit){} );</script><script type='text/javascript'> jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render', [38, 1]) } ); </script>
[gravityform id="38" title="false" description="false" ajax="true" tabindex="49"]
<div class='gf_browser_unknown gform_wrapper' id='gform_wrapper_38' ><div id='gf_38' class='gform_anchor' tabindex='-1'></div><form method='post' enctype='multipart/form-data' target='gform_ajax_frame_38' id='gform_38' action='/repurposing-smartphones-as-iot-hardware-janos/#gf_38'> <div class='gform_body'><ul id='gform_fields_38' class='gform_fields top_label form_sublabel_below description_below'><li id='field_38_2' class='gfield field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label gfield_label_before_complex' >Your Name</label><div class='ginput_complex ginput_container no_prefix has_first_name no_middle_name no_last_name no_suffix gf_name_has_1 ginput_container_name' id='input_38_2'> <span id='input_38_2_3_container' class='name_first' > <input type='text' name='input_2.3' id='input_38_2_3' value='' aria-label='First name' tabindex='50' aria-invalid="false" /> <label for='input_38_2_3' >First</label> </span> </div></li><li id='field_38_3' class='gfield field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_38_3' >Can you share a high level overview of what you are looking for?</label><div class='ginput_container ginput_container_textarea'><textarea name='input_3' id='input_38_3' class='textarea medium' tabindex='54' aria-invalid="false" rows='10' cols='50'></textarea></div></li><li id='field_38_4' class='gfield field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_38_4' >Best way to reach you?</label><div class='ginput_container ginput_container_text'><input name='input_4' id='input_38_4' type='text' value='' class='medium' tabindex='55' aria-invalid="false" /></div></li> </ul></div> <div class='gform_footer top_label'> <input type='submit' id='gform_submit_button_38' class='gform_button button' value='Submit' tabindex='56' onclick='if(window["gf_submitting_38"]){return false;} window["gf_submitting_38"]=true; ' onkeypress='if( event.keyCode == 13 ){ if(window["gf_submitting_38"]){return false;} window["gf_submitting_38"]=true; jQuery("#gform_38").trigger("submit",[true]); }' /> <input type='hidden' name='gform_ajax' value='form_id=38&amp;title=&amp;description=&amp;tabindex=49' /> <input type='hidden' class='gform_hidden' name='is_submit_38' value='1' /> <input type='hidden' class='gform_hidden' name='gform_submit' value='38' /> <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' /> <input type='hidden' class='gform_hidden' name='state_38' value='WyJbXSIsIjI0MzNjYTY3YTUxNWM5ZTM5NmFkOWNiZWJiMjkyMDYyIl0=' /> <input type='hidden' class='gform_hidden' name='gform_target_page_number_38' id='gform_target_page_number_38' value='0' /> <input type='hidden' class='gform_hidden' name='gform_source_page_number_38' id='gform_source_page_number_38' value='1' /> <input type='hidden' name='gform_field_values' value='' /> </div> </form> </div> <iframe style='display:none;width:0px;height:0px;' src='about:blank' name='gform_ajax_frame_38' id='gform_ajax_frame_38'>This iframe contains the logic required to handle Ajax powered Gravity Forms.</iframe> <script type='text/javascript'>jQuery(document).ready(function($){gformInitSpinner( 38, 'https://www.postscapes.com/wp-content/plugins/gravityforms/images/spinner.gif' );jQuery('#gform_ajax_frame_38').on('load',function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_38');var is_confirmation = jQuery(this).contents().find('#gform_confirmation_wrapper_38').length > 0;var is_redirect = contents.indexOf('gformRedirect(){') >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery('html').css('margin-top'), 10) + parseInt(jQuery('body').css('margin-top'), 10) + 100;if(is_form){jQuery('#gform_wrapper_38').html(form_content.html());if(form_content.hasClass('gform_validation_error')){jQuery('#gform_wrapper_38').addClass('gform_validation_error');} else {jQuery('#gform_wrapper_38').removeClass('gform_validation_error');}setTimeout( function() { /* delay the scroll by 50 milliseconds to fix a bug in chrome */ jQuery(document).scrollTop(jQuery('#gform_wrapper_38').offset().top - mt); }, 50 );if(window['gformInitDatepicker']) {gformInitDatepicker();}if(window['gformInitPriceFields']) {gformInitPriceFields();}var current_page = jQuery('#gform_source_page_number_38').val();gformInitSpinner( 38, 'https://www.postscapes.com/wp-content/plugins/gravityforms/images/spinner.gif' );jQuery(document).trigger('gform_page_loaded', [38, current_page]);window['gf_submitting_38'] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('.GF_AJAX_POSTBACK').html();if(!confirmation_content){confirmation_content = contents;}setTimeout(function(){jQuery('#gform_wrapper_38').replaceWith(confirmation_content);jQuery(document).scrollTop(jQuery('#gf_38').offset().top - mt);jQuery(document).trigger('gform_confirmation_loaded', [38]);window['gf_submitting_38'] = false;}, 50);}else{jQuery('#gform_38').append(contents);if(window['gformRedirect']) {gformRedirect();}}jQuery(document).trigger('gform_post_render', [38, current_page]);} );} );</script><script type='text/javascript'> jQuery(document).bind('gform_post_render', function(event, formId, currentPage){if(formId == 38) {} } );jQuery(document).bind('gform_post_conditional_logic', function(event, formId, fields, isInit){} );</script><script type='text/javascript'> jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render', [38, 1]) } ); </script>