02-22-2011 02:25 PM - last edited on 02-22-2011 02:25 PM
I presume that you actually have a movistar SIM on the device. Of course you do, but I have to ask....
It looks to me like you are doing everything correctly for the direct TCP (Carrier) connection.
Regarding the invalid URL - that is what I would expect if you coded ";deviceside=false" and the device was not on a BES.
I have a number of thoughts. Let us assume for now that you wish to stay using Direct TCP.
a) try a SIM from a working device - perhaps there is something restricted with the SIM
b) Refresh the service books on the device
Options-->Device-->Advanced-->Host Routing, then use the Menu to Register (Sorry don't know what this is in Spanish)
If you wanted you could try another connection method, I suggest WAP 2, which requires no configuration. .
02-23-2011 02:14 AM
Hi,
Yes my SIM are movistar.
For WAP2 i think you mean :
ServiceBook sb = ServiceBook.getSB();
ServiceRecord[] records = sb.findRecordsByCid("WPTCP");
String uid = null;
for(int i=0; i < records.length; i++)
{
//Search through all service records to find the
//valid non-Wi-Fi and non-MMS
//WAP 2.0 Gateway Service Record.
if (records[i].isValid() && !records[i].isDisabled())
{
if (records[i].getUid() != null && records[i].getUid().length() != 0)
{
if ((records[i].getUid().toLowerCase().indexOf("wifi" ) == -1) &&
(records[i].getUid().toLowerCase().indexOf("mms") == -1))
{
uid = records[i].getUid();
break;
}
}
}
}
if (uid != null)
{
//open a WAP 2 connection
Connector.open(_url + ";ConnectionUID=" + uid);
}
else
{
//Consider another transport or alternative action.
}Problem is i use JM2E not JDK BlackBerry so i think ServiceBook and ServiceRecord not avaible or don't see it. I will try to refresh the service book via the options Host Routing. Best Regards
02-23-2011 04:49 AM
Good point, it is no configuration, provided you are running a RIMLET!
02-24-2011 11:56 AM - last edited on 02-24-2011 12:04 PM
Hi,
So impossible use WAP 2 with midlet make with Wireless Tool Kit of Sun ?
I tryed to register in the host routing but nothing change i get a message with Message registery send and i only have the Accept button.
I tryed to remove the configuration of the apn in the TCP/IP and when i try to connect i get an exception with the error message : " DNS ERROR"
That is really strange why on some models like 8320, 8900, 9300 or 9700 don't need to configure apn in TCP/IP and all work well ??
Thanks
Best Regards
02-25-2011 03:28 AM
Up
03-01-2011 10:27 AM
Hi,
I still with the problem someone have an idea?
Thanks
03-08-2011 02:35 AM
Hi,
No one can help me?
Thanks
03-09-2011 06:10 PM - last edited on 03-09-2011 06:27 PM
Sorry I'm not sure I can help.
Because you are writing a MIDLET, you can't use any of the RIM extensions that help you device how to connect. So you are left with hoping that the 'standard' connection will work for you.
And in some cases it will. On BES devices, it will mostly default to BES connection and on some BIS devices, they will default to WAP 2 for you and so they will work. On other devices or on different OS level, things might be difference.
The only thing I can suggest is that you code a parameter that the user can change. And you add this to the end of your connection. So you can test a number of different connections, including different APN settings and possible WAP 2 connection UID settings until you get something to work.
I can't think of a better way. I hope someone else can.
See also:
http://supportforums.blackberry.com/t5/Java-Develo