i smile when i'm nervous/in a new situation in lieu of chitchatting, small talk, etc. like when people pay attention to me and i feel like they expect some sort of response, i just smile really big and do my best to say something. i feel like if the smile is impressive enough, it'll be enough.
as for strangers, i try to smile at them all the time, because i like it when people smile at me. i feel like there's a perceptible difference between a come-on smile and a friendly smile. everyone likes a friendly smile.