The message baud rate
seems only part of the error, you should be more specific about which error occurs.
An example that you can use to detect the crash is:
Open the CMD
Check which port your modem uses (let's assume it's COM17)
Run the command by CMD:
mode COM17 xon=on BAUD=9600
If the port were COM20 then the command would be:
mode COM20 xon=on BAUD=9600
With this you can detect the error (if the modem is supported for example)
How to check which device port (modem)
Open the run or cmd
Type %SystemRoot%\system32\control.exe
or open the control panel
Go to "driver manager"
Click the Details tab, the name should appear, and then the port, for example Modem (COM 17)
In case if the port is 17 the script should look something like:
<?php
include 'PhpSerial.php';
$serial = new PhpSerial;
$serial->deviceSet('COM17');
...