I'm controlling NIKON D5200 using libgphoto2 on Mac. Things were working perfectly until yesterday when it started showing errors while settings camera parameters. Same program works perfectly sometimes and doesn't most of the time. I tried same code with different piece of Nikon D5200, still same issue. I tried reverting the code to previous git commits but still no success. Surprising, gphoto2 command can successfully set any parameter but I'm not able to set same parameters from my code. I'm clearly out of ideas on this one.
if you have pieces of code to look at, perhaps I can try to help.