Can't put UART2 in mode 17 on mangOH (Legato 16.07, WP85)

You can send AT command inside unsandboxed legato application

Or you can see the sample code to send AT!BSGPIO below via /dev/ttyAT port: