0

I'm having a problem with getting the tutorial to work on the device

it works fine in the simulator, but when I try to run it on the device it doesn't work.

I put some logs and it seems to come from the login function

===JASONROGERS292C 2480 supAdmin s3pAdmin
[0.0] TAC:TAI.handleRegRsp : ALREADY_REGISTERED
[0.0] TAC:TAI.handleRegRsp : (ALREADY_REGISTERED), registered entry found:{{APN=,id=2,state=CLOSED,waf=WAF[0.0] _3GPP,keepAlive=300,IP=0.0.0.0,dnsSrv=0.0.0.0}}
[0.0] [TMM.TunnelAllocator]:runNotReadyListeners: registered listeners found
[0.0] TAC:TAI.handleListenerDeRegRsp: not existent tunnel in TAC, tid=2
[0.0] SIM cache not loaded

has anybody got an idea what I forgot to do when running the code on a device?

Cheers Jason


edit:

a couple of links towards what I'm doing (I can post all the code people want but its the standard generated code form SUP, which mean a lot of code lol)

The tutorial http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01214.0200/doc/html/title.html

the zip to the already done tutorial : http://www.sdn.sap.com/irj/bpx/index?rid=/webcontent/uuid/40ea4956-b95c-2e10-11b3-e68c73b2280e


Solution: I was missing a couple of things: 1) Specify that the app should use Wifi

SUP101DB.getSynchronizationProfile().setString("transport", "WIFI");

2) Check that the DNS: in my case the server was local to my windows (through parallels) so I had to specify the ip and not the namespace

getSynchronizationProfile().setServerName("10.50.30.108");//"JASONSERVER");
4

1 回答 1

2

我下载了SUP 101 - BlackBerry Project并检查了来源。

它不包含通常 BB 应用程序会执行的形式的网络代码。

但是我看到SUP101.SUP101DB该类具有以下方法:

private static String getSyncTransportSuffix() {
    com.sybase.persistence.ConnectionProfile syncProfile = 
        getSynchronizationProfile();
    return com.sybase.afx.util.NetworkUtil.getTransportUrlSuffix(syncProfile);
}

所以代码com.sybase.afx.util.NetworkUtil用来获取url后缀。通过将这样的后缀附加到 url,我们告诉底层 BB API 使用什么网络传输。不幸的是,来源不包含com.sybase.afx.util.NetworkUtil查看它的工作原理。

我应该说,即使使用本机 Java BB 开发来检测正确的网络传输也可能会变成一个非常棘手的部分。OS 5+ 提供了一个更好的新网络 API,但对于较旧的 OS,这很难。这个 SUP 项目是用 BlackBerry JRE 4.6.1 构建的,所以它不能使用新的 OS 5+ 网络 API。谁知道 SUP 可能根本无法检测到正确的网络传输?

无论如何,只需尝试一些想法:

  • 检查设备上的 APN 设置,有时必须填充它们才能使用直接 TCP 传输(这取决于无线提供商的要求)。APN 名称/通行证是特定于无线提供商的。通常谷歌搜索允许为提供商找到适当的 APN 设置。
  • 如果您的设备有 WiFi,请尝试启用它。SUP 应该足够聪明,可以选择 WiFi(如果有)。在这种情况下,我认为网络应该没有问题。
于 2011-10-11T20:02:25.417 回答