2009-02-26 10:16:17 ttyBF0 communication with AT-Commands
Izhar Eyal (ISRAEL)
We are using a bluetooth module. we have tested it alone with a terminal software and made sure it works just fine.
Now we are using the BF-561 to communicate with the bluetooth device in RS232.
AT-Commands are used. we used open("/dev/ttyBF0").
while we use gets() and fprintf() functions we can communicate ok with the bluetooth module.
but, we would like to use timeout and non-blocking functions, we tried using ncurses lib, using addstr(), getstr()
but we get wird responses. possibly because we switch the RS232 using logic as follows:
DSP <> Bluetooth module
DSP <> RS232 port to PC (used to see the linux prompt)
How would you recommend doing this?
2009-02-26 10:53:10 Re: ttyBF0 communication with AT-Commands
Mike Frysinger (UNITED STATES)
if you want non-blocking, then why dont you open the device with O_NONBLOCK ? and if you want timeouts, use select()/poll()/epoll() to tell you when data is available.