What is the COM port of serial port for Bluetooth for Raspberry Pi

I was able to make it work with raspberry pi, but in the raspberry pi, you need to set rfcomm and apply it in the code above using the set rfcomm in exchange of the “com7” in the code. I have only 2 cons as of now that I am trying to resolve, communication has too much delay and when I restart the raspberry pi, you need to re-setup the rfcomm due to the reason that it releases the bind.