Re: What are the best config settings to reduce ram usage, so that an app runs in 16 kb with least impact on functionality?

2017-06-18 Thread will sanfilippo
tension feature enabled, would mbuf > block size of 100 still work? Could a PDU occupy more than one mbuf (e.g. > two consecutive blocks)? > > Best, > > Khaled > > On Fri, Jun 16, 2017 at 9:08 PM, will sanfilippo wrote: > >> Alfred: >> >> Another th

Re: What are the best config settings to reduce ram usage, so that an app runs in 16 kb with least impact on functionality?

2017-06-16 Thread will sanfilippo
Alfred: Another thing with the nimble stack. The mbuf block size of 292, which Chris shows reduced to 200, is much larger than it needs to be. I am not sure what the smallest size actually is, but you can set it to 100 bytes and it should work. This can get you more buffers and/or reduce your m

Re: Conditional compilation based on BSP name

2017-06-14 Thread will sanfilippo
Ugo: Just as a preface, BSPs are intended to be examples of how one could create a BSP for their own system. It was assumed/expected that folks would take these BSPs and modify them for their own use. Well, at least I thought so anyway. Another decision we made in the BSP and one that we have c

Re: Conditional compilation based on BSP name

2017-06-14 Thread will sanfilippo
Ugo: I believe that there is -DBSP_NAME passed to everything. Here is an excerpt debug output from a build. You can see BSP_NAME=nrf52dk 2017/06/14 09:07:57.635 [DEBUG] arm-none-eabi-gcc -DADC_ENABLED=0 -DAPP_NAME=bletest -DAPP_bletest -DARCH_NAME=cortex_m4 -DARCH_cortex_m4 -DBLETEST -DBLETEST

Re: [RFC] experimental features and APIs

2017-06-13 Thread will sanfilippo
Not sure that I sent a reply about this but I meant to :-) Seems fine to me. > On Jun 12, 2017, at 4:58 AM, Szymon Janc wrote: > > Hi, > > I was wondering on how we could add 'experimental' features or APIs to Mynewt. > My rationale is that sometimes we may want to include feature in > master

Re: MYNEWT-490

2017-06-12 Thread will sanfilippo
Seems fine to me. > On Jun 12, 2017, at 4:01 PM, marko kiiskila wrote: > > Hi, > > part of the ticket includes renaming os_tick_idle() and os_tick_init() -> > hal_os_tick_idle() and > hal_os_tick_init(), respectively. > > This is a name change in the API, but this contract is between kernel/o

Re: BLE connection timeout

2017-06-09 Thread will sanfilippo
ones, including a > Nexus 6P) > > Jan > > Am 09.06.2017 um 17:44 schrieb will sanfilippo: >> Jan: >> >> I am not 100% sure but we have seen issues with certain phones due to how >> the nimble stack controller starts some LL control procedures. This has been &g

Re: BLE connection timeout

2017-06-09 Thread will sanfilippo
Jan: I am not 100% sure but we have seen issues with certain phones due to how the nimble stack controller starts some LL control procedures. This has been addressed in a development branch but I do not think it has been merged into the master branch yet (it will in the upcoming release). I co

Re: FCC Pre-scan

2017-06-08 Thread will sanfilippo
anisms that > help people with the FCC test? > > Jitesh > > On Thu, Jun 8, 2017 at 4:40 PM, will sanfilippo wrote: > >> Question 2: Unless it got added recently and I did not catch it, currently >> the nimble stack does not provide support for the FCC test. >

Re: FCC Pre-scan

2017-06-08 Thread will sanfilippo
Question 2: Unless it got added recently and I did not catch it, currently the nimble stack does not provide support for the FCC test. Question 1: I guess it depends what you mean by take over control. The call to ble_phy_disable() will certainly halt anything going on in the radio. However, th

Re: #if directives and the MYNEWT_VAL(..) macro

2017-06-06 Thread will sanfilippo
This is not a bug although some folks might want these things turned on by default. It might also be a bit confusing and hard to find in code or documentation, but the default for alot of these peripheral config variables are by default 0. You need to turn them on if you want to use a certain p

Re: nrf52 uicr

2017-05-30 Thread will sanfilippo
Pierre: Accessing the UICR is pretty simple. There is a structure defined in nrf52.h that can be used to read the customer variables. You just do this: NRF_UICR->CUSTOMER[0] Note that Aditi has pointed out that we decided to use some of the customer registers by default. You can change this if

Re: [VOTE] Graduation of podling Apache Mynewt to Top Level Project

2017-05-26 Thread will sanfilippo
t; of the Apache Mynewt Project, and to have primary responsibility > for management of the projects within the scope of > responsibility of the Apache Mynewt Project; and be it further > > RESOLVED, that the persons listed immediately below be and > hereby are appointed to serve a

Re: Tx Power Adjustment on the nRF52dk

2017-05-17 Thread will sanfilippo
he tip... I see the code you're talking >> about. I'll try this out. >> >> Thanks! >> >> On Mon, May 15, 2017 at 4:47 PM, will sanfilippo wrote: >> >>> This is definitely a bit confusing in the current code base. To set >>> advertising

Re: Tx Power Adjustment on the nRF52dk

2017-05-15 Thread will sanfilippo
This is definitely a bit confusing in the current code base. To set advertising power for a particular advertising state machine you need to use the multi-advertising code. If you see the code in this function: ble_ll_adv_set_adv_params() you will see that the advsm->adv_txpwr element gets set

Re: Writing PWM api, and nrf51 implementation

2017-05-14 Thread will sanfilippo
ther. > > I wonder how decent a soft pwm with just callouts could be. > > On Sun, May 14, 2017 at 10:25 AM, will sanfilippo wrote: > >> Not quite sure myself off the top of my head. I am not the best newt tool >> person. I can try to take a look at it later today i

Re: Writing PWM api, and nrf51 implementation

2017-05-14 Thread will sanfilippo
_pwm/src/lf_pwm.c:129: > undefined reference to `low_power_pwm_duty_set' > /Users/jacobrosenthal/Downloads/chippd3/repos/mynewt-nordic/hw/drivers/lf_pwm/src/lf_pwm.c:154: > undefined reference to `low_power_pwm_start' > /Users/jacobrosenthal/Downloads/chippd3/bin/targets/spli

Re: Writing PWM api, and nrf51 implementation

2017-05-14 Thread will sanfilippo
Jacob: Does the nrf51 have a PWM peripheral? I do not think it does. I looked at the chip spec and nrf51.h and there is no PWM peripheral like the nrf52 in either. > On May 13, 2017, at 7:46 PM, Jacob Rosenthal wrote: > > Im attempting to write a pwm api and nrf51 driver. Im mostly just stubb

Re: OS starting before main

2017-05-12 Thread will sanfilippo
//... >> } >>} > > It is likely that being careful about the order of initialised tasks is the > answer and I just preferred it when I had control over when the OS started! > > Also thanks for the a

Re: OS starting before main

2017-05-11 Thread will sanfilippo
Julian: Given your example I am a bit confused about some things. I think part of my confusion is that you intialized the idle task to priority 1 and the other task to priority 2. Priority 1 is higher priority than 2. I guess idle task to me is something special but I realize this could just be

Re: Question Regarding Multiple Advertising Instances (BLE_MULTI_ADV_SUPPORT)

2017-05-10 Thread will sanfilippo
ode will be welcomed as well. > > -Gurpreet > > > > On Wed, May 10, 2017 at 4:05 PM, will sanfilippo wrote: > >> Hello Gurpreet: >> >> So a few things here: >> >> The multi-advertising support that was added was “vendor specific”, >> mea

Re: Question Regarding Multiple Advertising Instances (BLE_MULTI_ADV_SUPPORT)

2017-05-10 Thread will sanfilippo
Hello Gurpreet: So a few things here: The multi-advertising support that was added was “vendor specific”, meaning that it is (or shall I say was) not in the BLE specification at the time the code was written. Bluetooth 5 adds support for multi-advertising and that standard support will be adde

Re: Problems with erasing flash on nordic devices

2017-05-05 Thread will sanfilippo
then have to deal with reconnecting after any disconnects. > On May 5, 2017, at 5:34 PM, Jacob Rosenthal wrote: > > Im not erasing. It is auto erasing on upload. So I cant upload. > > On Fri, May 5, 2017 at 5:32 PM, will sanfilippo wrote: > >> BTW: there is an image lis

Re: Problems with erasing flash on nordic devices

2017-05-05 Thread will sanfilippo
51 device over ble. *When I > reconnect, it erases again, and again drops the connection. > > So perhaps theres a good way to determine if an image is present and if an > erase is necessary? > > > > On Fri, May 5, 2017 at 5:02 PM, will sanfilippo wrote: > >> A

Re: Problems with erasing flash on nordic devices

2017-05-05 Thread will sanfilippo
What is the simple solution to which you are referring? Not erasing if you do not need to? Or what was mentioned in the thread regarding discarding a PDU if the time it arrived does not seem to make sense? As I am sure you realize, neither of those will guarantee a fix. Anyway, there have been

Re: newtmgr image upload nrf51dk disconnects with reason=8

2017-04-22 Thread will sanfilippo
Again, sorry if I missed something here or it has been discussed. This would only work with a device that would accept this and not all do but there is the connection parameters request procedure that a slave can use to change the supervision timeout being used. The master can also use this proc

Re: newtmgr image upload nrf51dk disconnects with reason=8

2017-04-20 Thread will sanfilippo
e disable interrupts? > I.e. would running newtmgr on a separate thread help? > >> On Apr 20, 2017, at 4:14 PM, will sanfilippo wrote: >> >> Hello: >> >> They are both related (in a way). When you increase the slave latency the >> supervision time

Re: newtmgr image upload nrf51dk disconnects with reason=8

2017-04-20 Thread will sanfilippo
Hello: They are both related (in a way). When you increase the slave latency the supervision timeout sort of increases along with it (in a manner so speaking). The minimum supervision timeout is this: (1 + connSlaveLatency) * connInterval * 2. So if you increase the slave latency you need to i

Re: NRF_RADIO->TXEN on nRF51 is never changed

2017-04-19 Thread will sanfilippo
tion is that some delay required between "disabled" event and > "txen" task to allow for LL to prepare scan response. At the moment I have no > idea how to implement this:( > Good workaround is to use GCC optimization. -Ofast doesn't change anything. > But -Os w

Re: Help with debugging a crash on a BLE gateway application

2017-04-19 Thread will sanfilippo
sn't seem like the MPU is turned on for this platform. Is that > correct? > > Another note to add (kinda important) is that I'm running myNewt version > 0.9.9. I haven't upgraded (yet!). > > Thanks, > Pritish > > > > On Wed, Apr 19, 2017 at 7:59 AM,

Re: Help with debugging a crash on a BLE gateway application

2017-04-19 Thread will sanfilippo
We try to keep the stack sizes really small in order to conserve memory for constrained platforms. The controller stack is pretty small and it gets pretty close to the bottom. Furthermore, it is a bit of difficult task to test every combination of system configuration variable so I would not be

Re: newtmgr image upload nrf51dk disconnects with reason=8

2017-04-17 Thread will sanfilippo
I wonder if this issue is related to other controllers that we have had issues with. Try disabling Data Length Extension. Set BLE_LL_CFG_FEAT_DATA_LEN_EXT in net/nimble/controller/syscfg.yml to 0 Let us know if that changes anything. > On Apr 16, 2017, at 6:13 PM, Jacob Rosenthal wrote: > > On

Re: MyNewt and Ignite demo at ApacheCon

2017-04-14 Thread will sanfilippo
Hello Dennis: I have not tried this myself but a colleague pointed me at this: https://www.allaboutcircuits.com/technical-articles/getting-started-with-openocd-using-ft2232h-adapter-for-swd-debugging/ So you could use mynewt and openocd to download something to the adafruit feather board withou

Re: [DISCUSS] Release policy update for handling feature branches

2017-04-14 Thread will sanfilippo
I think you are correct about this. Someone needs to determine which pull requests against master need to get merged into the various branches. > On Apr 14, 2017, at 11:54 AM, aditi hilbert wrote: > > Hi all, > > It’s good to see our Release policy going into effect post 1.0 release. The > de

Re: NRF_RADIO->TXEN on nRF51 is never changed

2017-04-11 Thread will sanfilippo
d SCons is > more comfortable than Go. Sorry. > > Thank you for your help. > > BR, > Andrey > > > On 11.04.2017 17:46, will sanfilippo wrote: >> Andrey: >> >> The PHY code does not write directly to TASKS_TXEN; it uses shortcuts to >> automatic

Re: NRF_RADIO->TXEN on nRF51 is never changed

2017-04-11 Thread will sanfilippo
Andrey: The PHY code does not write directly to TASKS_TXEN; it uses shortcuts to automatically start transmissions. Can you show me the target you are using? Just paste the output of: newt target show We test regularly with the nrf51 but that does not mean that a particular commit in time ma

Re: Bluetooth 5 support - configurability

2017-04-10 Thread will sanfilippo
11:50 AM, Łukasz Rymanowski > wrote: > > Hi, > > On 10 April 2017 at 18:15, will sanfilippo wrote: > >> I think #3 is fine as well. If, for some reason, folks do not want to >> claim 5.0 support they can always use release 1.0.0 of Mynewt. >> >> &g

Re: DC/DC regulator enable for nrf52. Where should it go?

2017-04-10 Thread will sanfilippo
r actual system. > > Sterling > >> On Apr 10, 2017, at 6:53 PM, will sanfilippo wrote: >> >> Thinking about this more… (which is almost never a good thing with me): >> >> Cortex-M MCU manufacturers produce a file called system_.c (where xxx is >> t

Re: DC/DC regulator enable for nrf52. Where should it go?

2017-04-10 Thread will sanfilippo
ible, so probably > hal_bsp_init(). > > - It’s a bid odd that hal_bsp_init() is the same for bootloader and running > image, we should probably have an option to make this different. I’d lean to > having more functionality in the image, because it’s upgradable. > > Sterling > >

Re: Bluetooth 5 support - configurability

2017-04-10 Thread will sanfilippo
I think #3 is fine as well. If, for some reason, folks do not want to claim 5.0 support they can always use release 1.0.0 of Mynewt. > On Apr 10, 2017, at 6:16 AM, Szymon Janc wrote: > > Hello Community, > > We are currently upstreaming Bluetooth 5 functionality into Apache Mynewt. > Sine al

Re: Use of os_error_t and OS_OK

2017-04-10 Thread will sanfilippo
value) respectively, and can be > safely returned as numbers not defines. > > * For other errors, the SYS_* equivalents should be returned. > > Thoughts? > > Sterling > > On 10 Apr 2017, at 16:38, will sanfilippo wrote: > >> Not sure if anyone answered this.

Re: I2C not working on nrf52xxx's rb-nano2

2017-04-10 Thread will sanfilippo
Just an FYI: I was playing around with some code for something I was working on and I was able to disable UART0 although I did not try to re-purpose the pins. The UART was certainly not enabled did not attempt to grab the gpio. This was using the nrf52dk bsp though. Anyway, I think it worth a b

Re: Use of os_error_t and OS_OK

2017-04-10 Thread will sanfilippo
Not sure if anyone answered this. This is just my opinion of course: * The OS functions should use return type os_error_t. * Those functions should return OS_OK or some other OS error. * Checks against functions with type os_error_t should be against OS_OK and not 0. The bubbling up of errors, w

Re: I2C not working on nrf52xxx's rb-nano2

2017-04-09 Thread will sanfilippo
[1] > https://github.com/RedBearLab/nRF51822-Arduino/issues/38#issuecomment-186752735 > [2] > https://github.com/limal/incubator-mynewt-core/commit/3510504c5cccde7de54086672cde15f945b79a3e > > On Sun, Apr 9, 2017 at 5:30 PM, will sanfilippo wrote: > >> Just an FYI: >> >> The timeout v

Re: I2C not working on nrf52xxx's rb-nano2

2017-04-09 Thread will sanfilippo
Just an FYI: The timeout value is in units of “os ticks”. If you want a timeout of 1 second you would use OS_TICKS_PER_SEC. A timeout of 5 seconds would be 5 * OS_TICKS_PER_SEC and a timeout of 100 msecs would be OS_TICKS_PER_SEC / 10. For example: hal_i2c_master_write(0, &pwrite, OS_TICKS_PER_

DC/DC regulator enable for nrf52. Where should it go?

2017-04-07 Thread will sanfilippo
Hello: I want to add some code that enables the DC/DC regulator for the nordic chips. Enabling this regulator reduces power consumption (considerably). For example, using the LDO when running from flash (cache enabled) is typically 7.4mA; using the DC/DC regulator it goes to 3.7 mA. It would b

Re: Problem loading images to nRF52DK board

2017-04-04 Thread will sanfilippo
BTW, I am curious: what modifications are you going to make to the controller? If you do not want or cannot say, no problem. Just interested to hear different use cases/modifications that folks want to do. Oh, and my post was just to get you going quickly; I am sure we can debug your issue. >

Re: Problem loading images to nRF52DK board

2017-04-04 Thread will sanfilippo
BTW, I am curious: what modifications are you going to make to the controller? If you do not want or cannot say, no problem. Just interested to hear different use cases/modifications that folks want to do. Oh, and my post was just to get you going quickly; I am sure we can debug your issue. >

Re: Problem loading images to nRF52DK board

2017-04-04 Thread will sanfilippo
Hello Greg: Not sure why you are having problems using the newt tool to download, but JLinkExe can load binary files. There is a command called “loadbin” that will allow you to load a binary file at a given location. Load the bootloader at 0 and the img file that you created at address 0x8000.

Re: Adding platform specific API to get public and/or random static address

2017-04-04 Thread will sanfilippo
Marcel: Thanks for the clarification on the public address and that for BLE the two LSbits of the MSbyte do not apply. I do understand the trickiness of changing the public address but it is certainly helpful for debugging/testing. > On Apr 3, 2017, at 9:38 AM, Marcel Holtmann wrote: > > Hi

Re: Using cputime and timeofday for SensorAPI samples

2017-04-03 Thread will sanfilippo
Just a quick comment: Not sure why you wanted to cut is so close regarding the 2146 seconds; you could make this 2000 seconds and it will have no effect on anything. Will > On Mar 31, 2017, at 6:30 PM, Vipul Rahane wrote: > > Hello, > > Since a few days I have been working on adding cputime

Re: Adding platform specific API to get public and/or random static address

2017-04-03 Thread will sanfilippo
Setting the public address from the host came from two things: bletiny and also my recollection of one of the vendor specific HCI commands that was discussed at Linaro Connect in Budapest this past March. I am trying to find the document we discussed in Budapest to confirm that this was one of t

Re: Adding platform specific API to get public and/or random static address

2017-04-01 Thread will sanfilippo
Comments inline: > On Apr 1, 2017, at 12:53 AM, Marcel Holtmann wrote: > > Hi Will, > >> There has been some discussion of this already on the list but nothing has >> been done yet so I wanted to resurrect the conversation with some proposals. >> >> What we are trying to do here is the follow

Re: nrf52dk hal_bsp_init() and sensor device creation

2017-03-31 Thread will sanfilippo
I presume you mean “was getting too crowded” :-) Yeah, I copied that bsp to create this other bsp and noticed alot of sensor dev creates in there. Not a big deal but I think this will make the code a bit less crowded. +1 > On Mar 31, 2017, at 5:30 PM, Vipul Rahane wrote: > > Hello, > > I a

Re: Adding platform specific API to get public and/or random static address

2017-03-31 Thread will sanfilippo
. Thanks for clarifying that! (and reading that long email) Will > On Mar 31, 2017, at 4:28 PM, Christopher Collins wrote: > > On Fri, Mar 31, 2017 at 03:49:05PM -0700, will sanfilippo wrote: >> Hello: >> >> There has been some discussion of this already on the list bu

Adding platform specific API to get public and/or random static address

2017-03-31 Thread will sanfilippo
Hello: There has been some discussion of this already on the list but nothing has been done yet so I wanted to resurrect the conversation with some proposals. What we are trying to do here is the following: 1) Have the controller get a public device address without it being hardcoded. 2) Have th

Commit of low power timer support (for nordic platforms)

2017-03-30 Thread will sanfilippo
Hello: Low power timer support for the nordic platforms (both nrf51 and nrf52) was just committed to develop. Here is a basic explanation of the changes and how to turn it on/off. Note that while a reasonable amount of testing was done on this code a bit more needs to be done to verify that the

Re: Query on application: Bare metal or using Mynewt RTOS

2017-03-30 Thread will sanfilippo
Amit: I cannot be sure but I think I understand the problem you are having. The nordic delay routines do not use the OS and thus you are sitting in that loop constantly. The watchdog is enabled and you are probably watch dogging since the task that is supposed to tickle the watchdog is not able

Re: Query on application: Bare metal or using Mynewt RTOS

2017-03-29 Thread will sanfilippo
Yes, blinky uses the OS and there is a task that is running so it is not a bare metal application. The OS creates a main task and that is where things run by default. This is the short answer btw; we can go into more dertails if you like. > On Mar 29, 2017, at 2:31 PM, amit mehta wrote: > > B

Re: Newtmgr over BLE not Working

2017-03-26 Thread will sanfilippo
Not sure what is going on there, but the command that you show is a BR/EDR command and not a LE command, which is why you get a unknownn HCI command. The controller does not support that command. > On Mar 26, 2017, at 12:45 AM, Lm Chew wrote: > > Hi Vipul, > > Thanks, for the suggestion. >

Re: Initial commit of the "bsn" branch (body sensor network) branch

2017-03-21 Thread will sanfilippo
were the application > requirements you were engineering for? > > Sterling > > On 21 Mar 2017, at 16:21, will sanfilippo wrote: > >> Hello: >> >> Disclaimers: >> 1) Long email follows. >> 2) This is a preliminary version of this code. There are hard-coded t

Initial commit of the "bsn" branch (body sensor network) branch

2017-03-21 Thread will sanfilippo
Hello: Disclaimers: 1) Long email follows. 2) This is a preliminary version of this code. There are hard-coded things and things I had to hack, mainly because of my ignorance of some areas in the code. I pushed it so some folks (if they want) can take a look and mess around before things get cl

Re: Debugging blecent application on nrf52dk

2017-03-17 Thread will sanfilippo
on 5.1.9 - Data Length Update Procedure. > I agree with your conclusion that it sounds like the controller must accept > LL_UNKNOWN_RSP but must not require it. > Thanks again this was really very helpful. > -Pritish > > On Fri, Mar 17, 2017 at 11:05 AM, will sanfilippo wrote: &

Re: Debugging blecent application on nrf52dk

2017-03-17 Thread will sanfilippo
extension with the bleprph but that is failing? > > Thanks, > Pritish > > On Fri, Mar 17, 2017 at 10:11 AM, will sanfilippo wrote: > >> BTW: Lukasz did have a really good suggestion for future debugging (why >> didnt I think of that?) :-) >> >> A sniffer with wi

Re: Debugging blecent application on nrf52dk

2017-03-17 Thread will sanfilippo
> > } > >}, > >c_evq = 0x2000313c, > >c_ticks = 0x0, > >c_next = { > > tqe_next = 0x0, > > tqe_prev = 0x0 > >} > > }, > > enc_data = { > >enc_state = 0x1, > >tx_encrypted = 0x0,

Re: Debugging blecent application on nrf52dk

2017-03-16 Thread will sanfilippo
anks, > Pritish > > On Thu, Mar 16, 2017 at 2:48 PM, will sanfilippo wrote: > >> I do not think there is a simple way to debug this. As Chris points out, >> the first problem is a LL control procedure timeout. I think I can help >> figure some things out there. There is a

Re: Debugging blecent application on nrf52dk

2017-03-16 Thread will sanfilippo
I do not think there is a simple way to debug this. As Chris points out, the first problem is a LL control procedure timeout. I think I can help figure some things out there. There is a function called ble_ll_ctrl_proc_rsp_timer_cb. If you set a breakpoint at this function in the debugger when

Re: MyNewt: NimBLE: Does BD_ADDR have to be unique?

2017-03-13 Thread will sanfilippo
ish > > On Mon, Mar 13, 2017 at 3:07 PM, amit mehta wrote: > >> On Mon, Mar 13, 2017 at 10:24 PM, will sanfilippo >> wrote: >>> amit: >>> >>> A couple of things: >>> >>> 1) For the bsp hw id call for the nrf52, there are actually

Re: MyNewt: NimBLE: Does BD_ADDR have to be unique?

2017-03-13 Thread will sanfilippo
Amit: I do not have a really strong opinion here, so would be interested to hear what others think. I am referring to the API. Certainly, the “get_devaddr” API is appropriate for the nrf chips but not sure if we would want to have multiple API in case we want to port this to other chips and als

Re: MyNewt: NimBLE: Does BD_ADDR have to be unique?

2017-03-13 Thread will sanfilippo
thers think? > On Mar 13, 2017, at 1:32 PM, amit mehta wrote: > > On Mon, Mar 13, 2017 at 6:06 PM, will sanfilippo wrote: >> amit: >> >> There is already a function to return the device id. It is named >> hal_bsp_hw_id() and exists in hw/mcu/nordic/nrf52xxx/src

Re: MyNewt: NimBLE: Does BD_ADDR have to be unique?

2017-03-13 Thread will sanfilippo
amit: There is already a function to return the device id. It is named hal_bsp_hw_id() and exists in hw/mcu/nordic/nrf52xxx/src/nrf52_hw_id. Many chips come with some form of unique id which was why this was placed in hw/mcu. I do not think I would put the API for ble device address in the same

Re: MyNewt: NimBLE: Does BD_ADDR have to be unique?

2017-03-09 Thread will sanfilippo
I do not think I am adding much here but the BLE stack definitely “punted” on the method for providing the public device address. It is up to the product developer to determine how to get the public address from storage on the device. For the nordic chips there are non-volatille registers that

Re: How to verify porting MyNewt to another board was success?

2017-03-02 Thread will sanfilippo
Well, there are a number of ways to verify that the port is successful. If you get blinky up and running you can be pretty assured that the gpio and core os are working on your board. There are other apps that test other functionality so depending on what you want to verify, you would choose the

Re: Trying to get blinky loaded on a Nano2

2017-02-22 Thread will sanfilippo
David: As I suspected, the problem was that the device came write-protected and the normal debug scripts cannot erase the flash when it is write-protected. There might be a better way to do this, but here is what I did: /* Write to the register which enables erase */ (gdb) set {unsigned long}0x

Re: Trying to get blinky loaded on a Nano2

2017-02-22 Thread will sanfilippo
Hello David: We met at the openiot summit in Portland. I decided to go ahead and re-flash the nano2 we have here and I did not have an issue with it. I know; that does not help. :-) I am running what I believe is close to the same openocd version as you are but an earlier version of osx. If yo

Re: Hackillinois this weekend in Urbana IL

2017-02-22 Thread will sanfilippo
Do not know how helpful this will be and it is just my own two cents so take it for what it is worth :-) First, this is more of a favor/ask: if you have folks going through the installation process and the documentation, any feedback you can provide on what was easy/good/hard/bad/confusing woul

Re: Resources Reserved for Mynewt

2017-02-20 Thread will sanfilippo
I dont think a document exists which details all of the used resources. Obviously, it is based on the packages that are used in your application. Some general information: OS uses TIMER1 or RTC1 (for os time) Nimble stack uses TIMER0 for high resolution timer. Nimble stack uses a number of the p

Re: Issues with bleprph and blecent on nRF51822xxaa

2017-02-16 Thread will sanfilippo
Hello there Marcos: Indeed, some of the sample apps probably wont run in 16KB RAM. If a malloc fails it should be pretty easy to debug as I would suspect most mallocs in the code assert() if they cant get the memory. Is there a specific app your want to run? > On Feb 16, 2017, at 8:19 PM, Mar

Re: BLE HCI support on NRF52DK

2017-02-10 Thread will sanfilippo
ing the RESET signal with a GPIO line. > > ALan > > -Original Message- > From: will sanfilippo [mailto:wi...@runtime.io] > Sent: Monday, February 06, 2017 5:55 PM > To: dev@mynewt.incubator.apache.org > Subject: Re: BLE HCI support on NRF52DK > > Ah ok; that is quite interes

Using Bluez on Linux with Mynewt controller and nordic DK boards

2017-02-10 Thread will sanfilippo
Hello: I wanted to share an issue I noticed when I was using linux/bluez and associated tools with the mynewt blehci controller on the nordic dev boards. There is a command called LE Read Buffer Size. This command tells the host the size of the ACL data packets (HC_LE_ACL_Data_Packet_Length). B

[RESULT][VOTE] Release Apache Mynewt 1.0.0-b2-incubating-rc1

2017-02-09 Thread will sanfilippo
Hello all, Voting for Apache Mynewt 1.0.0-b2-incubating-rc1 is now closed. The release has passed this step of the process. The vote breakdown is as follows: +1 Christopher Collins (binding) +1 Sterling Hughes (binding) +1 Jim Jagielski (binding) +1 Szymon Janc +1 Marko Kiiskila (binding) +1 P

Re: sysint() fails

2017-02-08 Thread will sanfilippo
David: It seems like, from this email, that things are now working for you. Are you still going to vote -1 or are you going to change your vote? > On Feb 8, 2017, at 5:33 AM, David G. Simmons wrote: > > >> On Feb 7, 2017, at 2:38 PM, marko kiiskila wrote: >> >> can you get a backtrace of t

Re: [VOTE] Release Apache Mynewt 1.0.0-b2-incubating-rc1

2017-02-07 Thread will sanfilippo
> [X ] +1 Release this package > [ ] 0 I don't feel strongly about it, but don't object > [ ] -1 Do not release this package because… > +1 (binding) > Hello all, > I am pleased to be calling this vote for the source release of Apache > Mynewt 1.0.0, beta 2. > > Apache Mynewt is a community-dri

Re: [DISCUSS] Release Apache Mynewt 1.0.0-b2-incubating-rc1

2017-02-07 Thread will sanfilippo
nd run blinky on both Linux and Mac. > >> On Feb 6, 2017, at 5:35 PM, will sanfilippo wrote: >> >> Hi all, >> >> This thread is for any and all discussion regarding the release of >> Apache Mynewt 1.0.0-b2-incubating-rc1. All feedback is welcome. >> >> Thanks, >> Will >

Re: sysint() fails

2017-02-07 Thread will sanfilippo
Hello David: I did not attempt to re-test all the apps you mentioned below, but bletiny on the nrf52dk is working just fine. Another note: the release is on branch 1_0_0_b2_dev. That is the branch I would use, or check out the tag (mynewt_1_0_0_b2_rc1_tag). Thanks > On Feb 7, 2017, at 8:07 AM

Re: BLE HCI support on NRF52DK

2017-02-06 Thread will sanfilippo
> BR, > Andrzej > > > > On Sat, Feb 4, 2017 at 12:25 AM, will sanfilippo wrote: > >> Hi Andrzej >> >> Thanks for pointing me to Vol 2 Part E, Section 4.4. I was recalling a >> section of the spec that talked about this but could not find it when I

[DISCUSS] Release Apache Mynewt 1.0.0-b2-incubating-rc1

2017-02-06 Thread will sanfilippo
Hi all, This thread is for any and all discussion regarding the release of Apache Mynewt 1.0.0-b2-incubating-rc1. All feedback is welcome. Thanks, Will

[VOTE] Release Apache Mynewt 1.0.0-b2-incubating-rc1

2017-02-06 Thread will sanfilippo
Hello all, I am pleased to be calling this vote for the source release of Apache Mynewt 1.0.0, beta 2. Apache Mynewt is a community-driven, permissively licensed open source initiative for constrained, embedded applications. Mynewt provides a real-time operating system, flash file system, network

Re: BLE HCI support on NRF52DK

2017-02-03 Thread will sanfilippo
PM, Andrzej Kaczmarek > wrote: > > Hi Will, > > On Fri, Feb 3, 2017 at 7:08 PM, will sanfilippo wrote: > >> I might be getting a bit confused here so hopefully I am making some >> sense. I seem to recall some discussion around this in the past but I cant >&g

Re: BLE HCI support on NRF52DK

2017-02-03 Thread will sanfilippo
I might be getting a bit confused here so hopefully I am making some sense. I seem to recall some discussion around this in the past but I cant recall :-) Anyway... It is my understanding that the first thing a controller should do when it powers up is send a NOOP. Looking at the Core V4.2 Spec

Creating branch for 1.0.0 beta2 release

2017-02-01 Thread will sanfilippo
Hello: Just a heads up. I am going to create the 1.0.0 beta 2 release branch.

Re: interrupt latency in mynewt

2017-01-28 Thread will sanfilippo
Jiacheng: How are you measuring the latency? I presume you have a scope on a GPIO input and maybe set a GPIO high when you are inside the ISR and measure the time between them? Or are you measuring the timing using a task? There is certainly some hard limitation on interrupt response time but I

Higher priority interrupts and nimble stack

2017-01-26 Thread will sanfilippo
Jiacheng asked about disabling interrupts for a long time (600-700usecs) and whether it was OK; also that there was a high priority interrupt that can take 600-700 usecs. I (possibly) mistakenly answered; I was only thinking about disabling interrupts at task level and not considering a high pri

Re: [RFC] Using BLE device address in API

2017-01-26 Thread will sanfilippo
I dont know enough about the host to comment on whether we should change this API now or after release. I think adding an address structure is a good idea. A question about one of your open points. The spec has confused me a bit in this regard. Isnt it up to the application to decide whether it

Re: os_time_delay in milliseconds / microseconds

2017-01-26 Thread will sanfilippo
os_cputime_delay_ticks does not put the task to sleep; it was meant for short blocking delays. The nrf_delay_ms() function doesnt put the task to sleep either so I am not sure why you are seeing a difference between the two. > On Jan 26, 2017, at 6:03 AM, then yon wrote: > > Dear Jiacheng, >

Re: Scheduling time of Nimble stack

2017-01-25 Thread will sanfilippo
connections to fail. I will continue to work on this issue. > > Best Regards, > > Jiacheng > > > >> 在 2017年1月25日,14:36,will sanfilippo 写道: >> >> Jiacheng >> >> 1) Sorry about not converting msecs to os time ticks. Good catch! >> 2) I un

Re: Scheduling time of Nimble stack

2017-01-24 Thread will sanfilippo
within 10us. I have an interrupt with most > high priority, it will take 600us~700us, is it safe to block LL task and > other interrupt such as Nimble Radio and OS time tick during this time? > > Best Regards, > > Jiacheng > > > &

Re: NimBLE host advertising data API

2017-01-24 Thread will sanfilippo
+1 Sounds good. > On Jan 24, 2017, at 2:53 PM, Christopher Collins wrote: > > On Tue, Jan 24, 2017 at 12:40:04PM -0800, will sanfilippo wrote: >> I am not sure I have any intelligent comments on this, but that has never >> stopped me from commenting in the past, so… >

Re: NimBLE host advertising data API

2017-01-24 Thread will sanfilippo
I am not sure I have any intelligent comments on this, but that has never stopped me from commenting in the past, so… I think a byte buffer interface is fine as long as you have helper functions to create that buffer. Having folks have to figure out how to create an advertisement without any he

Re: [ATTENTION] incubator-mynewt-core git commit: os; spin up OS before calling. main() gets called in context of main task.

2017-01-24 Thread will sanfilippo
gt;>while (1) { >>>os_eventq_run(os_eventq_dflt_get()); >>>} >>>assert(0); >>> >>>return rc; >>> } >>> >>> So there’s a call to mcu_sim_parse_args() (in case app can execute in >>> simulator),

  1   2   3   4   >