Antonio,
The best way to handle this is to create a new phrase for the null character and add the new phrase to the default read procedure. Then add a procedure to flush the null character.
Please understand that I haven’t run this but you should be able to add this code to a standard mlp pdl. This will at least give you a place to start.
define phrase null-msg;
;
end phrase;
######################################################################
# hci_pd.read – This function is called when data first becomes
# available and we were in the idle state.
# Args:
# info = currently unused
# Notes:
# The basic idea here is to setup the continuations to handle
# the potential cases during a message read.
#
proc hci_pd.read { info } {
keylset continuations null-msg read.flushOne
keylset continuations basic-msg read.done
keylset continuations error read.error
keylset continuations timeout
hci_pd_receive $continuations
}
proc read.flushOne { info } {
hci_pd_ignore_input 1
}