服务发现失败[Ljava.lang.StackTraceElement(Service discovery failed[Ljava.lang.StackTraceElement)
我刚刚用Android和蓝牙开发我的应用程序,你可以发送消息共享文件和蓝牙聊天。 这是一个非常奇怪的应用程序,每次它显示错误和其他时间它完美的工作。 这是我的问题的首要问题
E / BluetoothEventLoop.cpp(298):onCreateDeviceResult:D-Bus错误:org.bluez.Error.AlreadyExists(已经存在)`
第二个错误:
服务发现失败[Ljava.lang.StackTraceElement
我的代码:
private BluetoothSocket getLaSocketConnecte(BluetoothDevice myBtServer, UUID uuidToTry) { BluetoothSocket myBSock; try { if (BtAdapter.isDiscovering()) { BtAdapter.cancelDiscovery(); } myBSock = myBtServer.createRfcommSocketToServiceRecord(uuidToTry); myBSock.connect(); return myBSock; } catch (Exception e) { Log.i(TAG,"IOException . Msg d'erreur :" + e.getMessage()+ e.getStackTrace()); } return null; }
这是日志:
04-01 20:38:28.079: I/Connexion(9240): Msg d'erreur : Msg d erreur :Service discovery failed 04-01 20:38:28.079: I/Connexion(9240): java.io.IOException: Service discovery failed 04-01 20:38:28.079: I/Connexion(9240): at android.bluetooth.BluetoothSocket$SdpHelper.doSdp(BluetoothSocket.java:403) 04-01 20:38:28.079: I/Connexion(9240): at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:213) myBSock.connect(); 04-01 20:38:28.079: I/Connexion(9240): at com.Android.Bt.Connexion.getLaSocketConnecte(Connexion.java:190) 04-01 20:38:28.079: I/Connexion(9240): at com.Android.Bt.Connexion.connecterA(Connexion.java:149) btSock = getLaSocketConnecte(btDevice, uuidList.get(i)); 04-01 20:38:28.079: I/Connexion(9240): at com.Android.Bt.Connexion.ConnecterTousLesAppreils(Connexion.java:293) connecterA(device.getKey()); 04-01 20:38:28.079: I/Connexion(9240): at com.Android.Bt.Connexion.EnvoyeBroadcastMsg(Connexion.java:428) 04-01 20:38:28.079: I/Connexion(9240): at com.Android.Bt.Connexion.broadcastMessage(Connexion.java:205) 04-01 20:38:28.079: I/Connexion(9240): at com.Android.Bt.BtPaquetReceiver.onReceive(BtPaquetReceiver.java:28)
能帮我解决一下这个问题吗?
谢谢 :)
I just finished developing my Application with Android and bluetooth you can send message share files and chat with bluetooth. It's a very strange application every time it shows an error and other time it works perfectly. Here is the top of my problems
E/BluetoothEventLoop.cpp(298): onCreateDeviceResult: D-Bus error: org.bluez.Error.AlreadyExists (Already Exists)`
the second error :
Service discovery failed[Ljava.lang.StackTraceElement
my code :
private BluetoothSocket getLaSocketConnecte(BluetoothDevice myBtServer, UUID uuidToTry) { BluetoothSocket myBSock; try { if (BtAdapter.isDiscovering()) { BtAdapter.cancelDiscovery(); } myBSock = myBtServer.createRfcommSocketToServiceRecord(uuidToTry); myBSock.connect(); return myBSock; } catch (Exception e) { Log.i(TAG,"IOException . Msg d'erreur :" + e.getMessage()+ e.getStackTrace()); } return null; }
And here is the log :
04-01 20:38:28.079: I/Connexion(9240): Msg d'erreur : Msg d erreur :Service discovery failed 04-01 20:38:28.079: I/Connexion(9240): java.io.IOException: Service discovery failed 04-01 20:38:28.079: I/Connexion(9240): at android.bluetooth.BluetoothSocket$SdpHelper.doSdp(BluetoothSocket.java:403) 04-01 20:38:28.079: I/Connexion(9240): at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:213) myBSock.connect(); 04-01 20:38:28.079: I/Connexion(9240): at com.Android.Bt.Connexion.getLaSocketConnecte(Connexion.java:190) 04-01 20:38:28.079: I/Connexion(9240): at com.Android.Bt.Connexion.connecterA(Connexion.java:149) btSock = getLaSocketConnecte(btDevice, uuidList.get(i)); 04-01 20:38:28.079: I/Connexion(9240): at com.Android.Bt.Connexion.ConnecterTousLesAppreils(Connexion.java:293) connecterA(device.getKey()); 04-01 20:38:28.079: I/Connexion(9240): at com.Android.Bt.Connexion.EnvoyeBroadcastMsg(Connexion.java:428) 04-01 20:38:28.079: I/Connexion(9240): at com.Android.Bt.Connexion.broadcastMessage(Connexion.java:205) 04-01 20:38:28.079: I/Connexion(9240): at com.Android.Bt.BtPaquetReceiver.onReceive(BtPaquetReceiver.java:28)
Can you please help me to figure out the solution?
Thanks :)
原文:https://stackoverflow.com/questions/15749372
最满意答案
服务器坏了。 它现在应该工作。
The server was down. It should work now.
相关问答
更多-
这可能不是每次都有问题。 您的.htaccess代码可能没问题。 请检查godaddy服务器上的根文件夹的权限。 它取决于您使用的服务器类型。 请在服务器上启用您的文件夹权限。 那么它可能适合你。 It may not be a problem everytime. Your .htaccess code may be alright. Please check permission of your root folder on godaddy server. It dependent on which t ...
-
首先, 您需要启用并查看您的Web消息的详细错误 ,因为这是一般的消息,没有提供有关出于安全原因发生的情况的信息。 有了详细的错误,您可以在这里找到真正的问题。 此外,如果您可以在服务器上运行浏览器 ,则可以获取有关错误的详细信息,因为服务器会认识到您是本地的,并显示给您。 或者如果您可以使用事件查看器读取服务器的日志 ,还可以看到错误的详细信息。 在IIS 6上
... -
如果您没有将customErrors属性设置为任何值或设置为On ASP.Net将显示500。 将此添加到web.config中以查看实际错误是什么:
一旦你知道实际的错误是什么,你可以继续修复它。 ASP.Net will display a 500 if you don't have the customErrors property set to anything or it is set to On. Add this to the web. ... -
统一500内部服务器错误(unity 500 internal server error)[2023-02-15]
服务器坏了。 它现在应该工作。 The server was down. It should work now. -
您的加入查询不正确。 $this->db->select('bikes.store_id')->from('mappings')->join('bikes', 'bikes.product_id = mappings.product_id')->where('mappings.product_id', $prod_id)->get()->result(); 试试这个查询。 在控制器中写下以查看正在生成的查询。 $this->output->enable_profiler(TRUE); Your join ...
-
HTTP 500错误没有意义。 它只是告诉你出了什么问题,尽管你可以看到无论是什么原因都是空指针错误。 您需要查看服务器日志以查看导致空指针错误的原因。 这个StackOverflow问题有关如何通过文件系统或NetBeans手动查找服务器日志的一些很好的答案。 GlassFish服务器日志的位置 An HTTP 500 error is meaningless. It is only telling you that something went wrong, although you can see t ...
-
它适用于我 - 检查你是否启用了mod_rewrite就像@Panama Jack建议的那样。 a2query -m rewrite 如果没有说启用,则启用它: a2enmod rewrite service apache2 restart 你也可能想要删除规则中的第一个斜杠,如果你的基数是/ ,那么它变成: RewriteRule ^(.*)/(.*)/(.*)$ index.php?pageLevel1=$1&pageLevel2=$2&pageLevel3=$3 [L,R=301] It ...
-
这不是客户端问题,而是服务器问题。 有关详细信息,请查看此信息: http : //www.checkupdown.com/status/E500.html 此错误只能通过修复Web服务器软件来解决。 这不是客户端问题。 由Web服务器站点的操作员来定位和分析日志,这些日志应提供有关错误的更多信息。 This is not a client-side problem, but a server problem. Check this for more info: http://www.checkupdown ...
-
看起来IIS正在隐藏您的错误。 在IIS中的'错误页面'下,选择500错误并点击'编辑功能设置'并选择'详细错误' - 现在您应该看到完整的错误信息(提供的调试是在n CF上)。 Looks like IIS is hiding the errors from you. Under 'Error Pages' in IIS, select the 500 error and click 'Edit feature settings' and select 'Detailed errors' - you sh ...
-
更改权限后Wordpress 500内部服务器错误(Wordpress 500 internal server error after changing permission)[2022-03-21]
在cpanel中,文件权限应为0644 ,文件夹权限应为0755 。 您收到错误是因为index.php权限是0755 。 要设置正确的权限,您需要使用以下命令: chown www-data:www-data -R * # Let apache be owner find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x find . -type f -exec chmod 644 {} \ ...