abandonware / node-bluetooth-hci-socket

MIT License
42 stars 47 forks source link

HCI Socket Error #40

Open sanjaykishor opened 2 years ago

sanjaykishor commented 2 years ago

Hi guys, We are developing an application that uses noble for central and bleno for peripheral. Here we were facing the socket error whenever we try to switch from central to peripheral or vice versa. Error: EALREADY, Operation already in progress

To handle this we used to delete the socket and reinitialize it whenever we switch from central to peripheral or vice versa. We just wanted to know is this a good approach? (Note: Either noble or bleno will be active at a time).

is it possible to use the common HCI socket for both noble and bleno instead of creating the new socket every time whenever we switch from central to peripheral? or is there any alternative or best approaches for this?