I am running the sample of HR sensor on PSOC4 BLE Pioneer Kit. On the client side I am running BlueZ stack on a Intel Edison board. But immediately after doing a "connect <mac> ", disconnect happens. Is this normal? Shouldn't the connection remain. Is their anything I can write in code to prevent this disconnection. I am new in BLE, so please guide me.
If you are not getting any kind of error, the most common reason for an immediate disconnect is a timing mismatch between the two devices. The connection parameters are negotiated and if the devices cannot agree on a set of parameters, it will disconnect. I've also seen where the clocks are not accurate enough or trimmed properly that the devices will connect, but then disconnect quickly when they drift far enough that they miss the transmission.