or just simple bash:
$ MYHEXIP=`IFS="." ; for i in $MYIP; do printf '%x' $i | tr 'a-f' 'A-F' ; done`

But waiting for the pxe file to appear is not enough. There is an intermediate state hwinstall before it reaches the final install state. Before that the pxe file even exists with the discovered state. So a check must depend on the content.