SUP101:黑莓可以在模拟器上运行,但不能在设备上运行

发布于 2024-12-09 10:34:05 字数 1462 浏览 1 评论 0原文

我在让教程在设备上运行时遇到问题,

它在模拟器中运行良好,但当我尝试在设备上运行它时,它不起作用。

我放置了一些日志,它似乎来自登录功能,

===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

有人知道我在设备上运行代码时忘记做什么吗?

干杯 Jason


几个指向我正在做的事情的链接(我可以发布人们想要的所有代码,但它是标准生成的代码形式 SUP,这意味着很多代码哈哈)

编辑 http://infocenter.sybase .com/help/topic/com.sybase.infocenter.dc01214.0200/doc/html/title.html

已完成教程的 zip : http://www.sdn.sap.com/irj/bpx/index?rid=/webcontent/uuid/40ea4956-b95c-2e10-11b3-e68c73b2280e


解决方案: 我错过了几件事: 1) 指定应用程序应使用 Wifi

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

2) 检查 DNS:在我的情况下,服务器位于我的 Windows 本地(通过并行),因此我必须指定 ip 而不是名称空间

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

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");

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅笑轻吟梦一曲 2024-12-16 10:34:05

我下载了 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,但对于旧操作系统来说这很困难。该SUP项目是使用BlackBerry JRE 4.6.1构建的,因此它不能使用新的OS 5+网络API。谁知道 SUP 是否根本无法检测到正确的网络传输?

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

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

I downloaded the SUP 101 - BlackBerry Project and checked the sources.

It does not contain networking code in the form a usual BB app would do.

However I see the SUP101.SUP101DB class has the following method:

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

So the code uses com.sybase.afx.util.NetworkUtil to get url suffix. By appending such suffix to a url we say to the underlaying BB API what network transport to use. Unfortunatelly sources do not contain com.sybase.afx.util.NetworkUtil to look how exactly it works.

I should say that even with native Java BB development detecting a proper network transport may turn to be a very tricky part. OS 5+ provides a new networking API that is much better, but for the older OS it is hard. This SUP project is built with BlackBerry JRE 4.6.1, so it can not use new OS 5+ networking API. Who knows maybe SUP simply fails to detect proper network transport?

Any way, just a few ideas to try:

  • check for APN settings on the device, sometimes they have to be populated in order to use Direct TCP transport (it depends on wireless provider requirements). APN name/pass are wireless provider specific. Usually googling allows to find proper APN settings for a provider.
  • if your device has WiFi try enabling it. SUP should be smart enough to prefer WiFi if available. In this case I assume networking should have no issues.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文