Skip to contentSkip to conversation

gps on /dev/ttyS1

DISCUSSION Oleg Kravchenko 1 participant 1 message Jan 3, 2009 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

Hello! I have gps device on ttyS1, but to use I must enable it by i2c-tools:

$ i2cset -y 0 0x20 2 0x80 b 0x80

and disable:

$ i2cset -y 0 0x20 2 0x0 b 0x80

I want add some wrapper code to start gps device when ttyS1 is open and shutdown device on close. How is is easy to do?