[How to] Using VOIP + Encrypted VPN, just confirmed working in Belize - EVO 4G General

I'd like to save everyone the trouble of figuring out how to get this done by sharing my setup with you. The VOIP itself works great over 3G/4G and Wifi, but to use the VPN you'll need to be on Wifi, 3g VPN doesn't seem to work.
Requirements:
SipDroid app in the market
A free account at pbxes.org
A paid account at callcentric.com (~$.019 a minute to call anywhere in the US)
A paid account at SuperVPN.net ($4 /mo if you pay for the whole year)
First set up a pbxes.org account, and connect to it with the SipDroid app, I recommend using this guide to walk you through the process.
http://guardianproject.info/2010/05...e-mobile-phone-system-for-android-and-beyond/
Once you have that working there is one crucial adjustment to be made within SipDroid. For some reason it comes default with all sorts of audio codecs, but only ONE of them seemed to work on the EVO, the Speex codec. So go into audio codecs and switch everything but speex to "never".
After that you should have a working VOIP system but you'll still need some kind of trunk if you want to make outgoing calls to land lines or cell phones. There are many solutions for this but I recommend callcentric.com, they seem to be the most recommended for this type of setup, and they worked great for me. You can pay $20 a month for unlimited US calling, this means you can be anywhere in the world and call the US for just $20 a month. Or you can prepay (this is what I did), then you pay a flat rate of about $.019 a minute to call the US from anywhere, and if you reach you pre paid limit, it just cuts off until you recharge it.
Once you have your callcentric account purchased, just go into your pbxes.org admin area and under trunks add one for call centric, use your callcentric # as the username, and callcentric.com as the sip server. Then go under Outbound routing, add a new one, name it whatever and choose your callcentric trunk from the pulldown menu, submit the changes and you're done.
Now you should be able to successfully make outbound calls to anywhere using SipDroid.
Lastly, this was the most challenging for me, the VPN. Apparently android, including 2.2, has some major issues with maintaining vpn connections, especially when you try and use them for VOIP. There is a huge issue queue in the android google groups forum where the problem is openly discussed without a real solution. BUT, while it appears the majority of VPN connections will fail, they CAN work if you get it set up just right. Setting up VPN's, specifically VPN's tailored for mobile devices, is not something I know how to do. In the android group thread someone mentioned SuperVPN.net as a working solution, I checked it out and sure enough they work great, I had zero problems with them the whole time I was out of the country.
So create a supervpn.net account, and then on your phone go into Menu -> Wireless & Networks -> VPN -> Add VPN -> Add PPTP VPN, create the connection and you are good to go.
*I didn't set up an inbound call # with callcentric as I didn't need one, I assume after you upgrade your callcentric account, adding the inbound trunk is similar to the outbound. Be sure and look into getting a free inbound number from sipgate.com before you go and pay for one, you'll be locked to a California area code, but free is free.

An alternative I use is having an Asterisk server at home and use IAXAgent from the market. IAX does not have the problems that SIP does when going over NAT. I can make calls over 3G or wifi. A lot of SIP providers also provide IAX accounts. IAX is just a better way to go for making calls over the Internet. SIP is excellent for the LAN.

ChrisDos said:
An alternative I use is having an Asterisk server at home and use IAXAgent from the market. IAX does not have the problems that SIP does when going over NAT. I can make calls over 3G or wifi. A lot of SIP providers also provide IAX accounts. IAX is just a better way to go for making calls over the Internet. SIP is excellent for the LAN.
Click to expand...
Click to collapse
Oops.. the method I posted actually works on 3g and 4g also, it's only the VPN that requires Wifi, I had worded it incorrectly, now it's fixed. (thank you)
I looked into setting up an asterisk server, but I didn't want to have to depend on my own server or home connection being available whenever I needed it, especially when I was traveling for more than a week.
Is IAX the same as a trunk, does it cost anything to connect to land lines or cellphones?

True, you method does make SIP work because you are using a VPN. IAX is an alternative to SIP. It is NAT friendly, and as long as the port is not blocked, it just works. Though, there are a fewer choices for clients compared to SIP. IAX was created by the Asterisk team. I do not know of any VOIP systems that support IAX, bug that does not mean they dont exist. I am a heavy Astersk guy, so IAX was my cup of tea.

What advantages does this have over google voice?
I'm curious cause i'll be going to england soon and would be nice to make calls over wifi.

ShoxV said:
What advantages does this have over google voice?
I'm curious cause i'll be going to england soon and would be nice to make calls over wifi.
Click to expand...
Click to collapse
None, in fact, it his disadvantages (See below). Also, most businesses, schools, etc. will block just about every VPN method. OpenVPN is the most flexible one I have found, which might be able to sneak around by using alternate sub-1000 ports (which most places won't block, since they require root access on whatever server they're running from).
OP: Might wanna take a look at this...
http://www.mywot.com/en/scorecard/supervpn.net

drmacinyasha said:
None, in fact, it his disadvantages (See below). Also, most businesses, schools, etc. will block just about every VPN method. OpenVPN is the most flexible one I have found, which might be able to sneak around by using alternate sub-1000 ports (which most places won't block, since they require root access on whatever server they're running from).
OP: Might wanna take a look at this...
http://www.mywot.com/en/scorecard/supervpn.net
Click to expand...
Click to collapse
Not sure what you're talking about, it saved me hundreds of dollars in roaming minutes while I was in Belize. Some places do block vpns I'm sure but I never had any issues, but you don't need the vpn itself unless you're in a country that blocks voip altogether, at which point occasional vpn is greater than no vpn.
Also supervpn was the only method I found that actually works on android, I think the risks referenced in that link you posted really only apply to desktop vpn use, not phones. Openvpn is great for somewhat advanced users and if you have a computer you can depend on as a server while you're out of the country for days or weeks, this guide isn't meant for someone capable of managing that.
As for Google voice, it just initiates an inbound call to your actual cell number, which does zero good when you're trying to avoid roaming. Now the new gmail implementation of voice shows promise as an actual voip solution, but currently that version is desktop only from what I can tell.

Related

VOIP For the Universal

Hello all Ive just ordered my universal on Orange, for delivery tomorrow, they are giving it to me for free on upgrade.
So now because I often use over my monthly minute allowance and having a few friends around the world I would like to use a VOIP service.
The only one I know of is Skype, as I am fairly new to this type of thing. So can anyone recommed a service that is cheap, easy to use, Universal compatible.
As for call costs I would like a service that is fairly cheap to call both landlines and mobiles. The mobiles would only really be in the UK, if that matters.
Any help is really appreciated. Many Thanks
Hi,
I expect you've seen my post elsewhere asking about voip clients for the Universal. I've lived and breathed voip for the last three months at work so I know something about it...there seems to be three basic kinds of voip services:
1) wholly proprietory services - closed source client and protocols. Skype is the perfect example. Will let 'real' phone users dial you (they call that 'Skype in') on a real phone number, and will let you call 'real' phones (they call that 'Skype out') for a fee. For Skype, there's a client for the Universal (I think, I don't own one yet). Other services - you're probably out of luck.
2) semi-proprietory services - perhaps providing their own client software, but built on open protocols (usually SIP, session initiation protocol), so you get an enhanced experience with their client. Often the client is locked to only talk to their servers. Examples would be Gizmo or Wengo. Could be an option for a Universal user if you find one that works with other clients than their own, AND if there's a generic SIP client that works on WM5 - and according to my thread, Xten's PPC client works ok.
3) standards-based services - client-agnostic, built on open-protocols (again usually SIP). They give you a username and server details, you enter them into your client - be it a PC-based softphone, a pocketpc application, or a piece of hardware such as an ATA (analogue telephone adaptor - let's you plug a physical phone, even a cordless one, into your home network and use it to make VOIP calls).
There's a fair few voip services like this nowadays, either companies who 'only' do that, or voip services as addons to a traditional ISP service - that's the case with my company, PlusNet, which offers a voip service to our broadband customers. You get sip to sip calls free, a free 0845 number to receive calls on, and you can choose from three different ways to pay for outbound calls - either PAYG (buy credit in £5 blocks, use it up as you make calls) or subscription ('Anytime' or 'Evenings and Weekends' - pay a monthly subscription and get a block of minutes to use peak or off-peak respectively). Sorry to sound like I'm advertising, it's just corporate pride - have a look at http://www.plus.net/plustalk to see more.
Hope this is a useful primer for you!
cheers
Matt S
(firmly OFF-DUTY PlusNet employee ;-)
that was discussed today - here: http://forum.xda-developers.com/viewtopic.php?t=31799&highlight=
see my answer:
i am using X-Pro Softphone for Pocket PC on my MDA pro (t-mobile universal version), it works perfectly with my german voip-account. you can use four different voip-accounts in this tool! currently i am using the version 3 pro. the only mismatch you will have (as with skype too): it only uses the external speaker instead of the phone speaker. but if you use your headset (you should anyway because of the weight of the universal;-)) it works the way it should!
details are here: http://www.xten.com
any questions left? feel free to ask!
cheers, lutz
Where did you manage to get version 3? - On the website you mentioned below I can only find 2.2 to buy for around 30 USD...
lutzh said:
that was discussed today - here: http://forum.xda-developers.com/viewtopic.php?t=31799&highlight=
see my answer:
i am using X-Pro Softphone for Pocket PC on my MDA pro (t-mobile universal version), it works perfectly with my german voip-account. you can use four different voip-accounts in this tool! currently i am using the version 3 pro. the only mismatch you will have (as with skype too): it only uses the external speaker instead of the phone speaker. but if you use your headset (you should anyway because of the weight of the universal;-)) it works the way it should!
details are here: http://www.xten.com
any questions left? feel free to ask!
cheers, lutz
Click to expand...
Click to collapse
what if you use a BT headset like the JABRA? will the sound be routed to the the BT headset or to the external speaker?
matzie said:
Hi,
I expect you've seen my post elsewhere asking about voip clients for the Universal. I've lived and breathed voip for the last three months at work so I know something about it...there seems to be three basic kinds of voip services:
1) wholly proprietory services - closed source client and protocols. Skype is the perfect example. Will let 'real' phone users dial you (they call that 'Skype in') on a real phone number, and will let you call 'real' phones (they call that 'Skype out') for a fee. For Skype, there's a client for the Universal (I think, I don't own one yet). Other services - you're probably out of luck.
2) semi-proprietory services - perhaps providing their own client software, but built on open protocols (usually SIP, session initiation protocol), so you get an enhanced experience with their client. Often the client is locked to only talk to their servers. Examples would be Gizmo or Wengo. Could be an option for a Universal user if you find one that works with other clients than their own, AND if there's a generic SIP client that works on WM5 - and according to my thread, Xten's PPC client works ok.
3) standards-based services - client-agnostic, built on open-protocols (again usually SIP). They give you a username and server details, you enter them into your client - be it a PC-based softphone, a pocketpc application, or a piece of hardware such as an ATA (analogue telephone adaptor - let's you plug a physical phone, even a cordless one, into your home network and use it to make VOIP calls).
There's a fair few voip services like this nowadays, either companies who 'only' do that, or voip services as addons to a traditional ISP service - that's the case with my company, PlusNet, which offers a voip service to our broadband customers. You get sip to sip calls free, a free 0845 number to receive calls on, and you can choose from three different ways to pay for outbound calls - either PAYG (buy credit in £5 blocks, use it up as you make calls) or subscription ('Anytime' or 'Evenings and Weekends' - pay a monthly subscription and get a block of minutes to use peak or off-peak respectively). Sorry to sound like I'm advertising, it's just corporate pride - have a look at http://www.plus.net/plustalk to see more.
Hope this is a useful primer for you!
cheers
Matt S
(firmly OFF-DUTY PlusNet employee ;-)
Click to expand...
Click to collapse
I use plusnet and love it and use the voip sevice to call landlines (free) from my laptop but I would love to know how to use my vario to do it. I presume I would do it via wifi through the broadband but dont know how. Please tell me if you can - thanks. I do have unlimited gprs but I would assume that I couldnt use plusnet this way as it is not broadband etc.
I'm using SJPhone!
It's for free
http://www.sjlabs.com/sjp.html

Are multiple VoIP accounts at the same time possible?

Now that there is a solution for VoIP available I can't help but get greedy So far I used a softphone with multi provider support for this task, but now I wonder: Is it possible to use two different providers at the same time? Right now I am helping myself by switching by hotkey assigned cab files (which works pretty well btw), but what I am really looking for is using one provider for inbound calls and the others for outbound telephony. There are of course providers which can act as a proxy for others, but that solution never really worked out for me as many voip vendors seem to block these attempts (especially pointing a finger at SipGate here ). So, is there any solution for handling multiple providers?
Theoreticall, they are "Backup SIP Settings" you can provision in Windows Mobile 6. Just look at http://msdn2.microsoft.com/en-us/library/aa926605.aspx.
Having only one working VOIP provider, I haven't tried this yet.
However, the format of the XML provisioning is very similar to the one I posed in http://cleanimport.xda/index.php?posts/299950/.
You just have to replace parm name="SIPSettings" by parm name="BackupSIPSettings".
If you try it out, please report here.
Thanks.
--eluth.
The CAB installs fine, but there is no difference between installing a new provider with just "SIPSettings" and "BackupSIPSettings" I tried this with Arcor and SIPGate to test ut whether both incoming numbers would be available at the same time.

Get Sipdroid to work with any SIP provider on your Android phone

Sipdroid allows you to use Android phone with almost any SIP provider. The calls are crystal clear even over a 3G network, likewise for a WLAN connection. The best part about Sipdroid is that it integrates into your phone, eliminating the need for a separate phone book. You simply use your Android contacts in the same way as if you were making a call over a cellular network. It’s really an amazing application that is stable and simple to use, with the potential to save you plenty of money.
Click to expand...
Click to collapse
http://seethisnowreadthis.com/2009/...-with-any-sip-provider-on-your-android-phone/
I thought I would share this with the community here...
Uh, right. That, in fact, does NOT make it work with "any" sip provider, it makes it work with pbxes same as always.
Pbxes.org is the only way to get a betamax provider working with Sipdroid.

VoIP?

How does it work on Gingerbread?
Do you need a Gizmo5 / Sipgate account etc?
Anyone tested it?
Bump
Paul22000 said:
How does it work on Gingerbread?
Do you need a Gizmo5 / Sipgate account etc?
Anyone tested it?
Click to expand...
Click to collapse
I believe its just there for applications that wish to take advantage of it,
It's in Call Settings/Internet Call settings. You will need some sort of VOIP account.
Works well. You can set it to dial out using that account with various parameters, and choose to use that account to receive calls.
Works well.
DebauchedSloth said:
It's in Call Settings/Internet Call settings. You will need some sort of VOIP account.
Works well. You can set it to dial out using that account with various parameters, and choose to use that account to receive calls.
Works well.
Click to expand...
Click to collapse
nice!
can someone post a screenshot of the dept of details available?
I mean: what settings can you put in there?
ICE? STUN? secure rtp? and so on
what's the battery usage?
can you set it to register to the sip gateway only when on wifi or policies like that?
thanks
Paul22000 said:
How does it work on Gingerbread?
Do you need a Gizmo5 / Sipgate account etc?
Anyone tested it?
Click to expand...
Click to collapse
It seems to work with the new SIP that comes with Nexus S. BUT..After studying all the documentation and going thru all the screens it appears that it will only work of wifi? So, I removed all my info on that sip account on the Nexus S and installed the Sipdroid/Gizmo5/GVCall back as per your previous post on the "how to". This method gives me the option of wifi OR 3G. It appears to work . The little green led shows up on top (it does not when using the new SIP stuff on Nexus S) so everything appears to be configured correctly. I have not fully tested it but my bet is that it will work over both wifi and 3G unless of course TMobile somehow prevents this.
I actually ended up going to Best Buy last night to check out the Nexus S
The SIP stuff is in the settings, with not too many options. And yes, you have to put in an account. It does nothing unless you have your own SIP account. (What a letdown, Google.) So basically it's just an integrated SipDroid app into the OS, but with very, very few options.
Of course I didn't want to put in my own Gizmo account details into the Best Buy display phone (it didn't have internet access anyway... Best Buy Fail), so I couldn't test it. But there's an option to select when to use VoIP and I forget but the option to select "All Calls" says right next to it "Wifi only" or something.
So I'd imagine this is pretty much useless because
A) It won't allow 3G VoIP
B) For those using VoIP before, other apps (such as CSipSimple) have WAAAAY more options.
C) And in terms of networking/etc, they might even function better since they've been around longer and have been optimized/etc. (Of course, I didn't test that, but just going by CSipSimple's settings menu, there seems to be a lot of customization/options/features.)
Oh yeah, in case anyone's interested:
[Guide] Unlimited Wifi/3G VoIP Calling
How's the battery life using the integrated sip?
I've seen my battery cut by almost half for using CSipDroid and was hoping an integrated SIP, as basic as it is, wouldn't drain the battery that much.
Wonder what call & connection quality is like too??
A very limited unscientific test, but calling in to a conference call today using the built-in SIP client resulted in everybody but me hearing an echo. Using a SPA2102 on the same Internet connection resulted in a clear call with no echo. I've done a lot of tests using my Vibrant and could never get the quality acceptable for SIP calls without echo and still be able to hear the other party. The Nexus S so far has performed better, but in my opinion from limited tests still suffers the same type of issue.
Well, I did some more testing today as my previous test was just a quickie-that is with the "Sipdroid/Gizmo5/GVcallback" method. With that method I could ring to/from another phone BUT when I tested further, I could only talk/hear from one end while the other phone could hear me, I could NOT hear anything that they were saying. When using the resident SIP that comes with the Nexus S, I could hear/talk on both ends (my Nexus to another phone) over wifi of course. I don't know if this is coming off my minutes yet and will check later today to see that.
So it seems that indeed one can only "Sip" call from the Nexus S via wifi with the SIP that comes resident with the Nexus S. Of course with Sipdroid there are a lot of other settings that I have not explored and maybe it needs to be tweaked? But for now, I am gonna stick with the resident SIP in the Nexus S.
An interesting thing also is that I tried the app "Fring" on my Nexus and that did not work correctly either on my Nexus S.
Paul22000 said:
The SIP stuff is in the settings, with not too many options. And yes, you have to put in an account. It does nothing unless you have your own SIP account. (What a letdown, Google.) So basically it's just an integrated SipDroid app into the OS, but with very, very few options.
Click to expand...
Click to collapse
Thank you to everyone here for posting some really useful information about Android 2.3 and SIP. I have a sipgate account and the day I bought my Nexus S (I stood in line in cold weather in the morning to get it), shortly after I brought it back to my office, I was able to "just barely" get it to work with my sipgate account. By "just barely" I mean that I was able to place a few outgoing calls but the latency was so extreme there is no way I could use it again. Now what is quite amusing is that I also have a 2008 unlocked Nokia E71 running Symbian (which has a pretty decent built-in SIP stack in its firmware from Nokia (this is before Nokia caved to the mobile telecoms and started to remove their SIP stack from their smart phones). Well well well, I have *zero* problems with my E71 and my sipgate account (other than some latency but the latency I can pretty much live with, I just have to make sure I don't cut off the other person speaking during a conversation and wait for them to finish their point). Actually, latency is really undesirable but the point being is that the Nexus S is my first Android phone and one of the selling points is Android 2.3 built in SIP stack bundled with the unlocked no-contract Nexus S (I paid full price at Best Buy) and for all the cackling and hoopla Google has been doing on their web sites about Nexus S built-in SIP, that I can't get it to work with sipgate buy my Symbian E71 works with sipgate pretty nicely, this is egg on the face of Google and they should be admonished for their marketing faux pas on SIP / VOIP in Nexus S. It makes me wonder if Google is somehow trying to cripple the built-in SIP stack and configuration options on the Nexus S such as to possibly somehow tilt the playing field to favor Google Voice (I.e., forget VOIP on your Nexus S, just get a mobile carrier service on 3G like T-Mobile account and then maximize the heck out of our Google Voice service). Don't get me wrong, I appreciate Google Voice, but if you're going to put YouTube videos together to promote open protocols, user choice, "Pure Google" and so on, at least make your SIP stack on par with the often lately made-fun-of Symbian which has a superior SIP stack and SIP configuration UI options on the Nokia E71 compared to the Nexus S!
note to Google: don't blame sipgate, this is an Android SIP stack and configuration issue.
Question:
When you call out, what number does it show as caller ID?
Your cell number?
Google Voice number?
SIP number?
Other?
Nexus S VOIP
I was able to setup my Nexus S to work with my VOIP provider Callcentric. The built in Google Nexus S SIP stack only works on Wifi & not with 3G. You can place SIP calls on Wifi with no additional applications installed as long as you have a account with any VOIP provider who uses/allows SIP.
I used Nokia N97 & N95 for years for making & receiving SIP calls with 3G but the voice quality is usually poor on 3G networks.
Using the native Google Nexus S SIP stack on Wifi I called my parents in India, I used it for approximately 45 minutes, the call quality is not as good when compared with the call quality using Nokia N97 on Wifi networks. The volume is very low even when I turned the Nexus S Speakerphone on and set the volume to maximum. I heard echo most of the time when I was talking, the other side had no issues with echo.
The SIP stack on Nexus S needs some work and I am sure there will be more customization features added in the future. I'd not blame google on the missing 3G voip feature yet as my previous experience on 3G sip calls with Nokia weren't too great. Nokia had sip enabled phones for years and it is still not perfect when making calls on 3G network.
Finally when making calls using SIP the other party sees your SIP number. If your VOIP provider allows it, you can customize your outgoing number to display your cell phone number or any other custom number.
My phone fails registration on Callcentric. Any idea why?
auplainsman said:
I was able to setup my Nexus S to work with my VOIP provider Callcentric. The built in Google Nexus S SIP stack only works on Wifi & not with 3G. You can place SIP calls on Wifi with no additional applications installed as long as you have a account with any VOIP provider who uses/allows SIP.
I used Nokia N97 & N95 for years for making & receiving SIP calls with 3G but the voice quality is usually poor on 3G networks.
Using the native Google Nexus S SIP stack on Wifi I called my parents in India, I used it for approximately 45 minutes, the call quality is not as good when compared with the call quality using Nokia N97 on Wifi networks. The volume is very low even when I turned the Nexus S Speakerphone on and set the volume to maximum. I heard echo most of the time when I was talking, the other side had no issues with echo.
The SIP stack on Nexus S needs some work and I am sure there will be more customization features added in the future. I'd not blame google on the missing 3G voip feature yet as my previous experience on 3G sip calls with Nokia weren't too great. Nokia had sip enabled phones for years and it is still not perfect when making calls on 3G network.
Finally when making calls using SIP the other party sees your SIP number. If your VOIP provider allows it, you can customize your outgoing number to display your cell phone number or any other custom number.
Click to expand...
Click to collapse
Errors in registration may be due to multiple reasons. With the limited number of options we have for settings, my guess would be either incorrect login information or wrong transport type selection.
Here are my callcentric settings. May be these settings will help others too.
username: Your sip username* (Example: 17771234567)
*Do not include @callcentric.com as suffix. Also, this is not your regular callcentric account login name.
Password: Your sip password *Not the callcentric account login password
Server: callcentric.com
Optional Settings:
Outbound Proxy Address: callcentric.com
port number: 5060
Transport type: UDP

[IDEA/POLL] Use C2DM app for remote phone access

These apps allow you to remotely access your phone from a web browser. However, they all run a web server on the phone, and I cannot connect to any of the over 3g (Verizon).
LazyDroid Web Desktop
Remote Desktop
Remote Web Desktop
I want to move the web server off phone, and (hopefully) onto private sites.google.com site. App Engine might be necessary, but I'm hoping this could be done solely in JS.
The hosting site would provide the UI, and interact with the phone using C2DM (the magic that powers Chrome2Phone, GMail, and installing apps from the web Market).
The UI is pretty obvious. It just needs a whiz to create HTML, Javascript, etc.
The C2DM backend is a still a bit mystifying to me... and searching for c2dm and javascript does not yield any obvious working implementations. But it seems plausible. Push a command to the phone, phone returns/uploads data to website, and UI updates.
Then there is the Android end. Well, there are the 3 projects above, Tasker for a quasi-hackish approach, and RPC (promising, but it seems like a WIP).
Thoughts? Volunteers? Geniuses?
Ooo... 2 birds with one stone!
This would also kill 2 birds with one stone.
No more typing in dynamic IP addresses! You get to use DNS to handle the connections. Bookmark your site in your desktop browser (it is always the same!). And set a preference in the Android app.
On lazydroid i've in planning some kind of trick that will let you connect behind firewall ... similar to a vpn...
CloudsITA said:
On lazydroid i've in planning some kind of trick that will let you connect behind firewall ... similar to a vpn...
Click to expand...
Click to collapse
I tried it again last week, and it is still unsuccessful. Webkey is currently the only application that I can successfully use to reach my phone.
Now, I could be wrong, but I believe all of these apps run a web server on the phone. I get a lovely, private 10.x.x.x IP address, which I can't reverse the route to. I have tried and failed to get DynDNS to work.
I have been looking into a solution since my original post. I have not had any time to do code squat, but I have loosely figured out all of the parts.
The big architectural difference I have been seeking is removing the server from the phone. I am not an Android expert, but I don't believe it even requires a running service. (Thank you, C2DM.)
With the app-webservice separation, you can work a "protocol" that reduces the overall bandwidth used... and thus improve battery life. Put all the "hard work" on a webserver, and (things get fuzzy here) possibly push it off onto the client browser (JS).
C2DM Browser Links
I could probably make something like WebKey but with C2DM and some more features. If you want you can give suggestions and I'll start making on saturday (after my exams). It would probably be possible in javascript for the actual sending from server and php just for logging in to your google account. The phone would just be registered on the server and no services (just as you wanted )
nebkat said:
I could probably make something like WebKey but with C2DM and some more features. If you want you can give suggestions and I'll start making on saturday (after my exams). It would probably be possible in javascript for the actual sending from server and php just for logging in to your google account. The phone would just be registered on the server and no services (just as you wanted )
Click to expand...
Click to collapse
I am not sure "more features" is necessarily the direction I'm headed. I am focused on making a "seamless" experience (i.e. less separation of phone and computer).
I was headed to App Engine (Python bias + easy Google integration). I have a project created. I haven't pulled together the various examples to make the core, but it seems <naive>simple</naive>. Stir in some templates, CSS, a sprinkling of JS, and voila!
The big "tricky" part that I can't convert from f***ing magic to a clear approach is the data link in the server. I want to avoid any storage to a Google disk, or otherwise, even temporarily. No stored data = easy privacy policy.
nebkat, if you're really chomping at the bit to code, here's my Android client concept.
- C2DM is a wake-up call. (cheat an borrow ChromeToPhone's ID to begin with)
- Connect to web server, send "I'm here," and wait for further instructions (Channels API/Comet/AJAX/.........)
- make the command set extensible
- each command is blockable in the client. (Permission control is set on the phone, not remotely.)
- After N minutes of no activity, send a "good bye," disconnect from the server, and fade into the background.
Don't worry, I'm very experienced with the server side stuff and I know exactly what you want. The only information stored on the sever side would be google account, the device c2dm registration id and some logging features just for statistics. A password could be set on the phone that would be sha512 hashed on the ajax request and would be sent to the phone. Even if a hacker found the hash, it would be useless without being logged in to the persons google account or knowing the server side auth token.
For now i'll just make the reciever, processor and command output and later on the extra security and ui stuff. It will work exactly the same way as Chrome2Phone except it will have server side php and the different commands. The connection from pc to phone will be something like this.
user command -> ajax request -> php c2dm request -> phone
phone -> php server http request -> controller page status
BTW I'm saving up for a Nexus S, how much would people pay for this type of app? There would definitely be a free version, but I just need to get the Nexus S because I have a Galaxy Spica now and it isn't the best for app development. I'm new to how stuff at xda works, would a donate version get me enoguh for the Nexus?
nebkat said:
Don't worry, ... <snip> ... auth token.
Click to expand...
Click to collapse
Alrighty then. I'm feeling like I can stop contemplating implementing this.
BTW I'm saving up for a Nexus S, how much would people pay for this type of app? There would definitely be a free version, but I just need to get the Nexus S because I have a Galaxy Spica now and it isn't the best for app development. I'm new to how stuff at xda works, would a donate version get me enoguh for the Nexus?
Click to expand...
Click to collapse
Since I was learning the ins and outs of App Engine, I read their quota rules and realized if this were popular it would require funding. I don't know where you are going to your web server, but I assume you'll have to pay someone to keep it running. But I had thought about $$$ already.
"Give away the razor, and sell them the blades."
Make the app free, no feature restrictions.
You get your money through various "membership" levels on the server. (See the account levels at fastmail.fm for an example.) So, you can use the app for free, but you only get, say, 2-3 MB of traffic per day, and only X sessions per day. Need more? See the pricing chart.
user command -> ajax request -> php c2dm request -> phone
phone -> php server http request -> controller page status
Click to expand...
Click to collapse
user command -> php server http request -> phone
phone -> php server http request -> controller page status
user command -> php server http request -> phone
lather, rinse, repeat.
C2DM is not deterministic, and acts up in low signal conditions. So, I made a decision to only use C2DM to initiate a session. Once both ends are connected to the server, everything goes over HTTP.
Oh.... and not that we need another Lookout/Phone Finder, but a shared-secret SMS code for the case where "they" have shut down the data connection.
I have my own server nebkat.com and there is nothing on it anyway.
The only other way to make "push" requests to the phone is with WebSockets. It would probably be better than c2dm because we have full control over what gets sent (google limits some requests). The advantage of WebSockets is that they send no header information which means that we could send our messages in 20 to 30 bytes.
I'll look into more detail on friday.
With web sockets won't you need to ensure the phone has a routable, external IP address? I know, for one, t-mobile does not expose an external IP address for their phones. Unless, of course, if the phone is connected over WiFi. C2DM works great for me (I have used a couple of apps with it and it is really useful).
MrGibbage said:
With web sockets won't you need to ensure the phone has a routable, external IP address? I know, for one, t-mobile does not expose an external IP address for their phones. Unless, of course, if the phone is connected over WiFi. C2DM works great for me (I have used a couple of apps with it and it is really useful).
Click to expand...
Click to collapse
No, WS is server initiated and the ip address' shouldn't make a difference.
MrGibbage said:
With web sockets won't you need to ensure the phone has a routable, external IP address? I know, for one, t-mobile does not expose an external IP address for their phones. Unless, of course, if the phone is connected over WiFi. C2DM works great for me (I have used a couple of apps with it and it is really useful).
Click to expand...
Click to collapse
You need an valid external IP address if you are attempting to initiate contact with your phone, which is why the 4-5 apps I've mentioned do not work on carriers like t-mo and verizon.
But the phone can establish a connection, and the carrier NATs (or whatever) will handle the routing for outgoing and incoming data.
I think the right questions are: Will Verizon/T-Mo allow the ports and protocol for WebSockets? Do Android and desktop browsers implement the draft API correctly and consistently?
I like C2DM. I works well when you have a good connection. But there are 3 issues with it.
1) The message size limit is 1024 bytes. Not ideal for file transfers.
2) In a poor signal areas, since the service retries sending messages, you will get delayed and/or duplicate messages. I work in a large "concrete" building, so I get this behavior often enough that I don't want to rely on it.
3) I believe there is a limit on the number of messages you can send. So, hunting around the filesystem could hit this limit (but unlikely in reality... I hope.)
It would be interesting to see exactly how those apps handle all of the data. Do they only use C2DM, or do they hand over to another protocol?
Ok my exams are over and I am starting with it. I'll give updates on this thread

Categories

Resources