Author Topic: getting return 13 from EnumRadios on panasonic toughpad  (Read 13855 times)

markmahle

  • Guest
getting return 13 from EnumRadios on panasonic toughpad
« on: September 12, 2014, 08:53:23 PM »
I am working on a java project and using the vcl version of wcl wrapped in a c++ dll which I access with a native java code interface. What I am trying to do is discover radios and devices and then pair devices. It works fine on my dell laptop which has a built in microsoft bluetooth radio. But when I run it on a panasonic toughpad my WCLBluetoothDiscovery EnumRadios function call always returns a 13 - WCL_E_TRANSPORT_NOT_AVAILABLE. What exactly does this return mean?

I have sample code if desired but I don't believe the code is the issue as it works on my microsoft radio on a different laptop. The Toughpad has a toshiba radio.

It could be because I'm wrapping the vcl code in a dll and calling through java. Does the enum radios need to be called from a particular thread? I am making sure to call it from the main java thread but that doesn't seem to help any.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: getting return 13 from EnumRadios on panasonic toughpad
« Reply #1 on: September 12, 2014, 08:56:10 PM »
Hello,

First try to run APIDemo there. Does it see your BT dongle? Probably there is unsupported BT stack. Also, did you call wclAPI.Load in DLL? The other case is: Toshiba requeres Windows Message loop to work so you have to have it in your DLL.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: getting return 13 from EnumRadios on panasonic toughpad
« Reply #2 on: September 12, 2014, 09:03:14 PM »
By the way. I updated your account so you can now use WCL C++ Edition which is C++ Library (DLL and static). I think static one helps you to create a DLL for Java. At least its better than VCL-C++-Java.

markmahle

  • Guest
Re: getting return 13 from EnumRadios on panasonic toughpad
« Reply #3 on: September 17, 2014, 04:15:51 PM »
Hi Mike,

Are you saying you know for a fact Toshiba requires a windows message loop? I'm unclear whether that was a statement or a possibility.

Unfortunately the demo app works fine. But many of the straightforward methods in the demo app don't work quite the same when I wrap them in a dll. For example, if I find a radios and save a pointer to my Radio object and then discover devices using it. Subsequent calls using the same Radio pointer return a 13. I found that doing EnumRadios and getting a fresh Radio object before every time I want to discover devices solves this but it seems like it should be unnecessary (this is on windows stack radios, since this toshiba one doesn't work at all).

I also have a toshiba dongle which shows up on it's own stack on my laptop and that I can find with no issues. It is only on this particular toughpad that I have issues. Not sure why.

Anyway, how do I access the regular c++ version from my account? From your main page I only see the demo version download links and am not sure how to access form this forum page.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: getting return 13 from EnumRadios on panasonic toughpad
« Reply #4 on: September 17, 2014, 07:02:33 PM »
Login in private.btframework.com and you will see download link for C++ Edition. Toshiba stack requires message loop. If you use WCL in DLL it is strongly recommend to have initialization/finalization functions so wclAPI is not static.

I attached simple sample shows how to use WCL in DLL.

[attachment deleted by admin]

markmahle

  • Guest
Re: getting return 13 from EnumRadios on panasonic toughpad
« Reply #5 on: June 09, 2016, 06:45:55 PM »
FYI, it's been a couple years but we did get this working. It turned out to be threading issues, all the the dll intialization and function calls had to be done from the java main thread or it wouldn't work. For some reason only this stack has these issues. We had to do some thread syncing but it's working now.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: getting return 13 from EnumRadios on panasonic toughpad
« Reply #6 on: June 09, 2016, 07:01:38 PM »
Great, thanks for letting know.

 

Sitemap 1 2 3 4 5 6 7