I’m unable to answer your specific question. However, whilst Ive not tried it myself, Seito_black wrote some similar code and released on github
Possibly you can see which routines they used? At least until Sunfounder return after their vacation, with a proper answer.