About communication with smart batteries

Question 1: Does the communication with the battery use broadcast frames or service frames?
Question 2: Is there any source code for this? New to this knowledge