+int _bt_otp_send_launch_request(char *absolute_path)
+{
+ void *handle;
+ char *error;
+ int ret;
+
+ /* check ARCH 64 or 32*/
+ if (!access(FILEPATH_ARCH_64, 0)) {
+ BT_INFO("plugin loading for ARCH 64");
+ handle = dlopen(HEADED_PLUGIN_FILEPATH64, RTLD_NOW);
+ } else {
+ BT_INFO("plugin loading for ARCH 32");
+ handle = dlopen(HEADED_PLUGIN_FILEPATH, RTLD_NOW);
+ }
+
+ if (!handle) {
+ BT_ERR("Can not load plugin %s", dlerror());
+ return BLUETOOTH_ERROR_INTERNAL;
+ }
+
+ dlerror(); /* Clear any existing error */
+
+ int (*fun)(char *) = (int (*)(char *))dlsym(handle,
+ "bt_app_control_send_launch_request");
+
+ if ((error = dlerror()) != NULL) {
+ BT_ERR("Can not load symbol : %s", dlerror());
+ dlclose(handle);
+ return BLUETOOTH_ERROR_INTERNAL;
+ }
+
+ ret = fun(absolute_path);
+ dlclose(handle);
+
+ return ret;
+}
+