{"id":901,"date":"2010-08-16T15:50:20","date_gmt":"2010-08-16T08:50:20","guid":{"rendered":"http:\/\/deepquest.code511.com\/blog\/?p=901"},"modified":"2010-08-16T15:50:20","modified_gmt":"2010-08-16T08:50:20","slug":"install-a-virtual-gsm-relay-bts-on-android","status":"publish","type":"post","link":"https:\/\/deepquest.code511.com\/blog\/2010\/08\/install-a-virtual-gsm-relay-bts-on-android\/","title":{"rendered":"Install a virtual GSM relay (BTS) on Android"},"content":{"rendered":"<p>With minimal work it\u2019s possible to get\u00a0<a href=\"http:\/\/gnuradio.org\/\">gnuradio<\/a> and<a href=\"http:\/\/openbts.sourceforge.net\/\">OpenBTS<\/a> working on the ARMEL architecture used on the Droid, allowing my Droid to act as a base station to which handsets can connect; the Droid then connects calls using an on-board Asterisk server and routes them to the PSTN via SIP over Verizon\u2019s 3G network.<\/p>\n<p>The quick version: I can provide voice and SMS connectivity to local GSM handsets using nothing but a Droid and a USRP.<\/p>\n<p><!--more-->A quick log of what you\u2019ll need to replicate this. This is from memory so I may have missed something; fortunately there\u2019s an easier way that I\u2019ll come back to.<\/p>\n<p>&#8211; Root the Droid and install\u00a0<a href=\"http:\/\/www.sholes.info\/\">Sholes Mod<\/a>.<br \/>\n&#8211; Mount your SD card in a desktop machine and create an EXT3 partition. I shrank the FAT32 partition but left it otherwise intact, this is probably a good idea if you want to still take pictures.<br \/>\n&#8211; debootstrap into the new ext3 partition, bearing in mind the new architecture (use the two-stage debootstrap with \u2013foreign)<br \/>\n&#8211; Put the SD card back in the Droid, and mount the EXT3 partition (you\u2019ll probably need to manually insmod the ext3 and jbd modules)<br \/>\n&#8211; \u201cmount -o bind\u201d all of the system filesystems into the mounted EXT3 environment (including \/dev, \/dev\/pts, and \/sys)<br \/>\n&#8211; Mount usbfs in the mounted filesystem at \/proc\/bus\/usb (if you don\u2019t it won\u2019t find the USRP)<br \/>\n&#8211; chroot into the new Debian environment, and debootstrap \u2013second-stage<br \/>\n&#8211; Go get dinner \u2013 it\u2019ll be a while<br \/>\n&#8211; Install all the usual dependancies for building gnuradio (if you can\u2019t figure this out on your own you\u2019re in the wrong place!)<br \/>\n&#8211; Configure gnuradio with .\/configure \u2013disable-all-components \u2013enable-usrp \u2013enable-omnithread \u2013enable-mblock \u2013enable-pmt<br \/>\n&#8211; Patch for 52MHz clock (I highly doubt that Droid can handle the stock 64MHz clock)<br \/>\n&#8211;\u00a0<a href=\"http:\/\/gnuradio.org\/redmine\/issues\/show\/415\">Patch the gnuradio makefiles for ARMEL<\/a><br \/>\n&#8211; Build gnuradio (again, it\u2019ll be a while)<br \/>\n&#8211; Install libosip2-3.3.0 from source (the Debian package is out of date)<br \/>\n&#8211; Download and .\/configure the openbts source, but don\u2019t build it<br \/>\n&#8211; Apply the same makefile patch in Transceiver\/ and Transceiver52M\/ (or you\u2019ll get the same build error)<br \/>\n&#8211; Build OpenBTS<br \/>\n&#8211; Install Asterisk (from the debian packages is fine)<br \/>\n&#8211; Configure as you wish, then connect the USRP (via a powered hub) in Host mode and have fun!<\/p>\n<p>The easier way that I mentioned before would be for me to just zip up an image of my SD card and slap it on a fileserver somewhere public \u2013 I\u2019ll also include some scripts to mount it and start everything up correctly. Give me a few days to clean it up and watch on Twitter for the link, it should be as simple as dropping 2 files on the SD card and then running one of them as root.<\/p>\n<p>I\u2019ll also post video of the Droid connecting a call (that sounds far less cool than it should) at some point, I\u2019m also considering running a workshop on all of this if there\u2019s any interest\u2026?<\/p>\n<p>credit: Chris Paget<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With minimal work it\u2019s possible to get\u00a0gnuradio andOpenBTS working on the ARMEL architecture used on the Droid, allowing my Droid to act as a base station to which handsets can&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"","_seopress_redirections_param":"","_seopress_redirections_type":0,"_seopress_analysis_target_kw":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[108,85],"tags":[],"class_list":["post-901","post","type-post","status-publish","format-standard","hentry","category-android-2","category-smartphone"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4bBYZ-ex","jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/posts\/901","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/comments?post=901"}],"version-history":[{"count":2,"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/posts\/901\/revisions"}],"predecessor-version":[{"id":904,"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/posts\/901\/revisions\/904"}],"wp:attachment":[{"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/media?parent=901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/categories?post=901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/tags?post=901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}