Modem, Internet and /dev/cu.modem


Hi people,

I need some tips or help with developing a Cocoa based internet connect application. I'm working for a large UK dialup ISP company who wants a personalised version of its internet connection software for mac os x. ( cocoa) I've been having trouble writing to /dev/cu.modem , is this the right way of going about it?
I have the relevant connection scripts, so all I need is the ability to write to the modem /modem port....

Thanks for any help you give in advance.