[Dev] Tizen 3.0 common bluetooth client-server communication

PINTU KUMAR pintu.k at samsung.com
Wed May 24 10:01:40 UTC 2017


Hi,

 

Thanks for your reply. But still the same error after this command also, and even after reboot.

The same package is getting build using Z2/Z3 repo but not tizen_common.

 

Please let me know what is the problem with gbs build.

Is there any alternate option to build the executable for tizen_common.

 

Thanks,

Pintu

 

From: 윤기백 [mailto:kibak.yoon at samsung.com] 
Sent: Wednesday, May 24, 2017 7:00 AM
To: PINTU AGARWAL
Cc: 편도현; dev at lists.tizen.org; 이혁; PRAVEEN C; Vivek Jain; 우태진; Akshit Gandhi
Subject: RE: Re: [Dev] Tizen 3.0 common bluetooth client-server communication

 

Run below command and try again.

$ sudo sh -c "echo -1 > /proc/sys/fs/binfmt_misc/status"

 

Thanks,

Kibak.

 

--------- Original Message ---------

Sender : PINTU AGARWAL <pintu.k at samsung.com> Principal Engineer/SRI-Bangalore-Kernel & BSP/삼성전자

Date : 2017-05-23 23:52 (GMT+9)

Title : Re: [Dev] Tizen 3.0 common bluetooth client-server communication

 

Hi Tizen dev lists,
 
I returned here are long time with the same problem.
Now, I am not able to build the same code with tizen 3.0 common profile repo, using GBS.
I get below error:
[   14s] [40/40] preinstalling rpm...
[   14s]
[   14s] running qemu-linux-user-x86_64-cross postinstall script
[   14s] chroot: failed to run command 'sh': Exec format error
[   14s] running qemu-accel-x86_64-armv7l postinstall script
[   14s] chroot: failed to run command 'sh': Exec format error
[   14s] running setup postinstall script
[   14s] chroot: failed to run command 'sh': Exec format error
[   14s] initializing rpm db...
[   14s] chroot: failed to run command '/usr/bin/rpmdb': Exec format error
warning: build failed, Leaving the logs in /home/pintu/GBS-ROOT/local/repos/tizen_common/armv7l/logs/fail/bt-remote-server-0.0.0.1-1/log.txt
info: *** Build Status Summary ***
=== the following packages failed to build due to rpmbuild issue (1) ===
bt-remote-server: /home/pintu/GBS-ROOT/local/repos/tizen_common/armv7l/logs/fail/bt-remote-server-0.0.0.1-1/log.txt
=== Total succeeded built packages: (0) ===
info: generated html format report:
     /home/pintu/GBS-ROOT/local/repos/tizen_common/armv7l/index.html
info: generated RPM packages can be found from local repo:
     /home/pintu/GBS-ROOT/local/repos/tizen_common/armv7l/RPMS
info: generated source RPM packages can be found from local repo:
     /home/pintu/GBS-ROOT/local/repos/tizen_common/armv7l/SRPMS
info: build logs can be found in:
     /home/pintu/GBS-ROOT/local/repos/tizen_common/armv7l/logs
info: build roots located in:
     /home/pintu/GBS-ROOT/local/BUILD-ROOTS/scratch.armv7l.*
error: <gbs>some packages failed to be built
build failed...
 
I don’t have any clue why it is failing now. It was working fine 6 months ago.
Can somebody help.
 
Here is my gbs.conf file for tizen_common:
#Tizen open source
[profile.tizen_common]
repos = repo.tizen_base_arm, repo.tizen_common
 
[repo.tizen_base_arm]
url = http://download.tizen.org/snapshots/tizen/base/latest/repos/arm/packages/
 
[repo.tizen_common]
url = http://download.tizen.org/snapshots/tizen/common/latest/repos/arm-wayland/packages/
 
 
Thanks,
Pintu
 
 
> -----Original Message-----
> From: Pintu Kumar [mailto:pintu_agarwal at yahoo.com]
> Sent: Saturday, October 29, 2016 7:38 PM
> To: 편도현
> Cc: PINTU AGARWAL; dev at lists.tizen.org; 우태진; 이혁; PRAVEEN C; Sudha Bheemanna
> Subject: Re: [Dev] Tizen 3.0 common bluetooth client-server communication
> 
> Hi Pyun,
> 
> Thank you very much for your reply.
> Actually I am at onsite in HQ now for about one month.
> So I cannot verify here what you suggested. I will check again after I return.
> 
> Yes, I had to go with head-less and there is no other choice for my use case.
> But I don’t have pairing problem I think.
> The devices are recognised, connected and pairing properly between tine 2.4 and 3.0
> devices.
> Since, I don’t have the UI on server side, I had to use bluetoothctl to establish
> connection with the client device.
> 
> And yes, I am using the bluetooth Native API itself to develop the BT client and server
> application by referring to the bt-unit-test itself. My bt-server is running in the
> background as a service. When I see the logs bt_init is also getting initialised.
> But, when I send the command from bt_client UI application from 2.4 device, it is
> not received by the server.
> 
> I observed that when I run bluetoothctl, connection are established, but when I exit
> from bluetoothctl, it is dis-connected.
> Is this the problem?
> We also have created our pairing Native API to establish pairing from the code
> directly and it is working well between 2.4 devices.
> But in 3.0 we don’t have UI, so the pairing request is received by the bluetoothctl
> command.
> Not sure if pairing request needs to be handled differently in 3.0.
> 
> Further, I will check about the bt_adapter_enable part and debug further.
> 
> Thank You!
> 
> 
> Regards,
> Pintu
> 
> > On 27-Oct-2016, at 9:39 AM, 편도현 <dh79.pyun at samsung.com> wrote:
> >
> > Hello Pintu,
> >
> > I don't know the exact reason why you don't use Tizen 'bluetooth Natvie API' for
> bluetooth operation.
> > Instread of using bluetooth Native API, you just use bluez's low level commands
> and tools or your own tool such like pairable on / pair.
> > (If in that tool or command you are using tizen bluetooth Native API,
> > then it will be no problem. But if you don't use bluetooth Native API,
> > then it will be occur some problems.)
> >
> > Because,, in Tizen. we assum. Application or some modules only can access the
> shell by non root user. So can't control BT device directly.
> > For this reason. We only provide the operation by bluetooth Native
> > API. (capi-network-bluetooth / bt-service / bluez)
> >
> > Anyway..I hope you just try to check the BT operation in common binary.
> >
> > http://download.tizen.org/snapshots/tizen/common/latest/repos/arm-wayl
> > and/packages/armv7l/
> > capi-network-bluetooth-test-0.1.53-57.1.armv7l.rpm
> > Then,,,for this, you can use 'bt_unit_test' tool after installing
> > capi-network-bluetooth-test rpm on above link. (or attached rpm)
> >
> > For enable bluetooth, should call bt_adapter_enable API explict. In
> > that time, bt-service process will be invoked and platform can use
> > tizen BT's all functionality
> >
> > # bt_unit_test
> > # select 1 (bt_initialize)
> > # select 3 (Adapter)
> > # in Adapter menu
> > ## select 2 (bt_adapter_enable)
> >
> > But, for headless devices. In tizen 3.0, we do not yet support to allow or deny
> method officially.
> > And we are prepairing some methods for headless devices for tizen 4.0.
> > (Actually in tizen 3.0 when we recieve the pairing request..we
> > automatically launch bt-syspopup UI by default. And application will
> > select the popup's yes or no button to response it)
> >
> > I am not sure, 'agent on' and 'default-agent' is working in tizen 3.0 platform.
> Because in now tizen bluetooth concept is...bt-service & bt-syspopup is doing pairing
> agent role.
> > Anyway...1 possiblility is..if you verify the operation in tizen 2.4, and the difference
> is.
> > In tizen 2.4. bt-service is running
> > In tizen 3.0, bt-service in not running.
> >
> > That means,,, if bt-service is running in tizen 3.0, we can pair the remote device
> without UI.
> > And,, for running bt-service. You should call 'bt_adapter_enable' command explict.
> >
> > Please try to the same test,, after "BT ENABLE" using bt_unit_test.
> > And,,,if it is not working, you should modify some codes for headless target.
> > or we can create some internal APIs for handling pairing request and response.
> >
> > ** I list up tizen platform's bluetooth developers. You can query the detail things to
> these members direclty.
> > dh79.pyun at samsung.com
> > hyuk0512.lee at samsung.com
> > tt.woo at samsung.com
> > b.sudha at samsung.com
> > h.sandeep at samsung.com
> >
> > Thanks,
> > Pyun
> >
> > --------- Original Message ---------
> > Sender : PINTU AGARWAL <pintu.k at samsung.com> Principal
> > Engineer/SRI-Bangalore-Kernel & BSP/삼성전자 Date : 2016-10-18 15:31
> > (GMT+9) Title : Re: [Dev] Tizen 3.0 common bluetooth client-server
> > communication
> >
> > Hi Tizen Dev Community,
> >
> > Is anybody out here who can help me with my Bluetooth query?
> > This is the last trial.
> >
> > I have developed a BT client-server application for Tizen 2.4.
> > The bt-client-UI is running on one Tizen device with 2.4 The bt-server
> > service is running on another device also contains 2.4.
> > The client send some character and it is received by the server, which takes some
> action.
> > Both are paired over Bluetooth and this is working well.
> >
> > However, I am not able to achieve this with Tizen 3.0 common on the server side.
> > I have referred to this repo, to develop the Bt client/server:
> > https://git.tizen.org/cgit/platform/core/api/bluetooth/tree/test?h=acc
> > epted/tizen_common On another server device (such as RPi2), I have
> > used Tizen 3.0 common profile (head-less).
> > The client-UI is still on Tizen 2.4 mobile device.
> > I have used “bluetoothctl” to pair the two devices, and paring is working well.
> > The bt_init() is also successful.
> > However, when the client send the command, it is not received by the server.
> > I have given print in the bt receive callback, and it’s not printing anything on the
> console.
> >
> > What I noticed is that, on the 3.0 common there is no “bt-service” running, but it is
> “bluetoothd”.
> > Do, I need to change anything, to communicate between BT 2.4 client and BT 3.0
> common profile?
> >
> > Please give some clue to proceed further.
> > Thanks!
> >
> > Regards,
> > Pintu
> >
> > From: PINTU KUMAR [mailto:pintu.k at samsung.com]
> > Sent: Tuesday, October 04, 2016 12:44 PM
> > To: 'Paweł Wieczorek'; 'dev at lists.tizen.org'
> > Cc: 'pravin.c at samsung.com'
> > Subject: RE: [Dev] GBS package build for Tizen 3.0 common repo
> >
> > Dear Pawel,
> >
> > Thank you very much for your reply.
> > Yes, I am able to build Tizen 3.0 common package using GBS and the following repo
> detailed.
> > I am also able to install the rpm on my device.
> >
> > However, now I am not able to scan and connect the Bluetooth device on my
> Raspberry Pi2 using the USB Bluetooth dongle.
> > Actually scanning is fine, but device discoverable on is failing and I am not able to
> pair it with another device, even though it shows me the device mac id.
> > I used the following steps:
> > #hciconfig hci0 up
> > #bluetoothctl
> > #power on
> > #agent on
> > #default-agent
> > #pairable on
> > #discoverable on
> > Failed to set discoverable on: org.bluez.Error.Failed #pair
> > 94:76:B7:7D:C9:B2 Attempting to pair … Failed to pair:
> > org.freedesktop.DBus.Error.UnknownMethod
> >
> > Please help, if you know how to fix this problem.
> >
> > Thank You!
> > Regards,
> > Pintu
> >
> > From: Paweł Wieczorek [mailto:p.wieczorek2 at samsung.com]
> > Sent: Friday, September 30, 2016 9:38 PM
> > To: PINTU KUMAR; dev at lists.tizen.org
> > Cc: pravin.c at samsung.com
> > Subject: Re: [Dev] GBS package build for Tizen 3.0 common repo
> >
> > Hi Pintu,
> >
> > The repository you mentioned (framework/api/bluetooth) is dedicated to Tizen 2
> (https://build.tizen.org/package/view_file?file=_service <https://build.tizen.org/package/view_file?file=_service&package=capi-network-> &package=capi-network-
> bluetooth&project=Tizen%3A2.4%3AMobile).
> >
> > Tizen:Common 3.0 builds capi-network-bluetooth package from a different
> repository - platform/core/api/bluetooth available at
> https://git.tizen.org/cgit/platform/core/api/bluetooth
> (https://build.tizen.org/package/show?package=bluetooth <https://build.tizen.org/package/show?package=bluetooth&project=Tizen%3ACom> &project=Tizen%3ACom
> mon).
> >
> > Also, GBS fails to resolve package dependencies because your .gbs.conf lacks URLs
> to Tizen:Base package repository. To access them, add a new repository:
> >
> > [repo.tizen_base_arm]
> > url =
> > http://download.tizen.org/snapshots/tizen/base/latest/repos/arm/packag
> > es/
> >
> > and add it as the first repository for Tizen:Common profile:
> >
> > [profile.tizen_common]
> > repos = repo.tizen_base_arm, repo.tizen_common
> >
> > to your .gbs.conf file. Please find below exemplary configuration file that I use:
> >
> > [general]
> > profile = profile.tizen_common
> >
> > [profile.tizen_common]
> > repos = repo.tizen_base_arm, repo.tizen_common
> >
> > [repo.tizen_base_arm]
> > url =
> > http://download.tizen.org/snapshots/tizen/base/latest/repos/arm/packag
> > es/
> >
> > [repo.tizen_common]
> > url =
> > http://download.tizen.org/snapshots/tizen/common/latest/repos/arm-wayl
> > and/packages/
> >
> > Best regards,
> > Paweł Wieczorek
> > Samsung R&D Institute Poland
> > Samsung Electronics
> > p.wieczorek2 at samsung.com
> > On 30/09/16 16:39, PINTU KUMAR wrote:
> > Hi All,
> >
> > I need one help for Tizen 3.0 common package build using GBS setup.
> > In my .gbs.conf file I included this for Tizen 3.0 common repo.
> > [profile.tizen_common]
> > [repo.tizen_common]
> > #url = https://download.tizen.org/snapshots/tizen/common/latest/
> > url =
> > https://download.tizen.org/snapshots/tizen/common/latest/repos/arm-way
> > land/packages/
> >
> > And I am trying to build this package:
> > git://git.tizen.org/framework/api/Bluetooth
> >
> > But, I am getting following error during GBS build.
> > Can somebody help, how to do GBS build for Tizen 3.0 common repo.
> > I want to create a new repo for Tizen 3.0 common but the existing repo itself is not
> build.
> > Please help.
> > ----------------------------------------------------------
> > # gbs build -A armv7l --include-all –clean
> > info: generate repositories ...
> > gbs 0.24.2
> > info: prepare sources...
> > info: package files have been exported to:
> >
> > /home/pintu/GBS-ROOT/local/sources/slp/capi-network-bluetooth-0.1.15-1
> > info: retrieving repo metadata...
> > info: parsing package data...
> > info: building repo metadata ...
> > info: resolving skipped packages ...
> > info: package dependency resolving ...
> > info: *** Build Status Summary ***
> > === the following packages failed to build due to missing build
> > dependencies (1) ===
> > capi-network-bluetooth:
> >  nothing provides ld-linux.so.3 needed by dbus-glib-devel  nothing
> > provides ld-linux.so.3(GLIBC_2.4) needed by dbus-glib-devel  nothing
> > provides libexpat.so.1 needed by dbus-glib-devel  nothing provides
> > libgcc_s.so.1 needed by dbus-glib-devel  nothing provides
> > libgcc_s.so.1(GCC_3.5) needed by dbus-glib-devel  nothing provides
> > rtld(GNU_HASH) needed by dbus-glib-devel  nothing provides
> > libc.so.6(GLIBC_2.4) needed by dbus-glib-devel
> > --
> > --
> > error: <gbs>some packages failed to be built
> > ----------------------------------------------------------
> > Can somebody point out what is the problem.
> >
> >
> > Thanks,
> > Pintu
> >
> >
> >
> > _______________________________________________
> > Dev mailing list
> > Dev at lists.tizen.org
> > https://lists.tizen.org/listinfo/dev
> >
> > _______________________________________________
> > Dev mailing list
> > Dev at lists.tizen.org
> > https://lists.tizen.org/listinfo/dev
> >
> >
> >
> >
> >
> > _______________________________________________
> > Dev mailing list
> > Dev at lists.tizen.org
> > https://lists.tizen.org/listinfo/dev
> 
 
 
 
_______________________________________________
Dev mailing list
Dev at lists.tizen.org
https://lists.tizen.org/listinfo/dev

 

 


 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tizen.org/pipermail/dev/attachments/20170524/85796b31/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 13402 bytes
Desc: not available
URL: <https://lists.tizen.org/pipermail/dev/attachments/20170524/85796b31/attachment-0001.gif>


More information about the Dev mailing list