Date   

Emulating 2(or Multiple) Network interfaces in the same QEMU Machine

Juliano S Assine
 

Hello,
Sorry for anything confusing, first timer here, I have a couple of questions.

1. Lets say I'm running one of the networking examples using DBOARD=quemu_cortex_m3.
When I build it with make client/server it runs qemu with the "-serial pipe:/tmp/ip-stack-${target}" flag and link client and server via simlink.

qemu(server) -----> /tmp/ip-stack-server.out ---> /tmp/ip-stack-client.in -----> qemu(client)

As qemu support up to 4 virtual serial ports via the -serial flag, can I have multiple network interfaces on the same emulated machine?

quemu(client2) <-- ip-stack-client2.in <-- ip-stack-server2.out <-- qemu(client)qemu(server) --> ip-stack-server1.out --> ip-stack-client1.in --> qemu(client1)

2. If I have a physical device, can I emulate a networking connection using UART in the same fashion?

Thanks,

Juliano


#BluetoothMesh self provisioning & configuration for Generic Models for testing #bluetoothmesh

Vikrant More <vikrant8051@...>
 

Hello World !!
-----------------------------------------------------------------------------------------------------------------------------

{
  "$schema":"file:\/\/\/BlueZ\/Mesh\/schema\/mesh.jsonschema",
  "meshName":"BT Mesh",
  "IVindex":5,
  "IVupdate":0,
  "netKeys":[
    {
      "index":0,
      "keyRefresh":0,
      "key":"18eed9c2a56add85049ffc3c59ad0e12"
    }
  ],
  "appKeys":[
    {
      "index":0,
      "boundNetKey":0,
      "key":"4f68ad85d9f48ac8589df665b6b49b8a"
    },
    {
      "index":1,
      "boundNetKey":0,
      "key":"2aa2a6ded5a0798ceab5787ca3ae39fc"
    }
  ],
  "provisioners":[
    {
      "provisionerName":"BT Mesh Provisioner",
      "unicastAddress":"0077",
      "allocatedUnicastRange":[
        {
          "lowAddress":"0100",
          "highAddress":"7fff"
        }
      ]
    }
  ],
}

-----------------------------------------------------------------------------------------------------------------------------

This is my prov_db.json from #meshctl.

By taking reference from, zephyr/samples/bluetooth/mesh_demo/src/main.c I have added following things in my code

1)

static const u8_t net_key[16] = {
    0x18, 0xee, 0xd9, 0xc2, 0xa5, 0x6a, 0xdd, 0x85,
    0x04, 0x9f, 0xfc, 0x3c, 0x59, 0xad, 0x0e, 0x12,
};

static const u8_t app_key[16] = {
    0x2a, 0xa2, 0xa6, 0xde, 0xd5, 0xa0, 0x79, 0x8c,
    0xea, 0xb5, 0x78, 0x7c, 0xa3, 0xae, 0x39, 0xfc,
};

static const u8_t dev_key[16] = {
    0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
    0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
};

static const u16_t net_idx=0;
static const u16_t app_idx=1;
static const u32_t iv_index=5;
static u8_t flags;
static u16_t addr = 0x0100;    //for NODE on which only Model 1000 is activated
//static u16_t addr = 0x0101;  //for NODE on which only Model 1001 is activated
static u32_t seq;

2)

static void bt_ready(int err)
{
   .
   .
   .
   if (err) {
        printk("Provisioning failed (err %d)\n", err);
        return;
    }

    printk("Provisioning completed\n\r");

    configure();
}

3)
static void configure(void)
{
    printk("Configuring...\n");

    #ifdef Model1000
   
    #endif

    #ifdef Model1001
   
    #endif

    printk("Configuring completed\n");

}

Now how to edit configure( ) function, so that Model 1000 will get activated on one nRF52840_PDK board
& Model 1001 will get on another (along with pub & sub configurations ) ??


My ultimate goal is to understand this process & save variables required for Provisioning & Configuration
into external i2c EEPROM (like AT24C04).



distance provisioning & configuration of #BluetoothMesh DEVICEs using single GATT-Proxy NODE #bluetoothmesh

Vikrant More <vikrant8051@...>
 

Hello,

Currently I have been doing provisioning of #BluetoothMesh DEVICEs using #meshctl utility. But I've to individually makes connection with each device over PB-GATT for provisining & configuration.

Can I do distance Provisioning of all other NODEs which are in vicinity of NODE to which I've already connected (PB-GATT to PB-ADV provisioning & configuration ) ?

May be it is already implemented but could anybody explain me how to do it using #meshctl ?

Thank You !!


Zephyr Project seeking Project Evangelist/Developer Advocate

Brett Preston
 

Members of the Zephyr Community,

The Zephyr Project is seeking a project evangelist and developer advocate to help grow and support the global Zephyr developer community.

The full job description, including details on how to apply, is available at https://www.zephyrproject.org/about/jobs-board/

Feel free to share with your networks -

Thank you,


Brett

--
Brett Preston
The Linux Foundation
+1 (971) 303-9030
bpreston@...

Google Talk: bpreston@...
Skype: bprestoncf


Re: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

Vikrant More <vikrant8051@...>
 

Glad to hear it! 

On Jan 4, 2018 6:42 PM, "Kai Ren" <kren@...> wrote:

Hi Vikrant,

Good news, meshctl starts to work.

Thank you!

 

Regards,

Kai

 

From: Vikrant More [mailto:vikrant8051@...]
Sent: Thursday, January 4, 2018 12:05 AM
To: Kai Ren <kren@...>; zephyr-devel@lists.zephyrproject.org; zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

 

1) Download this --> https://git.kernel.org/pub/scm/bluetooth/bluez.git/snapshot/bluez-5.48.tar.gz

 

2) tar -xvf bluez-5.48.tar.gz

 

3) mv bluez-5.48 bluez

 

4)cd bluez

 

5)./bootstrap-configure

 

6)make 

 

7)make install

 

8)systemctl daemon-reload

 

9)systemctl restart bluetooth

 

10)bluetoothd --version

 

11) cd mesh

       

      Here you will find local_node.json & prov_db.json

 

On Wed, Jan 3, 2018 at 6:55 PM, Kai Ren <kren@...> wrote:

Thanks, Vikrant!

 

As you mentioned, I cd into “BlueZ 5.48/mesh”, but I can’t find any *.json in this folder on my Raspberry Pi3, below is the file list in the folder. Is there something I missed?

 

Regards,

Kai

 

 

 

 

From: Vikrant More <vikrant8051@...>
Date: Wednesday, 3 January 2018 at 9:11 PM
To: Kai Ren <kren@...>
Subject: RE: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

 

Or you can directly execute

 

$meshctl -c bluez/mesh

 

In my case, it is 

 

$meshctl -c /home/vikrant/project/bluez/mesh

 

...(just for example)

 

On Jan 3, 2018 6:37 PM, "Vikrant More" <vikrant8051@...> wrote:

Hi Kai,

cd into bluez5.48/mesh

& then execute meshctl

 

Actually it is looking for json files which are available at blez_home/mesh.

 

 

On Jan 3, 2018 6:20 PM, "Kai Ren" <kren@...> wrote:

Hi Vikrant,

Your suggestion is very useful about #meshctl, I’ve already downloaded BlueZ v5.48 and installed it on my Raspberry Pi3.

When I typed meshctl on the terminal, there is an error message shown: Local config directory not provided…

Do you know what configuration should be done if I want to run #meshctl?

 

Regards,

Kai

 

From: Vikrant More [mailto:vikrant8051@...]
Sent: Wednesday, January 3, 2018 5:14 PM
To: Kai Ren <kren@...>; zephyr-devel@lists.zephyrproject.org


Subject: Re: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

 

Hi Kai,

These are some useful links for you:

http://docs.zephyrproject.org/samples/boards/nrf52/mesh/onoff-app/README.html (for this you will need #meshctl as provisioner which is part of BlueZ 5.47  --> https://git.kernel.org/pub/scm/bluetooth/bluez.git/  )

https://devzone.nordicsemi.com/question/178532/zephyr-bluetooth-mesh-development/ (with this you can use Silicon Labs BluetoothMesh APP)

 

 

 

 

On Wed, Jan 3, 2018 at 12:43 PM, Kai Ren <kren@...> wrote:

Hello,

I found a video on Youtube, https://www.youtube.com/watch?v=TwVwIjTX6SI  , Zephyr channel, it’s about 100 seconds.

I’m interested in how to set this demo up like:

  • How many devices (micro:bit) do I need to prepare?
  • What device would be the Provisioner?
  • What firmware do I need to use? Under $ZEPHYR_BASE/sample or $ZEPHYR_BASE/test?

Thanks.

 

Regards,

Kai

 

 

 


_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel

 

 

 

 


Re: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

Kai Ren <kren@...>
 

Hi Vikrant,

Good news, meshctl starts to work.

Thank you!

 

Regards,

Kai

 

From: Vikrant More [mailto:vikrant8051@...]
Sent: Thursday, January 4, 2018 12:05 AM
To: Kai Ren <kren@...>; zephyr-devel@...; zephyr-users@...
Subject: Re: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

 

1) Download this --> https://git.kernel.org/pub/scm/bluetooth/bluez.git/snapshot/bluez-5.48.tar.gz

 

2) tar -xvf bluez-5.48.tar.gz

 

3) mv bluez-5.48 bluez

 

4)cd bluez

 

5)./bootstrap-configure

 

6)make 

 

7)make install

 

8)systemctl daemon-reload

 

9)systemctl restart bluetooth

 

10)bluetoothd --version

 

11) cd mesh

       

      Here you will find local_node.json & prov_db.json

 

On Wed, Jan 3, 2018 at 6:55 PM, Kai Ren <kren@...> wrote:

Thanks, Vikrant!

 

As you mentioned, I cd into “BlueZ 5.48/mesh”, but I can’t find any *.json in this folder on my Raspberry Pi3, below is the file list in the folder. Is there something I missed?

 

Regards,

Kai

 

 

 

 

From: Vikrant More <vikrant8051@...>
Date: Wednesday, 3 January 2018 at 9:11 PM
To: Kai Ren <kren@...>
Subject: RE: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

 

Or you can directly execute

 

$meshctl -c bluez/mesh

 

In my case, it is 

 

$meshctl -c /home/vikrant/project/bluez/mesh

 

...(just for example)

 

On Jan 3, 2018 6:37 PM, "Vikrant More" <vikrant8051@...> wrote:

Hi Kai,

cd into bluez5.48/mesh

& then execute meshctl

 

Actually it is looking for json files which are available at blez_home/mesh.

 

 

On Jan 3, 2018 6:20 PM, "Kai Ren" <kren@...> wrote:

Hi Vikrant,

Your suggestion is very useful about #meshctl, I’ve already downloaded BlueZ v5.48 and installed it on my Raspberry Pi3.

When I typed meshctl on the terminal, there is an error message shown: Local config directory not provided…

Do you know what configuration should be done if I want to run #meshctl?

 

Regards,

Kai

 

From: Vikrant More [mailto:vikrant8051@...]
Sent: Wednesday, January 3, 2018 5:14 PM
To: Kai Ren <kren@...>; zephyr-devel@...


Subject: Re: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

 

Hi Kai,

These are some useful links for you:

http://docs.zephyrproject.org/samples/boards/nrf52/mesh/onoff-app/README.html (for this you will need #meshctl as provisioner which is part of BlueZ 5.47  --> https://git.kernel.org/pub/scm/bluetooth/bluez.git/  )

https://devzone.nordicsemi.com/question/178532/zephyr-bluetooth-mesh-development/ (with this you can use Silicon Labs BluetoothMesh APP)

 

 

 

 

On Wed, Jan 3, 2018 at 12:43 PM, Kai Ren <kren@...> wrote:

Hello,

I found a video on Youtube, https://www.youtube.com/watch?v=TwVwIjTX6SI  , Zephyr channel, it’s about 100 seconds.

I’m interested in how to set this demo up like:

  • How many devices (micro:bit) do I need to prepare?
  • What device would be the Provisioner?
  • What firmware do I need to use? Under $ZEPHYR_BASE/sample or $ZEPHYR_BASE/test?

Thanks.

 

Regards,

Kai

 

 

 


_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@...
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel

 

 

 

 


[Zephyr-tsc] OpenIoT Summit / ELCE - CFP Opportunity (closes January 7, 2018)

Kumar Gala
 

FYI.

- k

Begin forwarded message:

From: Brett Preston <bpreston@...>
Subject: Re: [Zephyr-tsc] OpenIoT Summit / ELCE - CFP Opportunity (closes January 7, 2018)
Date: January 3, 2018 at 10:33:29 AM MST

All,

Happy New Year!

Just a quick reminder to submit proposals for ELC / OpenIoT Summit prior to the January 7 deadline --

Cheers,


Brett


On Wed, Dec 13, 2017 at 9:13 AM, Brett Preston <bpreston@...> wrote:
Members of the Zephyr TSC + Marketing Committee,

As noted on today's TSC call, the OpenIoT Summit is accepting proposals through January 7, 2018.

Over 800 participants are projected to attend, the majority of which will be developers.

It would be great for the Zephyr Project to be well represented at the event.


OpenIoT Summit / Embedded Linux Conference NA
March 12-14, 2018
Portland, OR

Thank you,


Re: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

Kai Ren <kren@...>
 

Great!

I’ve already found the json file on github, one is local_node.json, the other is prov_db.json, but there may be still an issue, Crypto API on Raspberry Pi, detail is this, https://blog.amuehlbeier.de/raspberry-pi-kernel-mit-crypto-erzeugen/

Have you ever fixed this issue? or Do you have any recommend platform to run meshctl?

 

Meanwhile, I will try your method later.

Thanks!!!

 

 

Regards,

Kai

 

From: Vikrant More [mailto:vikrant8051@...]
Sent: Thursday, January 4, 2018 12:05 AM
To: Kai Ren <kren@...>; zephyr-devel@...; zephyr-users@...
Subject: Re: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

 

1) Download this --> https://git.kernel.org/pub/scm/bluetooth/bluez.git/snapshot/bluez-5.48.tar.gz

 

2) tar -xvf bluez-5.48.tar.gz

 

3) mv bluez-5.48 bluez

 

4)cd bluez

 

5)./bootstrap-configure

 

6)make 

 

7)make install

 

8)systemctl daemon-reload

 

9)systemctl restart bluetooth

 

10)bluetoothd --version

 

11) cd mesh

       

      Here you will find local_node.json & prov_db.json

 

On Wed, Jan 3, 2018 at 6:55 PM, Kai Ren <kren@...> wrote:

Thanks, Vikrant!

 

As you mentioned, I cd into “BlueZ 5.48/mesh”, but I can’t find any *.json in this folder on my Raspberry Pi3, below is the file list in the folder. Is there something I missed?

 

Regards,

Kai

 

 

 

 

From: Vikrant More <vikrant8051@...>
Date: Wednesday, 3 January 2018 at 9:11 PM
To: Kai Ren <kren@...>
Subject: RE: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

 

Or you can directly execute

 

$meshctl -c bluez/mesh

 

In my case, it is 

 

$meshctl -c /home/vikrant/project/bluez/mesh

 

...(just for example)

 

On Jan 3, 2018 6:37 PM, "Vikrant More" <vikrant8051@...> wrote:

Hi Kai,

cd into bluez5.48/mesh

& then execute meshctl

 

Actually it is looking for json files which are available at blez_home/mesh.

 

 

On Jan 3, 2018 6:20 PM, "Kai Ren" <kren@...> wrote:

Hi Vikrant,

Your suggestion is very useful about #meshctl, I’ve already downloaded BlueZ v5.48 and installed it on my Raspberry Pi3.

When I typed meshctl on the terminal, there is an error message shown: Local config directory not provided…

Do you know what configuration should be done if I want to run #meshctl?

 

Regards,

Kai

 

From: Vikrant More [mailto:vikrant8051@...]
Sent: Wednesday, January 3, 2018 5:14 PM
To: Kai Ren <kren@...>; zephyr-devel@...


Subject: Re: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

 

Hi Kai,

These are some useful links for you:

http://docs.zephyrproject.org/samples/boards/nrf52/mesh/onoff-app/README.html (for this you will need #meshctl as provisioner which is part of BlueZ 5.47  --> https://git.kernel.org/pub/scm/bluetooth/bluez.git/  )

https://devzone.nordicsemi.com/question/178532/zephyr-bluetooth-mesh-development/ (with this you can use Silicon Labs BluetoothMesh APP)

 

 

 

 

On Wed, Jan 3, 2018 at 12:43 PM, Kai Ren <kren@...> wrote:

Hello,

I found a video on Youtube, https://www.youtube.com/watch?v=TwVwIjTX6SI  , Zephyr channel, it’s about 100 seconds.

I’m interested in how to set this demo up like:

  • How many devices (micro:bit) do I need to prepare?
  • What device would be the Provisioner?
  • What firmware do I need to use? Under $ZEPHYR_BASE/sample or $ZEPHYR_BASE/test?

Thanks.

 

Regards,

Kai

 

 

 


_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@...
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel

 

 

 

 


Re: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

Vikrant More <vikrant8051@...>
 

1) Download this --> https://git.kernel.org/pub/scm/bluetooth/bluez.git/snapshot/bluez-5.48.tar.gz

2) tar -xvf bluez-5.48.tar.gz

3) mv bluez-5.48 bluez

4)cd bluez

5)./bootstrap-configure

6)make 

7)make install

8)systemctl daemon-reload

9)systemctl restart bluetooth

10)bluetoothd --version

11) cd mesh
       
      Here you will find local_node.json & prov_db.json

On Wed, Jan 3, 2018 at 6:55 PM, Kai Ren <kren@...> wrote:

Thanks, Vikrant!

 

As you mentioned, I cd into “BlueZ 5.48/mesh”, but I can’t find any *.json in this folder on my Raspberry Pi3, below is the file list in the folder. Is there something I missed?

 

Regards,

Kai

 

 

 

 

From: Vikrant More <vikrant8051@...>
Date: Wednesday, 3 January 2018 at 9:11 PM
To: Kai Ren <kren@...>
Subject: RE: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

 

Or you can directly execute

 

$meshctl -c bluez/mesh

 

In my case, it is 

 

$meshctl -c /home/vikrant/project/bluez/mesh

 

...(just for example)

 

On Jan 3, 2018 6:37 PM, "Vikrant More" <vikrant8051@...> wrote:

Hi Kai,

cd into bluez5.48/mesh

& then execute meshctl

 

Actually it is looking for json files which are available at blez_home/mesh.

 

 

On Jan 3, 2018 6:20 PM, "Kai Ren" <kren@...> wrote:

Hi Vikrant,

Your suggestion is very useful about #meshctl, I’ve already downloaded BlueZ v5.48 and installed it on my Raspberry Pi3.

When I typed meshctl on the terminal, there is an error message shown: Local config directory not provided…

Do you know what configuration should be done if I want to run #meshctl?

 

Regards,

Kai

 

From: Vikrant More [mailto:vikrant8051@...]
Sent: Wednesday, January 3, 2018 5:14 PM
To: Kai Ren <kren@...>; zephyr-devel@lists.zephyrproject.org


Subject: Re: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

 

Hi Kai,

These are some useful links for you:

http://docs.zephyrproject.org/samples/boards/nrf52/mesh/onoff-app/README.html (for this you will need #meshctl as provisioner which is part of BlueZ 5.47  --> https://git.kernel.org/pub/scm/bluetooth/bluez.git/  )

https://devzone.nordicsemi.com/question/178532/zephyr-bluetooth-mesh-development/ (with this you can use Silicon Labs BluetoothMesh APP)

 

 

 

 

On Wed, Jan 3, 2018 at 12:43 PM, Kai Ren <kren@...> wrote:

Hello,

I found a video on Youtube, https://www.youtube.com/watch?v=TwVwIjTX6SI  , Zephyr channel, it’s about 100 seconds.

I’m interested in how to set this demo up like:

  • How many devices (micro:bit) do I need to prepare?
  • What device would be the Provisioner?
  • What firmware do I need to use? Under $ZEPHYR_BASE/sample or $ZEPHYR_BASE/test?

Thanks.

 

Regards,

Kai

 

 

 


_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel

 

 

 



Re: Zephyr way of handling large data transfer over BLE

Vinayak Kariappa
 

Hi Dhananjay,

Take look at this video demonstrating the large data transfer between two nRF52840 PDK boards. The video is old, but not much has changed on the BT API front.

Everything from KConfig to API use is demonstrated here.

On 28 Dec 2017, at 14:38, dhananjay gj <dhguja@...> wrote:

Hello Carles,
           Many thanks for the reply. One final question, Is there an example in zephyr samples that handles transmitting large data?
or any profile supported in zephyr that i can use to circumvent this application level segmentation.

The intention of this question is coming from the fact that L2CAP layer handles segmentation to some extent (limited by memory available) and we are using GATT for custom profiles.
Is there is any standard BLE profile supported in zephyr we can directly use for this purpose. My apologies for this rooky question, i am new to BLE.

Thanks for the support.

Regards,
Dhananjay G J

On Thu, Dec 28, 2017 at 3:10 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi there,

 

Yes, should be applicable to all those since they all call bt_att_create_pdu() which will block if there’s no buffers available.

 

Regards,

 

Carles

 

 

From: dhananjay gj [mailto:dhguja@...]
Sent: 28 December 2017 15:06
To: Cufi, Carles <Carles.Cufi@...>; zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] Zephyr way of handling large data transfer over BLE

 

Hello Carles,

            Many thanks for the information. Is this information is applicable to GATT indicate, write, read too?

Regards,

Dhananjay GJ

 

On Thu, Dec 28, 2017 at 2:50 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi there,

 

Provided the peer does not initiate a GATT MTU Exchange, which would be handled automatically by the Zephyr BLE stack, you can simply call bt_gatt_notify() in a loop and from a thread while modifying the contents of the attribute in each iteration. When GATT runs out of buffers the the bt_gatt_notify() call will block until more are available, so you do not need to wait for an event like when using the SoftDevice.

 

Regards,

 

Carles

 

From: zephyr-users-bounces@lists.zephyrproject.org [mailto:zephyr-users-bounces@lists.zephyrproject.org] On Behalf Of dhananjay gj
Sent: 28 December 2017 13:45
To: zephyr-users@lists.zephyrproject.org
Subject: [Zephyr-users] Zephyr way of handling large data transfer over BLE

 

Hello All,

          I have a question related to the one i asked last week. (https://lists.zephyrproject.org/pipermail/zephyr-users/2017-December/000915.html). But i will rephrase it and be more generic to what i am looking for now because that question was already answered and solution works too.

I have an Android client (BLE central) and zephyr OS based BLE device as peripheral (nRF device) transfer data over a custom profile. I am aware that in BLE we can transfer only 20 bytes at a time. And also there are possibilities to extend the data packet size or increase the ATT_MTU size based on negotiation. But for compatibility purposes, I will avoid using these techniques. I am also not using BLE mesh or nordic softdevice SDK.

In that case, what is the zephyr way of handling large data transfer over BLE.? Do we need to handle segmentation and reassembly in the application layer by our selves only ? or any callback events possible in case buffer is full during multi packet transmission so that we can handle this?.

 

I am searching if there is any solution similar to the accepted answer in this thread for nordic SDK: https://devzone.nordicsemi.com/question/1741/dealing-large-data-packets-through-ble/)

 

Any example or leads to this using zephyr is much appreciated. Thanks in advance.

 

Regards,

Dhananjay GJ

 


_______________________________________________
Zephyr-users mailing list
Zephyr-users@...
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users


Re: Working with mesh shell

Johan Hedberg
 

Hi Ashish,

On Fri, Dec 29, 2017, ashish.shukla@corvi.com wrote:
If I only use /tests/bluetooth/mesh_shell, how am I supposed to bind model
with app key, when model is not even defined in the code.
Obviously that's not possible. What you could try to do, is to take the
mesh_shell code as a starting point and extend it from there with the
models that you need.

Johan


Re: Working with mesh shell

ashish.shukla@corvi.com <ashish.shukla@...>
 

Hi Johan,
Here is brief bout what I'm doing :

I'm integrating the code available at  tests/bluetooth/mesh_shell  and /samples/bluetooth/mesh and then running the code on a controller which is supposed to provision and configure itself. of course, taking care of configuration file.

I might seem naive, as I've just learned to use zephyr shell with very small documentation available.

If I only use /tests/bluetooth/mesh_shell, how am I supposed to bind model with app key, when model is not even defined in the code.

 


--
Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development


Please consider the environment before printing this e-mail or its attachments.

Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi


On Fri, Dec 29, 2017 at 1:00 PM, Johan Hedberg <johan.hedberg@...> wrote:
Hi Ashish,

On Fri, Dec 29, 2017, ashish.shukla@... wrote:
> can you share a working code that's compatible with mesh shell?  Otherwise
> I've learn by trial and error. For now, I'm stuck at "init" command, it
> seemed to me that health client isn't configured in my code. Even after
> configuring health client, it never comes out of loop:
> here is mesh shell

Which application are you using? An unmodified tests/bluetooth/mesh_shell
should work directly. If you're using something else you might at least
want to take a look at the configuration of the mesh_shell app.

Johan


Re: Working with mesh shell

Johan Hedberg
 

Hi Ashish,

On Fri, Dec 29, 2017, ashish.shukla@corvi.com wrote:
can you share a working code that's compatible with mesh shell? Otherwise
I've learn by trial and error. For now, I'm stuck at "init" command, it
seemed to me that health client isn't configured in my code. Even after
configuring health client, it never comes out of loop:
here is mesh shell
Which application are you using? An unmodified tests/bluetooth/mesh_shell
should work directly. If you're using something else you might at least
want to take a look at the configuration of the mesh_shell app.

Johan


Re: Working with mesh shell

ashish.shukla@corvi.com <ashish.shukla@...>
 

hi Johan,

can you share a working code that's compatible with mesh shell?  Otherwise I've learn by trial and error. For now, I'm stuck at "init" command, it seemed to me that health client isn't configured in my code. Even after configuring health client, it never comes out of loop:
here is mesh shell

shell> Initializing...
[bt] [INF] hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)
[bt] [INF] hci_vs_init: HW Variant: nRF52x (0x0002)
[bt] [INF] hci_vs_init: Firmware: Standard Bluetooth controller (0x00) Version 1.10 Build 99
[bt] [INF] show_dev_info: Identity: d0:23:3e:36:04:49 (random)
[bt] [INF] show_dev_info: HCI: version 5.0 (0x09) revision 0x0000, manufacturer 0xffff
[bt] [INF] show_dev_info: LMP: version 5.0 (0x09) subver 0xffff
Bluetooth initialized
[bt] [DBG] bt_mesh_cfg_cli_init: (0x20002360) primary 1
[bt] [DBG] bt_mesh_health_cli_init: (0x20002360) primary 1
[bt] [INF] bt_mesh_prov_init: Device UUID: 00000000-0000-0000-0000-d0233e360449
Mesh initialized
Type "help" for supported commands.
Before any Bluetooth commands you must run "init"

mesh> init
[bt] [DBG] bt_mesh_cfg_cli_init: (0x20000270) primary 1
[bt] [DBG] bt_mesh_health_cli_init: (0x20000270) primary 1




 


--
Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development


Please consider the environment before printing this e-mail or its attachments.

Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi


On Thu, Dec 28, 2017 at 7:12 PM, Johan Hedberg <johan.hedberg@...> wrote:
Hi Ashish,

On Thu, Dec 28, 2017, ashish.shukla@... wrote:
> I understand basics on configuration model. However, I'm trying to add app
> key, it results in following error
>
> unable to send App Key add (error -11).
>
> I face same issue trying to add net key. For your reference, I'm attaching
> snapshot of mesh shell

The first thing the shell prints is that it asks you to run "init"
before any other command. Since you haven't done that the "provision"
command doesn't do anything, and then you get EAGAIN (errno 11) when you
try to send a message, which is the error that the mesh stack returns
when you're not provisioned and try to send messages.

Johan


Re: Zephyr way of handling large data transfer over BLE

dhguja@gmail.com
 

Hello Carles,
           Many thanks for the reply. One final question, Is there an example in zephyr samples that handles transmitting large data?
or any profile supported in zephyr that i can use to circumvent this application level segmentation.

The intention of this question is coming from the fact that L2CAP layer handles segmentation to some extent (limited by memory available) and we are using GATT for custom profiles.
Is there is any standard BLE profile supported in zephyr we can directly use for this purpose. My apologies for this rooky question, i am new to BLE.

Thanks for the support.

Regards,
Dhananjay G J

On Thu, Dec 28, 2017 at 3:10 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi there,

 

Yes, should be applicable to all those since they all call bt_att_create_pdu() which will block if there’s no buffers available.

 

Regards,

 

Carles

 

 

From: dhananjay gj [mailto:dhguja@...]
Sent: 28 December 2017 15:06
To: Cufi, Carles <Carles.Cufi@...>; zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] Zephyr way of handling large data transfer over BLE

 

Hello Carles,

            Many thanks for the information. Is this information is applicable to GATT indicate, write, read too?

Regards,

Dhananjay GJ

 

On Thu, Dec 28, 2017 at 2:50 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi there,

 

Provided the peer does not initiate a GATT MTU Exchange, which would be handled automatically by the Zephyr BLE stack, you can simply call bt_gatt_notify() in a loop and from a thread while modifying the contents of the attribute in each iteration. When GATT runs out of buffers the the bt_gatt_notify() call will block until more are available, so you do not need to wait for an event like when using the SoftDevice.

 

Regards,

 

Carles

 

From: zephyr-users-bounces@lists.zephyrproject.org [mailto:zephyr-users-bounces@lists.zephyrproject.org] On Behalf Of dhananjay gj
Sent: 28 December 2017 13:45
To: zephyr-users@lists.zephyrproject.org
Subject: [Zephyr-users] Zephyr way of handling large data transfer over BLE

 

Hello All,

          I have a question related to the one i asked last week. (https://lists.zephyrproject.org/pipermail/zephyr-users/2017-December/000915.html). But i will rephrase it and be more generic to what i am looking for now because that question was already answered and solution works too.

I have an Android client (BLE central) and zephyr OS based BLE device as peripheral (nRF device) transfer data over a custom profile. I am aware that in BLE we can transfer only 20 bytes at a time. And also there are possibilities to extend the data packet size or increase the ATT_MTU size based on negotiation. But for compatibility purposes, I will avoid using these techniques. I am also not using BLE mesh or nordic softdevice SDK.

In that case, what is the zephyr way of handling large data transfer over BLE.? Do we need to handle segmentation and reassembly in the application layer by our selves only ? or any callback events possible in case buffer is full during multi packet transmission so that we can handle this?.

 

I am searching if there is any solution similar to the accepted answer in this thread for nordic SDK: https://devzone.nordicsemi.com/question/1741/dealing-large-data-packets-through-ble/)

 

Any example or leads to this using zephyr is much appreciated. Thanks in advance.

 

Regards,

Dhananjay GJ

 



Re: Zephyr way of handling large data transfer over BLE

Carles Cufi
 

Hi there,

 

Yes, should be applicable to all those since they all call bt_att_create_pdu() which will block if there’s no buffers available.

 

Regards,

 

Carles

 

 

From: dhananjay gj [mailto:dhguja@...]
Sent: 28 December 2017 15:06
To: Cufi, Carles <Carles.Cufi@...>; zephyr-users@...
Subject: Re: [Zephyr-users] Zephyr way of handling large data transfer over BLE

 

Hello Carles,

            Many thanks for the information. Is this information is applicable to GATT indicate, write, read too?

Regards,

Dhananjay GJ

 

On Thu, Dec 28, 2017 at 2:50 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi there,

 

Provided the peer does not initiate a GATT MTU Exchange, which would be handled automatically by the Zephyr BLE stack, you can simply call bt_gatt_notify() in a loop and from a thread while modifying the contents of the attribute in each iteration. When GATT runs out of buffers the the bt_gatt_notify() call will block until more are available, so you do not need to wait for an event like when using the SoftDevice.

 

Regards,

 

Carles

 

From: zephyr-users-bounces@... [mailto:zephyr-users-bounces@...] On Behalf Of dhananjay gj
Sent: 28 December 2017 13:45
To: zephyr-users@...
Subject: [Zephyr-users] Zephyr way of handling large data transfer over BLE

 

Hello All,

          I have a question related to the one i asked last week. (https://lists.zephyrproject.org/pipermail/zephyr-users/2017-December/000915.html). But i will rephrase it and be more generic to what i am looking for now because that question was already answered and solution works too.

I have an Android client (BLE central) and zephyr OS based BLE device as peripheral (nRF device) transfer data over a custom profile. I am aware that in BLE we can transfer only 20 bytes at a time. And also there are possibilities to extend the data packet size or increase the ATT_MTU size based on negotiation. But for compatibility purposes, I will avoid using these techniques. I am also not using BLE mesh or nordic softdevice SDK.

In that case, what is the zephyr way of handling large data transfer over BLE.? Do we need to handle segmentation and reassembly in the application layer by our selves only ? or any callback events possible in case buffer is full during multi packet transmission so that we can handle this?.

 

I am searching if there is any solution similar to the accepted answer in this thread for nordic SDK: https://devzone.nordicsemi.com/question/1741/dealing-large-data-packets-through-ble/)

 

Any example or leads to this using zephyr is much appreciated. Thanks in advance.

 

Regards,

Dhananjay GJ

 


Re: Zephyr way of handling large data transfer over BLE

dhguja@gmail.com
 

Hello Carles,
            Many thanks for the information. Is this information is applicable to GATT indicate, write, read too?

Regards,
Dhananjay GJ

On Thu, Dec 28, 2017 at 2:50 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi there,

 

Provided the peer does not initiate a GATT MTU Exchange, which would be handled automatically by the Zephyr BLE stack, you can simply call bt_gatt_notify() in a loop and from a thread while modifying the contents of the attribute in each iteration. When GATT runs out of buffers the the bt_gatt_notify() call will block until more are available, so you do not need to wait for an event like when using the SoftDevice.

 

Regards,

 

Carles

 

From: zephyr-users-bounces@lists.zephyrproject.org [mailto:zephyr-users-bounces@lists.zephyrproject.org] On Behalf Of dhananjay gj
Sent: 28 December 2017 13:45
To: zephyr-users@lists.zephyrproject.org
Subject: [Zephyr-users] Zephyr way of handling large data transfer over BLE

 

Hello All,

          I have a question related to the one i asked last week. (https://lists.zephyrproject.org/pipermail/zephyr-users/2017-December/000915.html). But i will rephrase it and be more generic to what i am looking for now because that question was already answered and solution works too.

I have an Android client (BLE central) and zephyr OS based BLE device as peripheral (nRF device) transfer data over a custom profile. I am aware that in BLE we can transfer only 20 bytes at a time. And also there are possibilities to extend the data packet size or increase the ATT_MTU size based on negotiation. But for compatibility purposes, I will avoid using these techniques. I am also not using BLE mesh or nordic softdevice SDK.

In that case, what is the zephyr way of handling large data transfer over BLE.? Do we need to handle segmentation and reassembly in the application layer by our selves only ? or any callback events possible in case buffer is full during multi packet transmission so that we can handle this?.

 

I am searching if there is any solution similar to the accepted answer in this thread for nordic SDK: https://devzone.nordicsemi.com/question/1741/dealing-large-data-packets-through-ble/)

 

Any example or leads to this using zephyr is much appreciated. Thanks in advance.

 

Regards,

Dhananjay GJ



Re: Zephyr way of handling large data transfer over BLE

Carles Cufi
 

Hi there,

 

Provided the peer does not initiate a GATT MTU Exchange, which would be handled automatically by the Zephyr BLE stack, you can simply call bt_gatt_notify() in a loop and from a thread while modifying the contents of the attribute in each iteration. When GATT runs out of buffers the the bt_gatt_notify() call will block until more are available, so you do not need to wait for an event like when using the SoftDevice.

 

Regards,

 

Carles

 

From: zephyr-users-bounces@... [mailto:zephyr-users-bounces@...] On Behalf Of dhananjay gj
Sent: 28 December 2017 13:45
To: zephyr-users@...
Subject: [Zephyr-users] Zephyr way of handling large data transfer over BLE

 

Hello All,

          I have a question related to the one i asked last week. (https://lists.zephyrproject.org/pipermail/zephyr-users/2017-December/000915.html). But i will rephrase it and be more generic to what i am looking for now because that question was already answered and solution works too.

I have an Android client (BLE central) and zephyr OS based BLE device as peripheral (nRF device) transfer data over a custom profile. I am aware that in BLE we can transfer only 20 bytes at a time. And also there are possibilities to extend the data packet size or increase the ATT_MTU size based on negotiation. But for compatibility purposes, I will avoid using these techniques. I am also not using BLE mesh or nordic softdevice SDK.

In that case, what is the zephyr way of handling large data transfer over BLE.? Do we need to handle segmentation and reassembly in the application layer by our selves only ? or any callback events possible in case buffer is full during multi packet transmission so that we can handle this?.

 

I am searching if there is any solution similar to the accepted answer in this thread for nordic SDK: https://devzone.nordicsemi.com/question/1741/dealing-large-data-packets-through-ble/)

 

Any example or leads to this using zephyr is much appreciated. Thanks in advance.

 

Regards,

Dhananjay GJ


Re: Working with mesh shell

Johan Hedberg
 

Hi Ashish,

On Thu, Dec 28, 2017, ashish.shukla@corvi.com wrote:
I understand basics on configuration model. However, I'm trying to add app
key, it results in following error

unable to send App Key add (error -11).

I face same issue trying to add net key. For your reference, I'm attaching
snapshot of mesh shell
The first thing the shell prints is that it asks you to run "init"
before any other command. Since you haven't done that the "provision"
command doesn't do anything, and then you get EAGAIN (errno 11) when you
try to send a message, which is the error that the mesh stack returns
when you're not provisioned and try to send messages.

Johan


Re: [Zephyr-devel] Working with mesh shell

Vikrant More <vikrant8051@...>
 

Hi to all,

Need proper sequence of all commands to start working with #mesh_shell [ to activate Model 1000 (which subscribe to 0xC000) as well as 1001 (which publish to 0xC000) ]

#meshctl take care of netKey & appKey in background. is #mesh_shell does same thing
Or I have to add those key manually ?


Currently getting following log  -->

mesh> shell> Initializing...
[bt] [INF] hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)
[bt] [INF] hci_vs_init: HW Variant: nRF52x (0x0002)
[bt] [INF] hci_vs_init: Firmware: Standard Bluetooth controller (0x00) Version 1.10 Build 99
[bt] [INF] show_dev_info: Identity: e2:da:a3:e1:e1:c6 (random)
[bt] [INF] show_dev_info: HCI: version 5.0 (0x09) revision 0x0000, manufacturer 0xffff
[bt] [INF] show_dev_info: LMP: version 5.0 (0x09) subver 0xffff
Bluetooth initialized[bt] [INF] bt_mesh_prov_init: Device UUID: 00000000-0000-0000-0000-e2daa3e1e1c6
Mesh initialized
mesh> provision 1 1
[bt] [INF] bt_mesh_provision: Primary Element: 0x0001
[bt] [DBG] bt_mesh_provision: (0x20000260) net_idx 0x0001 flags 0x00 iv_index 0x0000
mesh> dst 1
Destination address set to 0x0001
mesh> mod-app-bind 1 1 1000
Unable to send Model App Bind (err -11)
mesh>








On Thu, Dec 28, 2017 at 2:16 PM, ashish.shukla@... <ashish.shukla@...> wrote:
Hi Johan,
I understand basics on configuration model. However, I'm trying to add app key, it results in following error

unable to send App Key add (error -11).

I face same issue trying to add net key. For your reference, I'm attaching snapshot of mesh shell  


--
Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development


Please consider the environment before printing this e-mail or its attachments.

Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi


On Thu, Dec 28, 2017 at 1:54 PM, Johan Hedberg <johan.hedberg@...> wrote:
Hi Ashish,

On Thu, Dec 28, 2017, ashish.shukla@... wrote:
> I'm trying to provision a local node only.

Are there any specific commands you're wondering about? You can get the
full list of them by typing "help". You'd e.g. start with provisioning
by typing "provision <network index> <unicast address>". The shell does
require basic knowledge of the configuration model, so I hope you can
explore the available commands and by experimenting get something
working. Each configuration model related shell command maps directly to
a configuration model message, so you'll need to look at the respective
specification section for each command for the details of its
parameters, etc.

Johan


_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel


2261 - 2280 of 2712