• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

3G and direct Socketry in Java

 
Greenhorn
Posts: 13
Android Python C++
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am developing an Android app for the company i work for, we create instruments that calibrate instruments that measure air quality all around the world... most of the time companies that maintain these instruments are on average 1000km away from the instruments in question, so having a mobile app to communicate with those instruments is... quite handy indeed.

Getting on to it... This is my first plunge into networking, so bear with me. Basically the application opens a direct socket to an instrument and sends and receives plain string arguments. So far i have been able to successfully achieve this goal over a Wifi connection (Quite proud of myself, as this is really my first program that not only i will be using...).

But when it comes to opening direct sockets over 3G there seems to be a major issue, at least with Verizon...

Reading around the net i have managed to learn a bunch about how networks actually work, and that while connected to 3G over Verizon's network, mobile devices aren't assigned ip addresses...
Something about the NAT used to route the connection, i honestly have no idea what that means, i just know it makes direct ip sockets impossible, or at the very least BurrferedReaders impossible...
Essentially this pseudo code explains exactly how the app works as of late,

That is surrounded by a hand full of listView's and various GUI components to make it a functioning app, but this chunk is the only real "Functional" part of the program.

This is probably the most standard socket thread there has ever been, and it works (I wouldn't say perfectly, but well will suffice) over Wifi.
This is all well and good, accept in the world of mobile devices, being constrained to Wifi only on a mobile application is as close to useless as it gets.

Is there any native part of java that can be utilized over 3g, to pass string arguments?
Heck even if i needed to add a library to my code, if it works i'd take it.

PS: It took quite a while for me to decide which forum this topic belongs in, after some thought, yes it is under the mobile context, but the content is mostly geared towards Sockets and other networking portions of my program, Sorry in advance if this is decidedly in the wrong place.
 
David Freitag
Greenhorn
Posts: 13
Android Python C++
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It appears the problem i am having is a verizon related issue.

A friend of mine, who just got done doing some work on some verizon towers told me that it was because their towers, and really their entire network as a whole are very, very old. That this was the reason why only Verizon's NAT assigns a private ip address to all mobile phones. But he also said that they are in the middle of a massive overhaul, and around a year from now this whole problem may be settled. But from what i understand Verizon wants it to be this way, something about a private ip address being more secure or something.. But the good news is that most other service providers worldwide do not assign private ip's via their NAT.
reply
    Bookmark Topic Watch Topic
  • New Topic