Hi Marcel, >>I came accross the need to startup an executable when rfcomm receives a >>connection. I also added an option called watch that allows rfcomm not >>to exit when the rfcomm connection is closed. It simply loops and calls >>listen. >> >>listen [channel [cmd]] Listen >>watch [channel [cmd]] Watch >> >>rfcomm --raw watch 0 1 "cat {}" >>rfcomm --raw listen 0 1 "cat {}" >> >>Not specifying the cmd parameter will simply wait for [control-c] as before. >> >>the {} will be replaced by the address of the rfcomm device created. In >>the example the command run will be 'cat /dev/rfcomm0'. >> >> The syntax changed a little : rfcomm --raw watch 0 1 cat {} rfcomm --raw listen 0 1 cat {} Note that "" must no longer be added arround the command line. The channel must be present as it is the number of arguments that is used to determine the start of the cmdline. > >the feature looks useful, but the patch is not acceptable. You need to >fix the coding style. > Attached patch has been modified around what I've found to be coding style. It's ways cleaner than the previous one. However, if it does not suit you, please let me know with the maximum details. > What is the difference between listen and watch? > > Watch will not quit when client disconnect. Instead, it will start listening again. Thanks Frédéric