GPIO Python or shell

You mean 4.4.70? I have not tested pwm on this old kernel and my instructions are for 4.14+ maybe it works but maybe not in 4.4

what happens/what does not work? I see no error in your code

yes i mean 4.4.70 which is 4.14+ . http://wiki.banana-pi.org/Getting_Started_with_R2 i referred to the instruction given on this page for GPIO and PWM. Gpio worked but not pwm. it does not throw any error, the command executes properly but the pin does not reflect any voltage. Its 0V always. what should i do?

Maybe upgrade to 4.14? I have only tested pwm in 4.14 because 4.4 is too old for me

Remember pwm is ac…so do not measure voltage in dc-mode

Thanks @frank-w it worked for me on kernel 4.14