The permission denied issue was due to early access to the /dev/rfcomm.
By adding a sleep time (10ms) and 3 retry, bt-service can now open this dev
node.
- Fix part of TZPC-3937
Signed-off-by: Victor Hakoun <victor.hakoun@eurogiciel.fr>
static int __bt_rfcomm_open_socket(char *dev_node)
{
int socket_fd;
-
- socket_fd = open(dev_node, O_RDWR | O_NOCTTY);
+ int retryCounter = 0;
+ int MAX_RETRY = 3;
+
+ do {
+ socket_fd = open(dev_node, O_RDWR | O_NOCTTY);
+ if (socket_fd < 0) retryCounter++;
+ usleep(10*1000);
+ } while ((retryCounter < MAX_RETRY) && (socket_fd < 0));
if (socket_fd < 0) {
BT_ERR("\nCan't open TTY : %s(%d)",dev_node, errno);
+* Fri Aug 23 2013 Victor Hakoun <victor.hakoun@eurogiciel.fr> submit/tizen/20130822.094138@03300bb
+- Fix permission denied on open dev node /dev/rfcomm
+
* Wed Aug 21 2013 Victor Hakoun <victor.hakoun@eurogiciel.fr> submit/tizen/20130809.082724@2a3c24d
- Start bt-service with systemd user with multi-user option