Dear Olszak
I attach the file which describes the sdb protocol.
This does not cover the full spec of sdb, yet.
We will update protocol document and upload it in public git, soon.
If you need any more information, please contact me.
Regards.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Tomasz Olszak
Sent: Wednesday, January 29, 2014 4:49 AM
To: [email protected]
Subject: [Dev] SDB server interface
Hi,
Is somewhere described sdb protocol/interface which is provided by sdb
server?
I have in mind tcp sockets communication used for e.g. device discovery and
so on.
--
regards,
Tomasz Olszak
Qt for Tizen | http://qt-project.org/wiki/Tizen
_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev
-------------------------------------------------------------------------------------------------------------------
Host messages
-------------------------------------------------------------------------------------------------------------------
A message between client and server
Messages consist of "<4bytes message length represented in
hexadecimal><host_prefix>:<request>"
If a client requests a version of the server, it sends "000chost:version" to
the server
For success, server responses "OKAY"
For failure, server responses "FAIL<4bytes reason length represented in
hexadecimal><reason>"
host_prefix list
1. host-any - The number of available target is one, and service target is
specified to that one.
2. host-local - The number of available emulator is one, and service target is
specified to that one.
3. host-usb - The number of available device is one, and service target is
specified to that one.
3. host-serial:<serial_number> - Service target is specified by serial number.
host command list
1. host:version - Requests server version.
2. host:devices - Requests list of devices and their statuses.
3. host:track-devices - Server responses list of devices and their statuses
whenever change happens to them.
4. host:kill - Server is terminated.
5. host:connect:<host>[:port] - Makes a remote target which connects with a
remote emulator.
6. host:disconnect:[<host>[:port]] - Remove a remote target.
7. <host_prefix>:forward:<local>;<remote> - Makes port forward between host and
target
8. <host_prefix>:get-state - Requests a target status
9. host:transport:<serial_number> - Switch a connection to the target specified
by serial number
-------------------------------------------------------------------------------------------------------------------
Transport messages
-------------------------------------------------------------------------------------------------------------------
A message between server and target
A message has a following structure with additional data
struct message {
unsigned command; /* command identifier constant */
unsigned arg0; /* first argument */
unsigned arg1; /* second argument */
unsigned data_length; /* length of payload (0 is allowed) */
unsigned data_check; /* checksum of data payload */
unsigned magic; /* command ^ 0xffffffff */
}
Message list
----------------------------------------------------------------------------------
| Name | command | arg0 | arg1 | data
|
----------------------------------------------------------------------------------
| Connection | CNXN | 0x01000000 | 4096 | host (server)
|
| | | (protocol version) | (max payload) | device
(target) |
| Open | OPEN | local socket id | 0 | channel
|
| Okay | OKAY | local socket id | remote socket id | NULL
|
| Close | CLSE | local socket id | remote socket id | NULL
|
| Write | WRTE | local socket id | remote socket id | data to
transfer |
----------------------------------------------------------------------------------
1. Connection: establishes a connection between server and target
2. Open: opens a channel to communicate
Channel list
2-a. shell: opens a remote port for the target shell
2-b. tcp: opens a remote port for the forwarding
2-c. sync: opens a remote port for the file transfer
3. Okay: responses when operation is successfully done
4. Close: closes a connection
5. Write: transfers a piece of data
_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev