Undefined reference to wiced_bt_obex_init

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
HotPotTofu
Level 1
Level 1
10 sign-ins 5 replies posted 5 questions asked

In a new EMPTY_BTSDK_App in ModusToolbox, I am trying to test out some OBEX functions.

I have included the header file:

#include "wiced_bt_obex.h"

Under " /* TODO your app init code */":

wiced_bt_obex_status_t obexstatusvariable;

obexstatusvariable = wiced_bt_obex_init();

However, when trying to build the project, I am getting an undefined reference to `wiced_bt_obex_init' error.

 

I know that the function was somehow found in the wiced_bt_obex.h file because by hovering over "wiced_bt_obex_init()", it shows this:

/**
* Function wiced_bt_obex_init
*
* Initialize the OBEX library
* This function must be called before accessing any other of OBEX APIs
*
* @return @link wiced_bt_obex_status_e wiced_bt_obex_status_t @endlink
*
*/
wiced_bt_obex_status_t wiced_bt_obex_init(void);

 

Questions:

1) Why am I getting the undefined reference error? Any files I am suppose to manually include?
2) I can see that the "wiced_bt_obex.h" is under the mtb_shared directory in ModusToolbox, however where is the "wiced_bt_obex.c" source file for the function implementations?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hello @HotPotTofu ,

Can you please confirm which device chipset you are using? 

I think you have not ported the obex library . Can you try any of the below two and see if it helps:

1. Import any RFCOMM examples in MTB under the chipset you are using. (File -> New -> Moodus Tool Box Application-> ....)

2. Under the 'Tools' section in MTB , select Library Manager -> select the BSP -> select RFCOMM in Libraries and update

Please let me know if you need any clarification.

Regards,

Anjana

 

View solution in original post

0 Likes
4 Replies
lock attach
Attachments are accessible only for community members.
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hello @HotPotTofu ,

Can you please confirm which device chipset you are using? 

I think you have not ported the obex library . Can you try any of the below two and see if it helps:

1. Import any RFCOMM examples in MTB under the chipset you are using. (File -> New -> Moodus Tool Box Application-> ....)

2. Under the 'Tools' section in MTB , select Library Manager -> select the BSP -> select RFCOMM in Libraries and update

Please let me know if you need any clarification.

Regards,

Anjana

 

0 Likes
HotPotTofu
Level 1
Level 1
10 sign-ins 5 replies posted 5 questions asked

Hello @AnjanaM_61 

Chip is CYW20819.

For Step 1, I do not wish to create an RFCOMM application unless it can be used for OBEX/OPP.  Not sure if you have any template applications for OBEX/OPP profile?

For Step 2, Under the "Tools" section, I only have BTSpy, Bluetooth Configurator 2.30, ClientControl and Device Configurator 3.0. I do not have a library manager. When trying to launch the ModusToolbox Library Manager using the search feature, it also does not launch after selecting it. Do I have to install this library separately?


EDIT 1: I have managed to find the Library Manager and added the RFCOMM Library. However, I am encountering another error:
*** Build support for the target device not found. Run "make getlibs" to ensure all required build and code dependencies are present.. Stop.

I have tried to run "make getlibs" in the main application directory using Linux terminal however the error is the same. May I know where am I suppose to run this command at?

EDIT 2: So I tried to create a new application using the exact same empty BTSDK application template, I added the RFCOMM Library and this time I am still getting the undefined reference to `wiced_bt_obex_init' error.

To summarise, the first application I have is getting the build support error and  the second application is getting the undefined reference error. Both are using the same template, and have the same codes in the empty_wiced_bt.c file which is:

#include "wiced_bt_obex.h"

wiced_bt_obex_status_t obexstatusvariable;

obexstatusvariable = wiced_bt_obex_init();

I did NOT edit the makefile.init, app_bt_cfg.c or app_bt_cfg.h files yet.

0 Likes
HotPotTofu
Level 1
Level 1
10 sign-ins 5 replies posted 5 questions asked

Hi @AnjanaM_61 

Wondering if you have any solutions for this? Thanks in advance as I am still unable to solve.

0 Likes
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi @HotPotTofu 

I am sorry , I am seeing your responses late. From your new thread ( https://community.infineon.com/t5/Bluetooth-SDK/Bluetooth-OPP-Server-Application-not-Functioning-for... ) , I think you are able to fix the issue stated in this thread and successfully able to run the example . Please confirm. For the new thread, I am checking at my side , shall update you there.

Regards,

Anjana

0 Likes