Patch for bfsms – Send SMS’s via bluetooth

There are programs which are simple and really useful, but for some reason their development were stopped. Probably, bfsms is one of this, stopped still 2004. This application allows to send SMS’s from a shell, connecting to a mobile phone via bluetooth. The only inconvenience is that such SMS’s must be no longer than 160 characters (or 70 for flash SMS’s).

Since I often send SMS’s longer than 160 characters, I tried to search the web the standard defining concatenated SMS’s (which are sended by modern mobile phone when an SMS of more than 160 character is typed). I lost an afternoon trying to understand the absurd choices of the authors of this protocol. Then, I give up this street and moved to a different approach: I will automatically divide the message in more than one SMS, avoiding word breaking.

I then introduced the option -s to allow the program to eventually divide the message in more than one SMS. If the message is longer than 160 characters, the program sends more than one SMS, each one starting with M followed by a progressive number (the M is removed after the ninth message) and a full stop (.), with the exception of the last SMS, in which the full stop is substituted by a slash (/). These tags will enable the receiver to resort the SMS’s if they will arrive unsorted (for some delay in transfer).

The patch for bfsms.c is available here, while the application is located here. To patch use the standard command. In the following, the commands to extract the application, apply the patch, compile and install.

$ tar xvzf bfsms_v.0.11.tar.gz
$ cd bfsms_v.0.11
$ wget
$ patch bfsms.c bfsms.c.patch
$ make
# make install

Now, to send a long SMS it suffices to use the next command.

$ bfsms -s AA:1F:DF:CA:A2:E4 +393X94X3XX27 "a long message..."


  • -s is the option for long messages (splitted message),
  • AA:1F:DF:CA:A2:E4 is the bluetooth address of your phone,
  • +393X94X3XX27 is the phone number or the receiver (in international format),
  • "a long message..." is the message to be sent.

This post is also available in Italian: Link.

Leave a Reply

Your email address will not be published. Required fields are marked *