What model for a discrete value with repeated observations

I want to model smoking (0-1) with some socioeconomic characteristics (edu, age, cohort, sex, etc.). I have 4 waves of a survey, some respondents are present in all waves, while other started in waves 2, 3, etc. The duration between waves is also not always the same (i.g. 2 years between 1-2, 4 years between 2-3, 1 year between 3-4).

I'm not use to longitudinal analysis, so I wonder what kind of model I should use. I was first thinking to survival model (Cox), but I'm not sure, since it's possible for y to switch from 0 to 1 as well as from 1 to 0.