For the people who experience issues add this
command = command:gsub("%s+", "")
just after this.
.....
print "Awaiting next command.."
local msg = table.pack(event.pull("modem_message"))
local command = msg[6]
So like that
.....
print "Awaiting next command.."
local msg = table.pack(event.pull("modem_message"))
local command = msg[6]
command = command:gsub("%s+", "")
When you sent string over network card. It adds many space after the text. So with the command I have added it removes all the spaces and let it works as it should do.