<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Specify Port for L2CAP Communication</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73/specify-port-for-l2cap-communication</link><description>Hi all, 
 I am trying to specify a fixed port for a L2CAP connection on the nRF51822. The client is a Linux box running bluez (which has BLE support). The client software is designed in Qt, which exposes the underlying bluetooth in a cross platform way</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 02 Aug 2013 06:43:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73/specify-port-for-l2cap-communication" /><item><title>RE: Specify Port for L2CAP Communication</title><link>https://devzone.nordicsemi.com/thread/407?ContentTypeID=1</link><pubDate>Fri, 02 Aug 2013 06:43:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6347ac5-485b-49b0-a7d5-6cff2b34f8c1</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;I&amp;#39;d be happy if you could accept one of the answers, to clear up the discussion. :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Specify Port for L2CAP Communication</title><link>https://devzone.nordicsemi.com/thread/408?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2013 15:32:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cc93991-a3f2-49bb-abbe-2c198e34ac7b</guid><dc:creator>Guest</dc:creator><description>&lt;p&gt;From what ive searched on Qt i believe you are correct. I am going to use standard GATT and android. Much thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Specify Port for L2CAP Communication</title><link>https://devzone.nordicsemi.com/thread/406?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2013 15:32:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5be9f4fa-92b7-438d-aaa2-fc1dc44c9e88</guid><dc:creator>Bastiaan</dc:creator><description>&lt;p&gt;From what ive searched on Qt i believe you are correct. I am going to use standard GATT and android. Much thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Specify Port for L2CAP Communication</title><link>https://devzone.nordicsemi.com/thread/405?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2013 10:09:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98546d16-bae9-420a-829d-003c11a9fb86</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;A connection in BLE doesn&amp;#39;t really have anything to do with a service, and you can create a connection without actually using any service, just to do L2CAP transfers.&lt;/p&gt;
&lt;p&gt;With the S110 there isn&amp;#39;t any other way to transfer L2CAP data than what Pål says, by registering a channel with sd_ble_l2cap_cid() and then send data with sd_ble_l2cap_tx().&lt;/p&gt;
&lt;p&gt;Unfortunately, we cannot really help you with how to read do this from the other end, through Qt&amp;#39;s interfaces, as we don&amp;#39;t know them. I&amp;#39;d recommend you to just try to first initiate a connection and only when you&amp;#39;re successfully able to do so try to actually receive data.&lt;/p&gt;
&lt;p&gt;To be honest, I suspect that this L2CAP API will not be usable for BLE at all. I believe your current best bet to talk to a BLE device on Linux is the C API of BlueZ directly, as stated &lt;a href="http://marc.info/?l=linux-bluetooth&amp;amp;m=136656873604635&amp;amp;w=2"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Specify Port for L2CAP Communication</title><link>https://devzone.nordicsemi.com/thread/404?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2013 17:00:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45f80b88-404b-4ed4-8d5c-635410070a80</guid><dc:creator>Nick</dc:creator><description>&lt;p&gt;Sorry if this question is dumb but im still learning the intricacies of bluetooth. I thought that as a standard L2CAP used Protocol Service Multiplexers which act similar to ports. Would the client/host not need to decide upon a port before they can communicate?&lt;/p&gt;
&lt;p&gt;Is it possible to connect to the nRF51822 without connecting through a service?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Specify Port for L2CAP Communication</title><link>https://devzone.nordicsemi.com/thread/403?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2013 05:57:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4627f72-11bf-4993-8435-a7f61ef727c3</guid><dc:creator>P&amp;#229;l H&amp;#229;land</dc:creator><description>&lt;p&gt;There is one way that you can send data on other L2CAP CID&amp;#39;s (as long as they are greater than BLE_L2CAP_CID_DYN_BASE) and you cannot have more than 8 custom CID Channels&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t sd_ble_l2cap_cid_register(uint16_t cid)

uint32_t sd_ble_l2cap_tx ( uint16_t conn_handle,
    ble_l2cap_header_t const *const p_header,
    uint8_t const *const p_data
)

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When you send something with sd_ble_l2cap_tx, then you will receive a BLE_EVT_TX_COMPLEPLETE when the packet is received by the peer, and a BLE_L2CAP_EVT_RX when you receive something on that CID from the peer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>