KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a Bluetooth RFCOMM service running on Linux via the commands: sdptool add --channel 1 SP rfcomm watch hci0 1 "$COMMAND" {} # ^ here The $COMMAND will write binary data to the file passed as a parameter. I have tested that it behaves correctly by doing: FIFO=$(tempfile) mkfifo "$FIFO" "$COMMAND" "$FIFO" & cat "$FIFO" | hexdump -C # <- output is correct However, when connecting to the service from a different device via SPP/RFCOMM discovery (UUID 00001101-0000-1000-8000-00805F9B34FB ), I see that every instance of 0x0A ( LF ) is replaced by 0x0D 0x0A ( CR LF ) in the stream. The issue isn't on the receiving end, because I have tried connecting to a hardware serial device that also sends binary data, and there the conversion doesn't happen. It must be the command in the first snippet (above the # ^ here line) that performs the replacement. Why does the rfcomm tool do this replacement and how can I disable it?
Tags (comma-separated)
Save Edits
Cancel