Re: Connect to nokia pc suite
Re: Connect to nokia pc suite
- Subject: Re: Connect to nokia pc suite
- From: Alexander Traud <email@hidden>
- Date: Fri, 31 May 2013 17:09:56 +0200
- Thread-topic: Connect to nokia pc suite
You are using a service which is *not* documented. This is the most advanced
way to start with a new technology. In your case, the easiest way is to
document it yourself via reverse engineering. Therefore, I mentioned the
Nokia PC Suite or my tool.
> Nokia PC suite needs a OBEX FTP connection, but if I try to get the SDP record
> with kBluetoothSDPUUID16ServiceClassOBEXFileTransfer I got a record of name
> "OBEX File Transfer" and not "Nokia PC Suite" (I need to use
> kBluetoothSDPUUID16ServiceClassSerialPort to get this one).
Layer Bluetooth requires "Nokia PC Suite" with is a SPP UUID in SDP.
Layer OBEX requires the use of the FTP UUID in a target header. These are
different layers of the protocol stack. FTP is very much like the ISO/OSI
networking stack.
I do not use AppleĀ¹s OBEX, because I have my complete own OBEX stack (which
I created long before Apple). Therefore, do not take the following code as
granted, more as a understanding aid: I just copied the code, did one small
change, however I did not test it:
<http://stackoverflow.com/questions/13965861/bluetooth-programming-on-macos>
void connectToDevice(IOBluetoothDevice *device)
{
IOBluetoothOBEXSession *session = NULL;
IOBluetoothSDPServiceRecord *record = NULL;
record = [device getServiceRecordForUUID:[IOBluetoothSDPUUID
uuid16:kBluetoothSDPUUID16ServiceClassSerialPort ]];
[record retain];
session = [IOBluetoothOBEXSession withSDPServiceRecord:record];
OBEXFileTransferServices *service = [OBEXFileTransferServices
withOBEXSession:session];
[service retain];
BluetoothFTPService *d = [[BluetoothFTPService alloc] init];
[service setDelegate:d];
[service connectToFTPService];
CFRunLoopRun();
}
Now you could do changeCurrentFolderForwardToPath and play a bit with the
standard file system. Please, tell us if that worked.
You are lost when it comes to "Messages", because I am not aware of a trick
to specify a Who header with the Apple OBEX FTP client. You end-up with the
OBEXSession classes.
> I tried with IOBluetoothOBEXSession but it always returns with
> kOBEXSessionEventTypeError when trying to connect.
> I tried to connect with target and who headers but nothing changes.
You use the standard FTP UUID as OBEX Target header, in OBEXConnect. There
and only there. The Who header is used later on, in every operation, like
OBEXSetPath. Did that help?
> The only way that seems to work is opening a RFCOMM channel (to the nokia pc
> suite service channelID I got from the SDPRecord), but any AT command I send
> causes the closing of the connection.
This service is not based on AT commands but on OBEX. If you are *not* able
to use IOBluetoothOBEXSession, you can create your own OBEX client on top of
that channel. OBEX is a binary protocol, non-human readable, still quite
easily implemented. If you need help on that, just say so.
Nevertheless, your project is extremely advanced because you are sticking
together a lot of technologies you never used before. Therefore, I recommend
to get a computer with v10.7 and my GSM Remote. Or a copy of Windows, Boot
Camp and the Nokia PC Suite. While watching its traffic, you learn much,
much faster.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden