Date   

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

Juliano S Assine
 

Thanks Michael, I was able to reproduce on my board. I was having some trouble because there is only one UART on the nrf52 DK so I couldn't access the console to see what was going on.
I agree with Paul, it took me some reading about slip and ppp, tun/tap etc, to figure things out, which is not bad, but a sample in the repo would have been really helpful.

Just a few more questions:
2 - Using the http_server example, tunslip6 -v2 works, but -v4 doesn't, there may be a bug there
3- http_server example works of firefox but not on chrome.

2018-01-13 8:55 GMT-02:00 Paul Sokolovsky <paul.sokolovsky@...>:

Hello Michael,

On Fri, 12 Jan 2018 19:58:12 +0000
Michael Hope <michaelh@...> wrote:

> It turns out that samples/net/http_server already works fine :)
>
> I had to shrink the buffer count to fit on the 32 KiB on the Arduino
> Zero though.

Sure, existing samples should work, that's the whole idea. As soon as
you enable bunch of options (and outsider would say "obscure options"),
and run stuff on a host ("obscure stuff", an outsider would say; what
do we do to run SLIP on Linux nowadays? Is it still something simple as
slirp, or it was subsumed by pppd and you need to dig into its obscure
option to make it run, jungling to not affect system-wide setup and
not get an option conflict?).

Effectively, a known working configuration and README describing the
full setup is what would comprise a SLIP sample, the code is definitely
there. So, please don't discount it as something not useful and not
worth a hacking pleasure ;-).

>
> -- Michael
>
> On Thu, 11 Jan 2018 at 00:15 Paul Sokolovsky
> <paul.sokolovsky@...> wrote:
>
> > Hello Michael,
> >
> > On Mon, 08 Jan 2018 18:35:48 +0000
> > Michael Hope <michaelh@...> wrote:
> >
> > []
> >
> > > > 2. If I have a physical device, can I emulate a networking
> > > > connection using UART in the same fashion?
> > > >
> > >
> > > Yip, this works well.  One of the first things I did when I
> > > picked up Zephyr was configure SLIP and ping the board :)
> >
> > Perhaps, you should contribute a sample application to samples/ for
> > that ;-).

[]

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


Re: NFC Library

Carles Cufi
 

Hi Erwan,

 

We have not looked into it yet, but there would definitely be interest from us since many of our ICs support NFC. We currently ship a binary blob in our proprietary SDK, so that is not an option.

 

Regards,

 

Carles

 

From: zephyr-users-bounces@... [mailto:zephyr-users-bounces@...] On Behalf Of Erwan Gouriou
Sent: 16 January 2018 14:44
To: Zephyr-users@...
Subject: [Zephyr-users] NFC Library

 

Hi all,

Does anyone have ever looked to a NFC library that could be integrated into Zephyr?

Would there be any interest?

 

Thanks

Erwan

 


NFC Library

Erwan Gouriou
 

Hi all,

Does anyone have ever looked to a NFC library that could be integrated into Zephyr?
Would there be any interest?

Thanks
Erwan


Re: understanding of #BluetoothMesh OOB authentication procedure #bluetoothmesh

Vikrant More <vikrant8051@...>
 

Hi Johan,

Thanks for your reply.



I've been further clearing my concept by reading above two links along with Mesh Specs.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
When I comment-out following lines as below

static const struct bt_mesh_prov prov =
{
    .uuid = dev_uuid,
    //.output_size = 4,
    //.output_actions = BT_MESH_BLINK | BT_MESH_BEEP | BT_MESH_VIBRATE | BT_MESH_DISPLAY_NUMBER | BT_MESH_DISPLAY_STRING,
    //.output_number = output_number,

    .complete = prov_complete,
    .reset = prov_reset,
};

, flowchart (5.4.2) follows path as per attached FlowChart_1.pdf. Am I right ?

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

& when I uncomment following lines as below

static const struct bt_mesh_prov prov =
{
    .uuid = dev_uuid,
    .output_size = 4,
    .output_actions = BT_MESH_BLINK | BT_MESH_BEEP | BT_MESH_VIBRATE | BT_MESH_DISPLAY_NUMBER | BT_MESH_DISPLAY_STRING,
    .output_number = output_number,

    .complete = prov_complete,
    .reset = prov_reset,
};

, flowchart follows path as per attached FlowChart_2.pdf. Am I right ?

[  Here in both the cases, I'm assuming DEVICE generate dynamic public key (non OOB public key) which gets transfer over Bluetooth-LinK (non-OOB channel)
   And it is used by ECDH to calculate ECDHSecret on provisioner side ]
------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DEVICE's Public key can be static or dynamic plus it can exchange over Bluetooth-Link or OOB. Am I right ?

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

As per current implementation, we are using dynamic Public Key
& both sides public keys are get exchanged over Bluetooth-Link instead of OOB. Am I right ?

But when I want to use static Public-Private keys for DEVICE (provisioner may have dynamic pair), how & where to edit so that provisioner will
understand that DEVICE has static public key ?

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

How provisioner will understand from where to received/read DEVICE public key out of Bluetooth-Link or OOB channel ?
------------------------------------------------------------------------------------------------------------------------------------------------------------------------

If public keys get exchanged over insecure channel, then what is significance of OOB tunnel over Bluetooth-Link ?

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

I agree that, Bluetooth Specs has already provided details but it not easy to interpret its correct meaning


On Mon, Jan 15, 2018 at 8:42 PM, Johan Hedberg <johan.hedberg@...> wrote:
Hi Vikrant,

On Mon, Jan 15, 2018, Vikrant More wrote:
> By reading this link, I understood that netKey, appKey, dveKey are
> AES-128 *symmetric
> keys* which are exchanged over encrypted *channel* during provisioning.

That's not completely true. Only the primary netkey and the devkey are
distributed to the node during provisioning. The other netkeys (if any)
and appkeys are distributed during the configuration phase over mesh,
and are encrypted using the keys that were distributed during
provisioning phase (primary netkey and devkey).

> This encrypted *channel* is based on public-private keys. Provisioner has
> its combo of keys & similarly DEVICE has its own.
> And to create this channels both parties should aware of public-key of each
> other.
>
> And there are two ways to exchange public keys viz;
> 1) in-band
> 2) out-of-band (OOB) (eg. NFC, QR code )
>
> Two avoid *man-in-the-middle attacks *we should go with OOB
> *. *
>
>
> *Up till this, Am I right ?*

Yes, however I think using public key in-band and an OOB mechanism
during the authentication stage would also help prevent MITM attacks
(though only a 128-bit randomly generated Static OOB value should be
considered as "high" security level).

> *So my question is, in case of Zephyr's #BluetoothMesh where is DEVICE's
> private & public keys stored ? *

The ECDH crypto is implemented in subsys/bluetooth/host/hci_ecc.c, and
it's based on TinyCrypt (which in turn is based on uECC, but let's not
get into those details :)

> *And how to update that pair from default one ? *

Currently all these APIs are internal, but we could (and perhaps should)
make them public. They reside in subsys/bluetooth/host/ecc.h currently.
There's e.g. bt_pub_key_get() which gives you the current public key
value (e.g. to be sent over an OOB channel), and bt_pub_key_gen() to
generate a new public-private keypair. Currently a new key pair gets
generated every time you initialize Bluetooth (by calling bt_enable).

> But when we enable this,
>
>     .output_size = 6,  //4
>     .output_actions = BT_MESH_BLINK | BT_MESH_BEEP | BT_MESH_VIBRATE |
> BT_MESH_DISPLAY_NUMBER | BT_MESH_DISPLAY_STRING,
>     .output_number = output_number,
>     .output_string = output_string,
>
> & we get 4 digits or 6 digits or random string on DEVICE's serial terminal,
> then what is this ? this is obviously not any type of public-key ?
> Could anybody explain me, what is going on ? What is Static OOB, Output
> OOB, Input OOB ?
>
> How Static OOB, Output OOB, Input OOB are related with the public-keys
> exchange which I've mentioned above ?

Those are steps that can happen after the public key exchange. I really
recommend you to read through section "5.4.2 Provisioning behavior" in
the Mesh Profile specification. Its subsections correspond to the
various stages that provisioning goes through. E.g. section 5.4.2.3 is
the public key exchange, and section 5.4.2.4 (called "Authentication")
the one where the Static/Output/Input OOB methods can be applied.

> If Zephyr does not have own copy of public-private keys for OOB, then how
> to generate & add them in firmware ?
> How to link them with above mentioned mechanism ?

As I mentioned earlier, by making the ecc.h header file public, we could
give the app access the the public key and make it possible for it to
transfer it out-of-band to the provisioner.

One thing that is missing (since the public key APIs were not previously
available to the app) is the ability for the app to influence the
Provisioning Capabilities PDU that we send to include a flag that says
"OOB Public Key available". It's a fairly simple thing to fix though -
it'd just be one more u8_t field to the bt_mesh_prov struct.

Johan


Re: understanding of #BluetoothMesh OOB authentication procedure #bluetoothmesh

Johan Hedberg
 

Hi Vikrant,

On Mon, Jan 15, 2018, Vikrant More wrote:
By reading this link, I understood that netKey, appKey, dveKey are
AES-128 *symmetric
keys* which are exchanged over encrypted *channel* during provisioning.
That's not completely true. Only the primary netkey and the devkey are
distributed to the node during provisioning. The other netkeys (if any)
and appkeys are distributed during the configuration phase over mesh,
and are encrypted using the keys that were distributed during
provisioning phase (primary netkey and devkey).

This encrypted *channel* is based on public-private keys. Provisioner has
its combo of keys & similarly DEVICE has its own.
And to create this channels both parties should aware of public-key of each
other.

And there are two ways to exchange public keys viz;
1) in-band
2) out-of-band (OOB) (eg. NFC, QR code )

Two avoid *man-in-the-middle attacks *we should go with OOB
*. *


*Up till this, Am I right ?*
Yes, however I think using public key in-band and an OOB mechanism
during the authentication stage would also help prevent MITM attacks
(though only a 128-bit randomly generated Static OOB value should be
considered as "high" security level).

*So my question is, in case of Zephyr's #BluetoothMesh where is DEVICE's
private & public keys stored ? *
The ECDH crypto is implemented in subsys/bluetooth/host/hci_ecc.c, and
it's based on TinyCrypt (which in turn is based on uECC, but let's not
get into those details :)

*And how to update that pair from default one ? *
Currently all these APIs are internal, but we could (and perhaps should)
make them public. They reside in subsys/bluetooth/host/ecc.h currently.
There's e.g. bt_pub_key_get() which gives you the current public key
value (e.g. to be sent over an OOB channel), and bt_pub_key_gen() to
generate a new public-private keypair. Currently a new key pair gets
generated every time you initialize Bluetooth (by calling bt_enable).

But when we enable this,

.output_size = 6, //4
.output_actions = BT_MESH_BLINK | BT_MESH_BEEP | BT_MESH_VIBRATE |
BT_MESH_DISPLAY_NUMBER | BT_MESH_DISPLAY_STRING,
.output_number = output_number,
.output_string = output_string,

& we get 4 digits or 6 digits or random string on DEVICE's serial terminal,
then what is this ? this is obviously not any type of public-key ?
Could anybody explain me, what is going on ? What is Static OOB, Output
OOB, Input OOB ?

How Static OOB, Output OOB, Input OOB are related with the public-keys
exchange which I've mentioned above ?
Those are steps that can happen after the public key exchange. I really
recommend you to read through section "5.4.2 Provisioning behavior" in
the Mesh Profile specification. Its subsections correspond to the
various stages that provisioning goes through. E.g. section 5.4.2.3 is
the public key exchange, and section 5.4.2.4 (called "Authentication")
the one where the Static/Output/Input OOB methods can be applied.

If Zephyr does not have own copy of public-private keys for OOB, then how
to generate & add them in firmware ?
How to link them with above mentioned mechanism ?
As I mentioned earlier, by making the ecc.h header file public, we could
give the app access the the public key and make it possible for it to
transfer it out-of-band to the provisioner.

One thing that is missing (since the public key APIs were not previously
available to the app) is the ability for the app to influence the
Provisioning Capabilities PDU that we send to include a flag that says
"OOB Public Key available". It's a fairly simple thing to fix though -
it'd just be one more u8_t field to the bt_mesh_prov struct.

Johan


understanding of #BluetoothMesh OOB authentication procedure #bluetoothmesh

Vikrant More <vikrant8051@...>
 

Hello World !!

By reading this link, I understood that netKey, appKey, dveKey are AES-128 symmetric keys which are exchanged over encrypted channel during provisioning.

This encrypted channel is based on public-private keys. Provisioner has its combo of keys & similarly DEVICE has its own.
And to create this channels both parties should aware of public-key of each other.

And there are two ways to exchange public keys viz;
1) in-band
2) out-of-band (OOB) (eg. NFC, QR code )

Two avoid man-in-the-middle attacks we should go with OOB.

Up till this, Am I right ?

So my question is, in case of Zephyr's #BluetoothMesh where is DEVICE's private & public keys stored ?
And how to update that pair from default one ?

//----------------------------------------------------------------------------------------------------------------------------------------------------------------

Previously, I had asked following Question, (at that time I had forgotten to add zephyr-devel@... in CC)

//----------------------------------------------------------------------------------------------------------------------------------------------------------------


For testing I always comment-out following lines

    //.output_size = 6,
    //.output_actions = (BT_MESH_DISPLAY_NUMBER | BT_MESH_DISPLAY_STRING),
    //.output_number = output_number,
    //.output_string = output_string,

,otherwise I have to read that value from nRF52 terminal .

How this mechanism is going to work with actual products based on #BluetoothMesh ?

We can't ask consumer or end-user to attach device to serial terminal to get that value like we does to complete OOB-authentication procedure.

On that Mr. Johan replied as ->

In the Mesh Profile Specification, you can find the other types of input
& output OOB actions e.g. under section 5.4.1.2, in particular tables
5.22 and 5.24. The only reason the sample apps use display number/string
is that they're designed for a setup with a text-based console.

That said, the general consensus within the Mesh WG is that the
input/output OOB action mechanism is not sufficiently secure and should
only be considered to be a minor improvement over non-interactive
provisioning. The recommendation for secure provisioning is to use OOB
Public Key transfer or a 16-byte static OOB value. The actual mechanism
to do this is left up to the implementation - you can e.g. have a URL in
the node's advertising data or have a QR code printed on the node which
the provisioner reads. Using NFC is another option. IIRC, there should
be a whitepaper coming out from the Mesh WG soon which covers
recommended practices for secure provisioning.
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------------------------------------------------

But when we enable this,

    .output_size = 6,  //4
    .output_actions = BT_MESH_BLINK | BT_MESH_BEEP | BT_MESH_VIBRATE | BT_MESH_DISPLAY_NUMBER | BT_MESH_DISPLAY_STRING,
    .output_number = output_number,
    .output_string = output_string,

& we get 4 digits or 6 digits or random string on DEVICE's serial terminal, then what is this ? this is obviously not any type of public-key ?
Could anybody explain me, what is going on ? What is Static OOB, Output OOB, Input OOB ?

How Static OOB, Output OOB, Input OOB are related with the public-keys exchange which I've mentioned above ?

If Zephyr does not have own copy of public-private keys for OOB, then how to generate & add them in firmware ?
How to link them with above mentioned mechanism ?


Thank You !!





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

Paul Sokolovsky
 

Hello Michael,

On Fri, 12 Jan 2018 19:58:12 +0000
Michael Hope <michaelh@juju.nz> wrote:

It turns out that samples/net/http_server already works fine :)

I had to shrink the buffer count to fit on the 32 KiB on the Arduino
Zero though.
Sure, existing samples should work, that's the whole idea. As soon as
you enable bunch of options (and outsider would say "obscure options"),
and run stuff on a host ("obscure stuff", an outsider would say; what
do we do to run SLIP on Linux nowadays? Is it still something simple as
slirp, or it was subsumed by pppd and you need to dig into its obscure
option to make it run, jungling to not affect system-wide setup and
not get an option conflict?).

Effectively, a known working configuration and README describing the
full setup is what would comprise a SLIP sample, the code is definitely
there. So, please don't discount it as something not useful and not
worth a hacking pleasure ;-).


-- Michael

On Thu, 11 Jan 2018 at 00:15 Paul Sokolovsky
<paul.sokolovsky@linaro.org> wrote:

Hello Michael,

On Mon, 08 Jan 2018 18:35:48 +0000
Michael Hope <michaelh@juju.nz> wrote:

[]

2. If I have a physical device, can I emulate a networking
connection using UART in the same fashion?
Yip, this works well. One of the first things I did when I
picked up Zephyr was configure SLIP and ping the board :)
Perhaps, you should contribute a sample application to samples/ for
that ;-).
[]

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


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

Michael Hope
 

It turns out that samples/net/http_server already works fine :)

I had to shrink the buffer count to fit on the 32 KiB on the Arduino Zero though.

-- Michael

On Thu, 11 Jan 2018 at 00:15 Paul Sokolovsky <paul.sokolovsky@...> wrote:
Hello Michael,

On Mon, 08 Jan 2018 18:35:48 +0000
Michael Hope <michaelh@...> wrote:

[]

> > 2. If I have a physical device, can I emulate a networking
> > connection using UART in the same fashion?
> >
>
> Yip, this works well.  One of the first things I did when I picked up
> Zephyr was configure SLIP and ping the board :)

Perhaps, you should contribute a sample application to samples/ for
that ;-).

>
> -- Michael



--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


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

Michael Hope
 

One possibility: the host address should be 2001:db8::2, not ::1.

The net shell is also very useful.  Try 'select net' and 'stats'.  I see things like this:

Host side:

********SLIP started on ``/dev/ttyUSB0''
slipfd and inslip reopened
ip neigh flush dev tap0
Cannot find device "tap0"
opened tap device ``/dev/tap0''
ifconfig tap0 up
ip -6 route add 2001:db8::/64 dev tap0
ip -6 addr add 2001:db8::2/64 dev tap0
ip route add 192.0.2.0/24 dev tap0
ip addr add 192.0.2.2/24 dev tap0
ifconfig tap0

tap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.0.2.2  netmask 255.255.255.0  broadcast 0.0.0.0
        inet6 2001:db8::2  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::144a:22ff:feff:a9bf  prefixlen 64  scopeid 0x20<link>
        ether 16:4a:22:ff:a9:bf  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tap0: Packet from TUN of length 90 - write SLIP
tap0: Packet from TUN of length 110 - write SLIP
tap0: Packet from TUN of length 74 - write SLIP
tap0: Packet from TUN of length 54 - write SLIP
tap0: Packet from TUN of length 86 - write SLIP

Device side:

shell> select net
net> stats
IPv6 recv      13       sent    8       drop    0       forwarded       0
IPv6 ND recv   2        sent    5       drop    2
IPv6 MLD recv  0        sent    3       drop    0
IP vhlerr      0        hblener 0       lblener 0
IP fragerr     0        chkerr  0       protoer 0
ICMP recv      10       sent    3       drop    8
ICMP typeer    0        chkerr  0
UDP recv       0        sent    0       drop    3
UDP chkerr     0
TCP bytes recv 0        sent    0
TCP seg recv   0        sent    0       drop    0
TCP seg resent 0        chkerr  0       ackerr  0
TCP seg rsterr 0        rst     0       re-xmit 0
TCP conn drop  0        connrst 0
Bytes received 1584
Bytes sent     564
Processing err 5

-- Michael

On Wed, 10 Jan 2018 at 19:27 Juliano Siloto Assine <jsiloto@...> wrote:
2018-01-08 16:35 GMT-02:00 Michael Hope <michaelh@...>:
Hi Juilano.  Replies inline...

On Mon, 8 Jan 2018 at 13:37 Juliano Siloto Assine <jsiloto@...> wrote:
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?

Currently, no.  You can only run one instance of the SLIP interface partly as it depends on the single-instance uart_pipe code.


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?

Yip, this works well.  One of the first things I did when I picked up Zephyr was configure SLIP and ping the board :)

Any suggestions as to how?
If I use uart0 as uart-pipe I can ping a qemu instance but not my physical board.

On qemu I am running with the flag -serial unix:/tmp/slip.sock and using net/tools scripts -serial unix:/tmp/slip.sock
On my board (nrf52_pca10040) I am trying to use tunslip6 directly like:
> sudo ./tunslip6 -B 115200 -s /dev/ttyUSB0 -T -v2 2001:db8::1/64 &
 

-- Michael

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


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

Paul Sokolovsky
 

Hello Michael,

On Mon, 08 Jan 2018 18:35:48 +0000
Michael Hope <michaelh@juju.nz> wrote:

[]

2. If I have a physical device, can I emulate a networking
connection using UART in the same fashion?
Yip, this works well. One of the first things I did when I picked up
Zephyr was configure SLIP and ping the board :)
Perhaps, you should contribute a sample application to samples/ for
that ;-).


-- Michael


--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


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

Juliano S Assine
 



2018-01-08 16:35 GMT-02:00 Michael Hope <michaelh@...>:
Hi Juilano.  Replies inline...

On Mon, 8 Jan 2018 at 13:37 Juliano Siloto Assine <jsiloto@...> wrote:
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?

Currently, no.  You can only run one instance of the SLIP interface partly as it depends on the single-instance uart_pipe code.


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?

Yip, this works well.  One of the first things I did when I picked up Zephyr was configure SLIP and ping the board :)

Any suggestions as to how?
If I use uart0 as uart-pipe I can ping a qemu instance but not my physical board.

On qemu I am running with the flag -serial unix:/tmp/slip.sock and using net/tools scripts -serial unix:/tmp/slip.sock
On my board (nrf52_pca10040) I am trying to use tunslip6 directly like:
> sudo ./tunslip6 -B 115200 -s /dev/ttyUSB0 -T -v2 2001:db8::1/64 &
 

-- Michael


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

Michael Hope
 

Hi Juilano.  Replies inline...

On Mon, 8 Jan 2018 at 13:37 Juliano Siloto Assine <jsiloto@...> wrote:
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?

Currently, no.  You can only run one instance of the SLIP interface partly as it depends on the single-instance uart_pipe code.


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?

Yip, this works well.  One of the first things I did when I picked up Zephyr was configure SLIP and ping the board :)

-- Michael


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

Brett Preston
 

Members of the Zephyr Community,

The CFP deadline for Embedded Linux Conference / OpenIoT Summit was extended to tomorrow - Tuesday, January 9.


Thank you,


Brett

On Wed, Jan 3, 2018 at 9:50 AM, Kumar Gala <kumar.gala@...> wrote:
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,


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




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

Google Talk: bpreston@...
Skype: bprestoncf


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,

2241 - 2260 of 2705