3 #include "../../gsmstate.h" 5 #ifdef GSM_ENABLE_BLUETOOTHDEVICE 14 #include "../../gsmcomon.h" 15 #include "../devfunc.h" 18 #include "../../../helper/string.h" 48 channel = strchr(device,
'/');
49 if ((device[0] ==
'/' || channel == NULL) &&
53 #ifdef BLUETOOTH_RF_SEARCHING 56 smprintf(s,
"WARNING: Channel searching not implemented on your platform!\n");
57 smprintf(s,
"Please user bluerf* connection or define channel in configuration\n");
58 smprintf(s,
"You can specify channel by adding it after phone address separated by slash\n");
59 smprintf(s,
"For example: 11:22:33:44:55:66/12\n");
88 if (channel != NULL) {
93 channel_id = atoi(channel);
96 smprintf(s,
"Using hard coded bluetooth channel %d.\n",
101 if (channel_id == 0) {
102 smprintf(s,
"Please configure bluetooth channel!\n");
120 (channel_id == 15)) {
131 #ifndef OSX_BLUE_FOUND 134 return socket_read(s, buf, nbytes, s->
Device.
Data.BlueTooth.hPhone);
139 return socket_write(s, buf, nbytes, s->
Device.
Data.BlueTooth.hPhone);
144 return socket_close(s, s->
Device.
Data.BlueTooth.hPhone);
149 bluetooth_findrfchannel,
GSM_Config * CurrentConfig
union GSM_Device::@0 Data
GSM_ConnectionType ConnectionType
int bluetooth_write(GSM_StateMachine *s, const void *buf, size_t nbytes)
GSM_Error bluetooth_connect(GSM_StateMachine *s, int port, char *device)
GSM_Error bluetooth_close(GSM_StateMachine *s)
GSM_Error bluetooth_findchannel(GSM_StateMachine *s)
int bluetooth_read(GSM_StateMachine *s, void *buf, size_t nbytes)
int smprintf(GSM_StateMachine *s, const char *format,...)