Car play problems

So we have a cable you plug your phone in it just started tweaking out last few weeks we plug it in it works for about 20min sometimes it works all the time but sometimes it just takes few minutes and it say connection was interrupted any idea hiw to fix it