I've just upgraded to 0.9.
bleprph is working fine now.
But I've got a problem compiling bletiny:
targets/tiny
app=@apache-mynewt-core/apps/bletiny
bsp=@apache-mynewt-core/hw/bsp/nrf51dk
build_profile=optimized
cflags=-DDEVICE_NAME=TOTO
Error: /usr/lib/gcc/arm-none-eabi/4.8/../../../arm-none-eabi/bin/ld:
/home/sdalu/MyNewt/my_proj1/bin/tiny/apps/bletiny/bletiny.elf section
`.ARM.exidx' will not fit in region `FLASH'
/usr/lib/gcc/arm-none-eabi/4.8/../../../arm-none-eabi/bin/ld: region
`FLASH' overflowed by -16 bytes
Perhaps that's due to extra debugging before official release?
On 05/31/2016 10:40 PM, chris collins wrote:
Hi Stephane,
I'm trying these apps (mynewt_0_8_0_tag).
When using bleprph, I'm not able to connect to the device
26436:[ts=25815936ssb, mod=4 level=1] host_hci_data_rx(): handle=1 pb=2
len=11 data=0x07 0x00 0x04 0x00 0x10 0x01 0x00 0xff 0xff 0x00 0x28
31559:[ts=30818864ssb, mod=4 level=1] host_hci_data_rx(): handle=1 pb=2
len=11 data=0x07 0x00 0x04 0x00 0x10 0x01 0x00 0xff 0xff 0x00 0x28
36681:[ts=35820816ssb, mod=4 level=1] Disconnection Complete: status=0
handle=1 reason=19
I see James already pointed you to 0.9.0. Here is some additional
information (mostly because I already wrote this mail before I saw
James's!)
Unfortunately, the 0.8.0 version of bleprph is basically broken. The
two relevant bugs are described in the 0.8.0 release notes
(
https://cwiki.apache.org/confluence/display/MYNEWT/RN-0.8.0-incubating#RN-0.8.0-incubating-KnownIssues
).
For BLE, I recommend just avoiding 0.8.0 entirely and using 0.9.0
instead. 0.9.0 is not released yet, but it is currently being voted on.
To use 0.9.0 before it becomes official, you will need do two things:
1. Make the following change to your project.yml file:
FROM:
repository.apache-mynewt-core:
type: github
vers: 0-latest
user: apache
repo: incubator-mynewt-core
TO:
repository.apache-mynewt-core:
type: github
vers: 0.9-latest
user: apache
repo: incubator-mynewt-core
(change the "vers" field).
2. Upgrade your packages with "newt upgrade", e.g.,
[ccollins@iori:~/tmp/myproj]$ newt upgrade
apache-mynewt-core
Would you like to upgrade repository apache-mynewt-core from 0.7.9-none
to 0.0.0-none ? [Yn] y
When using bletiny, I can connect to the device, but can't bond to it, I
end up being disconnect and I'm not able to connect anymore.
26672:[ts=26046848ssb, mod=4 level=1] host_hci_data_rx(): handle=1 pb=2
len=11 data=0x07 0x00 0x06 0x00 0x01 0x04 0x00 0x05 0x10 0x07 0x07
26684:[ts=26058560ssb, mod=4 level=1] rx on unknown L2CAP channel: 6
26930:[ts=26298656ssb, mod=4 level=1] LE Connection Update Complete.
handle=1 itvl=6 latency=0 timeout=2000
26939:connection updated; status=0 handle=1 peer_addr_type=0
peer_addr=0x2a:0xb0:0x76:0x7b:0x97:0x40 conn_itvl=6 conn_latency=0
supervision_timeout=2000
57328:[ts=55983808ssb, mod=4 level=1] Disconnection Complete: status=0
handle=1 reason=19
57335:connection down; status=7 handle=1 peer_addr_type=0
peer_addr=0x2a:0xb0:0x76:0x7b:0x97:0x40 conn_itvl=6 conn_latency=0
supervision_timeout=2000
The issue here is that security is disabled by default in the 0.8.0
version of bletiny. Again, the easiest solution here is to use 0.9.0.
If you would like to stick with 0.8.0, you can enable security by adding
the necessary symbol definitions to your Mynewt target definition.
This can be done via the newt tool or by editing your target's pkg.yml file
directly. To do it with the newt tool:
newt target set <target-name> cflags='-DBLE_LL_CFG_FEAT_LE_ENCRYPTION
-DNIMBLE_OPT_SM=1'
Thanks,
Chris
--
Stephane D'Alu