Re: assert(), faulting traps etc

2015-10-27 Thread will sanfilippo
Regarding assert() and assert_debug(). Where would you put the dir “sys”? Why not put the definitions in an os include dir? Is that due to dependencies you would not want (i.e. os would need console, or something like that)? Or that you dont feel like assert belongs in the os? About the names:

Re: Task Priorities

2015-11-04 Thread will sanfilippo
I dont have an answer but I would like to add something using the BLE stack as an example. The BLE stack wants to create tasks or a task and it wants the highest priority task. How do we let people know that the BLE stack must have the highest priority task? Through documentation? If we let

Re: subsystem configuration ideas

2016-01-04 Thread will sanfilippo
I am fine with the naming and the interface and all that. Not so sure about lua for config though. Seems like a heavyweight thing for config so I am glad you are considering something simpler :-) Will > On Jan 4, 2016, at 10:58 AM, marko kiiskila wrote: > > Hi, > > so we

Re: [VOTE] Release Apache Mynewt 0.9.0-incubating-rc3

2016-06-02 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... Will

Re: Running Newt on nrf51 boards with 0.9.0 and 0-dev

2016-06-03 Thread will sanfilippo
4001e504 2 > w4 4001e50c 1 > sleep 100 > erase > > >> >> >> . >> All the best >> Wayne >> >> On 2 June 2016 at 23:12, will sanfilippo <wi...@runtime.io> wrote: >> >>> Hey Wayne: >>> >>&g

Re: [VOTE] Release Apache Mynewt 0.9.0-incubating-rc2

2016-05-28 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) Will

Re: GDB scripts

2016-06-01 Thread will sanfilippo
I think having a gdbscript or scripts is an excellent idea but I dont think I would put them in libs/util. I dont like saying that without offering an alternative… but I just did :-) > On Jun 1, 2016, at 10:25 AM, Christopher Collins wrote: > > On Wed, Jun 01, 2016 at

Re: Enabling the Nordic HAL gpio external IRQ detection

2016-06-01 Thread will sanfilippo
It is on our radar to port all the current HAL to the nordic chip and this would include generating an interrupt on a gpio level change. Not quite sure when that will occur but it near the top of the list to do. > On Jun 1, 2016, at 1:24 AM, Wayne Keenan wrote: > >

Re: Can't connect while in discovery mode

2016-06-21 Thread will sanfilippo
Hey all: Sorry that I have not followed the entire thread so if I repeat something that has already been discusssed I apologize. I took a look at the controller HCI command processing and there is something that I had forgotten about how it works. There are two “objects” associated with

Re: split image to increase application storage space.

2016-06-21 Thread will sanfilippo
ake it more confusing? > > Code would not be upgraded independently, as the AIDC is hard-linked to > fixed symbol addresses in the AIIC. While it might be possible to create > a new AIDC that used the same symbols from the AIIC, I was not intending > to allow that. > > Paul > >

Re: Can't connect while in discovery mode

2016-06-20 Thread will sanfilippo
And btw, just because the controller is supposed to act this way doesnt mean there isnt a bug where something is going wrong. I will take a look over the code to see if there is a way to orphan command buffers when replying to a command (with command complete or command status). > On Jun 20,

HAL cputime and low power RTC

2016-06-23 Thread will sanfilippo
Hello: I wanted to post a question to the dev list to see if folks had opinions regarding the following topic. As others have stated “this will be a long and dry email” so be forewarned… HAL cputime was developed to provide application developers access to a generic, high resolution timer.

Re: More Serial Issues

2016-06-27 Thread will sanfilippo
David: I am not sure if this is the issue but it could be you are using the nrf52pdk bsp as opposed to the nrf52dk bsp. The PCA version on top of the board will tell you which one you should be using. The pdk is 10036 and the dk is 10040. If you turn the board over you will see that pins

Re: More Serial Issues

2016-06-27 Thread will sanfilippo
By default we do not enable flow control so those lines shouldnt do anything. As Kevin states, you hook up RTS to CTS, CTS to RTS, TXD to RXD and RXD to TXD (if that makes sense). Hopefully the cabling you are using is labeled so it is easy to determine which wires are what (txd from computer

Re: More Serial Issues

2016-06-27 Thread will sanfilippo
gt; wrote: > > >> On Jun 27, 2016, at 3:52 PM, marko kiiskila <ma...@runtime.io> wrote: >> >> >>> On Jun 27, 2016, at 12:19 PM, David G. Simmons <santa...@mac.com> wrote: >>> >>>> >>>> On Jun 27, 2016, at 1:30 PM, will sanfilipp

Re: Address Randomization in net/nimble

2016-02-09 Thread will sanfilippo
Not sure if this was answered, but I do think the simple form of random addresses is either close to being there or not alot of work. Would have to look into this a bit more to be sure. > On Feb 6, 2016, at 1:04 PM, Sterling Hughes wrote: > > Howdy: > > How hard is it

Re: OS Task Statistics

2016-01-28 Thread will sanfilippo
There are some other interesting OS related things we could keep track of. Note that these did not all come from me; others had input. I dont want to take all the credit; nor all the blame, lol. 1) Maximum amount of time interrupts were disabled. 2) Maximum amount of time a task stayed awake

OS time tick initialization

2016-02-02 Thread will sanfilippo
Hello: Porting the OS to the nrf51 has exposed an issue for certain cortex-M MCU’s, namely the lack of SysTick. Furthermore, it may be advantageous from a power perspective to use a different timer for the OS time tick. Thus, the problem is this: how does the developer pick the timer to use

Re: Moving towards a beta release

2016-02-02 Thread will sanfilippo
Some thoughts (belatedly): * I dont think we need coredump in B1. * Do we need a different BLE MCU/transceiver for first release? Not sure if we should spend time on the stack as opposed to diverting it to porting to a different MCU/transceiver. * Do we need separate host/controller for first

Re: OS time tick initialization

2016-02-02 Thread will sanfilippo
n the MCU specific > directories (-DUSE_BSP_TICKER) which would ifdef away the OS ticker and allow > the BSP to override it. > > Sterling. > > >> On Feb 2, 2016, at 11:37 AM, will sanfilippo <wi...@runtime.io> wrote: >> >> Insanity? That

Re: OS time tick initialization

2016-02-03 Thread will sanfilippo
needs an interrupt vector priority > which depends on the priority of the SVC. How should we resolve the > interrupt priorities between the BSP and the OS. > > On 2/2/16, 2:56 PM, "will sanfilippo" <wi...@runtime.io> wrote: > >> IMO, I dont think any

Re: our HAL and the new mbed-hal

2016-02-28 Thread will sanfilippo
Given the current state of the Mynewt hal, I think the question we need to answer is whether or not the mbed hal provides the functionality we think developers will need. Looks like what mbed is doing and mynewt is doing are very similar. Why not just co-opt the mbed HAL entirely? I cant think

Re: our HAL and the new mbed-hal

2016-02-29 Thread will sanfilippo
m repeating myself :-) Will > On Feb 28, 2016, at 9:40 PM, marko kiiskila <ma...@runtime.io> wrote: > > >> On Feb 28, 2016, at 7:06 PM, Sterling Hughes <sterl...@apache.org> wrote: >> On 2/28/16 10:02 PM, will sanfilippo wrote: >>> Given the current state of

Re: Tutorial topics for Apache Mynewt

2016-02-29 Thread will sanfilippo
I think these are a good representative list given the current state of MyNewt. > On Feb 26, 2016, at 5:23 PM, aditi hilbert wrote: > > Hi everyone, > > With the first release of Apache Mynewt poised to be unleashed to the world, > I’d like to brainstorm some tutorial

Re: Question on nlip protocol and log messages

2016-02-26 Thread will sanfilippo
Gordon: I probably should not answer since I have not looked at the logging in detail, but the console itself does not protect against a task getting preempted. Thus, at times, the output to the console gets all jumbled up. Hope I am answering your question :-) > On Feb 26, 2016, at 3:58 PM,

Fwd: hal organization and multiple smaller packages

2016-02-22 Thread will sanfilippo
Sorry all; thought this was addressed to dev > Begin forwarded message: > > From: will sanfilippo <wi...@runtime.io> > Subject: Re: hal organization and multiple smaller packages > Date: February 22, 2016 at 3:42:15 PM PST > To: sterl...@apache.org > > See commen

Re: Bye Bye Eggs :-(

2016-02-24 Thread will sanfilippo
application/project > On Feb 24, 2016, at 1:56 PM, Sterling Hughes wrote: > > > > On 2/24/16 1:06 PM, aditi hilbert wrote: >> Sorry to pipe up late and I know how involved the changes are but I need to >> understand the reasoning better to be able to document properly.

Re: PWM API

2016-03-30 Thread will sanfilippo
I am not a huge fan of the API using clock ticks as opposed to time. I wonder if the API should just be frequency and duty cycle. If the underlying HW cant support it it can return an error. I have not thought this through completely so I am sure there is some reason this is not good :-) I

Re: hal_gpio_toggle() should return changed pin state

2016-04-06 Thread will sanfilippo
Seems fine to me. > On Apr 6, 2016, at 1:45 PM, Vipul Rahane wrote: > > Hello, > > Current definition: void hal_gpio_toggle() doesn’t return anything. > Proposed definition: int hal_gpio_toggle(). I want to do this so that it > returns the pins changed state. I would like

Re: Timestamp for logs

2016-04-08 Thread will sanfilippo
It does seem like all those bits are unnecessary. Either 48 or 64 bits seems plenty. One note: if we want to use the same logging infrastructure for the controller in the ble stack we will need sub-millisecond precision. 1 microsecond units would be preferable; 16 bits for time since last

Re: pull request for ADC and PWM APIs

2016-03-24 Thread will sanfilippo
these > Would be constants and also take no RAM. > * A library would have to store space for all the pointers which is 4 > bytes * number of devices. The sysid model would depend on the size of > the sysid. > Could be as small as 1 byte, so the sysid approach is BETTER for RAM

Re: [1/3] incubator-mynewt-core git commit: Add read supported commands and read local supported features commands

2016-03-23 Thread will sanfilippo
Yes, I did push those changes to develop. Please given them a whirl. Nimble Side Notes: 1) I attempted to create a controller only application. As we expected, there are two functions that are missing (the ones that the controller uses to send the host data and events). A bit unexpected was the

Re: incubator-mynewt-larva git commit: Fix some version discrepencies in pkg.yml files.

2016-03-03 Thread will sanfilippo
+1. I dont really like author tags myself... > On Mar 3, 2016, at 4:18 PM, Sterling Hughes wrote: > > > > On 3/3/16 4:02 PM, Justin Mclean wrote: >> Hi, >> >> Just a minor thing I just noticed and certainly not an issue, but the ASF >> are not big on author tags. >> >>

Some build issues on master and develop

2016-03-06 Thread will sanfilippo
Hello: A few things I have noticed about building various targets… 1) The current state of master will generate an error if your project does not use baselibc. This is an issue with datetime.c that has been addressed in the develop branch but not merged to master. 2) Are all projects expected

Re: Request to have better discipline with commit messages

2016-03-31 Thread will sanfilippo
Hopefully I fixed the author issue; now committing using William San Filippo. Regarding spaces at the end of lines: did not realize this was an issue at all but I am sure I am a repeat offender :-) Easy enough for me to strip trailing spaces when I save files with my editor. Might cause a few

Re: more ADC hal discussion

2016-03-28 Thread will sanfilippo
I will second the motion to abbreviate things more :-) While I do like the simplicity of the mbed HAL I do realize that it does not support everything we want the HAL to do. And unless I am mistaken, it shouldnt be hard to map between the two. So I guess this means a +1 from me. Will > On Mar

FYI: bletiny is over the nrf51 code size limit

2016-03-28 Thread will sanfilippo
Hello: This is just an FYI: the nrf51 bletiny build is over the code size limit, so if you pull develop and build this project it will not link. This will get fixed today (hopefully).

Re: os_eventq_get() + timeout

2016-04-04 Thread will sanfilippo
I would not break BC; I would add a different function. Not sure what I would call it but wouldnt it just have a timeout, in ticks, associated with it? For example: os_eventq_wait(_evq, timeout_in_os_ticks). What is the purpose of the mask btw? Something to do with returning an error if it

Re: os_eventq_get() + timeout

2016-04-04 Thread will sanfilippo
Sounds good to me +1 > On Apr 4, 2016, at 9:16 AM, Sterling Hughes > <sterling.hughes.pub...@gmail.com> wrote: > > > >> On Apr 4, 2016, at 9:13 AM, will sanfilippo <wi...@runtime.io> wrote: >> >> I would not break BC; I would add a diffe

Re: First draft of Coding standards in develop branch

2016-04-26 Thread will sanfilippo
> On Apr 26, 2016, at 8:28 AM, Christopher Collins wrote: > > On Sun, Apr 24, 2016 at 10:08:09AM -0700, Sterling Hughes wrote: >> Hi, >> >> As we start to bring on new contributors, and operate as a project, its >> increasingly important that we document and agree upon

Re: First draft of Coding standards in develop branch

2016-04-25 Thread will sanfilippo
;sterl...@apache.org> wrote: > > > > On 4/25/16 8:43 PM, will sanfilippo wrote: >> Proposed Changes: >> >> * A function prototype in a header file may (or should?) be a single line >> (i.e. type and name can be on same line). >> * Global variables sh

Re: First draft of Coding standards in develop branch

2016-04-26 Thread will sanfilippo
inconsistent because the if and switch have > one style code block and the case, free, and function have another. It is just me personally, but the switch/case above is hard for me to read (because of the {} around the guts of the case). So I would vote -1 for that. > > > > > On 4

Re: [DISCUSS] Release Apache Mynewt 0.9.0-incubating-rc1

2016-05-20 Thread will sanfilippo
Unfortunately we dont really support the native bsp for ble as of yet. I normally compiled it regularly but it was not used for any particular purpose so I had neglected it in this release (my bad). I will make sure it compiles. In the future it would be nice to create a sim project that can

Re: [VOTE] Release Apache Mynewt 0.9.0-incubating-rc1

2016-05-20 Thread will sanfilippo
All: I committed a fix for the native ble build. Basically had to add a bunch of stubs to the phy and also include the xcvr.h header file. If there are any other issues please let me know. Will > On May 19, 2016, at 7:38 AM, Kevin Townsend wrote: > > Hi Chris, > > Sorry

Re: [VOTE] Release Apache Mynewt 0.9.0-incubating-rc1

2016-05-20 Thread will sanfilippo
The vote is open for at least 72 hours and passes if a majority of at least three +1 PPMC votes are cast. [ 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 Will

Re: my newt on STM32091c-eval board

2016-05-19 Thread will sanfilippo
Hello David: I took a peek at the evaluation board you mentioned. We dont have that eval board in house nor do we have that flavor of st chip in house, but getting mynewt up and running on this would certainly be possible. It appears that this is the 256K Flash/32KB RAM version on that eval

Re: my newt on STM32091c-eval board

2016-05-19 Thread will sanfilippo
ely I’m looking to get it running on > a (currently non-existent in the wild, but coming soon) M0-based SoC, so > creating a bsps for that chip will have to be done, but … baby steps! > > Thanks! > > dg > >> On May 19, 2016, at 1:41 PM, will sanfilippo <wi...@runtime.io> wrote

Re: Procedure for changing power level

2016-05-19 Thread will sanfilippo
The API takes a signed int as a parameter as I usually just like using ‘int’ as opposed to ‘int8_t’ in functions. However, the lower-layer phy driver stores the power as a signed, 8-bit integer as that is all that is needed at the lower layer (just as you say Kevin). Certainly we can change

Re: Migrate clock source or PLL setup to the BSP level

2016-05-11 Thread will sanfilippo
Hello Kevin: Well, I just woke up and havent had my coffee yet, so if this response makes no sense you know why :-) I certainly agree that what you have run across here is an issue that we will have to deal with. Certainly the clock source and/or its availability needs to be dictated by the

Re: privacy modes for LE

2016-05-13 Thread will sanfilippo
t looked to me like both zephyr and soft device want to try to keep these > random addresses forever. > > Paul > > On 5/13/16, 2:43 PM, "will sanfilippo" <wi...@runtime.io> wrote: > >> Why exactly do you want to store the random, static address? My &

Nimble controller configuration

2016-05-05 Thread will sanfilippo
Hello: Unless there are any objections I am going to make the following changes to the nimble stack in regard to controller configuration. The main reason for the change is to move the controller configuration options out of the controller and into nimble_opt.h with the rest of the

Re: BLE Tiny Unhandled exception

2016-05-05 Thread will sanfilippo
Hello: Can you show me your targets? newt target show will do this. Also, can you describe the steps you used to build and load the image on the board? There are different ways to do this but this is what I did: newt clean nrf52dk_bletiny newt build nrf52dk_bletiny newt create-image

Re: newtmgr protocol, no sequence number

2016-05-06 Thread will sanfilippo
Sorry for the late response… this looks good to me. > On May 3, 2016, at 2:49 PM, marko kiiskila wrote: > > Hi, > > I was going to add a sequence number to message header > to match responses to requests. It would be better if we > could detect responses to retransmitted

Re: callout and callout_func

2016-05-06 Thread will sanfilippo
My vote would be #2 as well. > On May 6, 2016, at 11:29 AM, marko kiiskila wrote: > > Hi, > >> On May 5, 2016, at 10:47 AM, Sterling Hughes wrote: >> >> Salutations, >> >> As I've been going through the callout implementation, one thing I've >>

Re: BLE Tiny Unhandled exception

2016-05-06 Thread will sanfilippo
ow I'm loading the bootloader and creating the bletiny image as you > suggested. > > Thanks for your time, > > Cody > > On Thu, May 5, 2016 at 4:10 PM, will sanfilippo <wi...@runtime.io> wrote: > >> Hello: >> >> Can you show me your targ

Re: Proposed changes to Nimble host

2016-04-18 Thread will sanfilippo
On Mon, Apr 18, 2016 at 09:43:35AM -0700, Christopher Collins wrote: >> On Mon, Apr 18, 2016 at 09:18:16AM -0700, will sanfilippo wrote: >>> For #2, my only “concerns” (if you could call them such) are: >>> * Using OS_EVENT_TIMER as opposed to some other event. Should all &g

Re: Proposed changes to Nimble host

2016-04-18 Thread will sanfilippo
All sounds excellent! +1 for #1. That only seems like a good thing. For #2, my only “concerns” (if you could call them such) are: * Using OS_EVENT_TIMER as opposed to some other event. Should all OS_EVENT_TIMER events be caused by a timer? Probably no big deal… What events are going to be

Re: BLE_HS_ENOMEM when trying to connect to a second peripheral

2016-07-23 Thread will sanfilippo
Isnt it “NIMBLE_OPT_MAX_CONNECTIONS”. I see you have NIMBLE_OPT_MAX_CONNECTION (not plural). > On Jul 23, 2016, at 4:05 PM, Marco Ferreira wrote: > > My target pkg.yml: > > > > pkg.cflags: > \- "-DNIMBLE_OPT_MAX_CONNECTION=8" > > > > > > Yes, ble_gap_connect()

Re: 3rd party SDKs, and Interrupt vectors on NRF52

2016-07-29 Thread will sanfilippo
CMSIS and most > vendor supplied example code. > > I don't have strong feelings either way myself though and the bootloader > argument is valid if you want to handle systick interrupts in both chunks > of code for example or radio and SPI events in an advanced bootloader. &

Re: 3rd party SDKs, and Interrupt vectors on NRF52

2016-07-27 Thread will sanfilippo
So how does a bootloader that uses interrupts and an application that uses the same interrupt work? If you have interrupt vectors in .text, only one “application” can own that interrupt vector. Of course, the interrupt vector in . text can look up a function pointer to call, but in that case

Re: Assert failed in ble_ll_hci.c:999

2016-07-07 Thread will sanfilippo
There are a few of them actually. Note that we returned an error code when the block being freed was not part of the memory pool or either the block or pool is NULL. There was some debate on whether to return an error in the latter two cases, but not any debate about the former. What does

Re: Assert failed in ble_ll_hci.c:999

2016-07-07 Thread will sanfilippo
controller bug, a > host bug, or the app corrupting os memory in some way? (I've certainly done > my fair share of the latter ;) > > > > On Thu, Jul 7, 2016 at 6:06 PM, will sanfilippo <wi...@runtime.io> wrote: > >> There are a few of them actually. Note that we retu

Re: Read rssi of established connection

2016-07-05 Thread will sanfilippo
A comment regarding RSSI: all frames received within a connection event will have an RSSI measurement. We only count valid CRC frames. The RSSI applies to empty pdu’s as well so the RSSI will get updated as long as the connection is valid. We also dont average the RSSI in any way; the last data

Re: Things I'd like to see

2016-07-11 Thread will sanfilippo
I have mixed feelings about comments. In my view, it is OK to not comment the code heavily if there is a document that explains the code. Either is sufficient in my opinion. Of course, keeping to Doxygen style comments for public API is a good idea. Do we run doxygen automatically and can we

OS_TICKS_PER_SEC

2016-07-01 Thread will sanfilippo
Hello: Recently there has been some discussion amongst some of us regarding the value of OS_TICKS_PER_SEC. There are two things I want to bring up here. The first is that the default is 1000 (or 1024 in some cases). The second is where this is defined. Typically, most RTOS’s really dont need

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: BLE HCI support on NRF52DK

2017-02-03 Thread will sanfilippo
PM, Andrzej Kaczmarek > <andrzej.kaczma...@codecoup.pl> wrote: > > Hi Will, > > On Fri, Feb 3, 2017 at 7:08 PM, will sanfilippo <wi...@runtime.io> wrote: > >> I might be getting a bit confused here so hopefully I am making some >> sense. I seem to recall

[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: 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

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

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

2017-02-07 Thread will sanfilippo
t; > I can build and run blinky on both Linux and Mac. > >> On Feb 6, 2017, at 5:35 PM, will sanfilippo <wi...@runtime.io> 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

Re: Scheduling time of Nimble stack

2017-01-24 Thread will sanfilippo
e simple way. I just want to >> find out a free time slot at high level to access PHY resource such as CPU >> and radio RF exclusively. With your explain, I should interleave my events >> into BLE events at low level in the same schedule queue. >> >> Best Regards,

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
endif >>> >>>sysinit(); >>> >>>while (1) { >>>os_eventq_run(os_eventq_dflt_get()); >>>} >>>assert(0); >>> >>>return rc; >>> } >>> >>> So there’s a call to mcu_sim_pars

Re: Scheduling time of Nimble stack

2017-01-23 Thread will sanfilippo
Jiacheng: First thing with the code excerpt below: TAILQ_FIRST always gives you the head of the queue. To iterate through all the queue elements you would use TAILQ_FOREACH() or you would modify the code to get the next element using TAILQ_NEXT. I would just use TAILQ_FOREACH. There is an

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

Re: Scheduling time of Nimble stack

2017-01-24 Thread will sanfilippo
be blocked only 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: 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:

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

Re: Scheduling time of Nimble stack

2017-01-25 Thread will sanfilippo
-20ms, this > will cause BLE connections to fail. I will continue to work on this issue. > > Best Regards, > > Jiacheng > > > >> 在 2017年1月25日,14:36,will sanfilippo <wi...@runtime.io> 写道: >> >> Jiacheng >> >> 1) Sorry about not

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

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

[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

Re: BLE HCI support on NRF52DK

2017-02-10 Thread will sanfilippo
itialized by driving 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 &g

Re: [RFC] endianness API cleanup

2017-01-23 Thread will sanfilippo
Szymon: Indeed, those endianness macros were put in ble.h because they were non-standard and acted on a buffer as opposed to just swapping bytes. Internally (quite some time ago) we debated using packed structures for PDU protocol elements and we just never ended up deciding on what to do

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,

Re: Bluetooth specification question after seeing Android 7.1.1 disconnect

2017-01-17 Thread will sanfilippo
.pl> wrote: > > Hi Will, > > On Tue, Jan 17, 2017 at 5:48 AM, will sanfilippo <wi...@runtime.io> wrote: > >> Hello: >> >> Was wondering if there were any folks out there that could comment on >> something regarding a disconnect issue with an And

Re: sys/stats and sys/log

2017-01-17 Thread will sanfilippo
I think the stub approach is fine as well. > On Jan 17, 2017, at 1:43 PM, Kevin Townsend wrote: > > I don't have any issues with the stub approach myself, and it's easy to > switch back and forth (no more work than changing syscfg.yml) > > > On 17/01/17 22:07, marko

Re: stopping scan & adv in bleprph example

2017-01-16 Thread will sanfilippo
If by deep sleep you mean “system off” mode requiring some form of wakeup, it is curently not implemented. You would have to hook that in yourself. > On Jan 16, 2017, at 9:22 AM, Christopher Collins wrote: > > Hi Chew, > > On Mon, Jan 16, 2017 at 11:33:23AM +, Lm Chew

Re: stopping scan & adv in bleprph example

2017-01-16 Thread will sanfilippo
s because in the bleprph example I don't see any function > being called to put the MCU to sleep. > > Does mynewt OS work the same way as FreeRTOS? > > Best Regards, > Chew > > > > > > On Tue, Jan 17, 2017 at 1:57am, will sanfilippo > <wi...@runtime

Bluetooth specification question after seeing Android 7.1.1 disconnect

2017-01-16 Thread will sanfilippo
Hello: Was wondering if there were any folks out there that could comment on something regarding a disconnect issue with an Android Phone running 7.1.1 and our bluetooth stack (the controller). What appears to be happening is this: * Nimble wants to do Data Length Extension and enqueues a

Re: MBUF sizing for the bluetooth stack

2017-01-20 Thread will sanfilippo
Simon: I think you are pretty much correct; generally you are better off with smaller size mbufs. However, there are cases where larger mbufs are better (for example, a very large portion of your data packets are large). > On Jan 19, 2017, at 11:57 PM, Simon Ratner wrote: > >

Re: [RFC] Reducing size of BLE Security Manager

2017-01-20 Thread will sanfilippo
I have mixed feelings about packed structures. For processors that cannot handle unaligned accesses I have always found that they increased code size. Every access of an element in that structure needs code to determine the alignment of that element. Sure, they save RAM, so if that is what you

Re: MBUF sizing for the bluetooth stack

2017-01-19 Thread will sanfilippo
> > On Wed, Jan 11, 2017 at 4:57 PM, will sanfilippo <wi...@runtime.io> wrote: > >> Yes; 76 or 80. Note that I have not actually tested with 80 byte mbuf >> blocks. That is the theory though :-) >> >>> On Jan 11, 2017, at 4:31 PM, Simon Ratner <

Re: Packet length checks

2016-08-24 Thread will sanfilippo
Not sure if I am answering your question, and maybe you still consider this a security hole, but the lengths are checked in different places depending on the packet being received. For advertising channel packets, the lower-layer routines (ones that get called before the packet is handed to the

Re: nmgr, shell vs ble host

2016-08-31 Thread will sanfilippo
I am all for packages/libraries to have the ability to run from a single task and not have to create their own. Of course, we still must allow packages to create their own tasks and we need to make sure that these tasks run at a given priority. From what you are saying, that will still be

Re: hal watchdog

2016-08-30 Thread will sanfilippo
Aug 29, 2016, at 4:53 PM, will sanfilippo <wi...@runtime.io> wrote: >> >> I have some questions: >> >> 1) What happens if the internal watchdog does not allow for a long timeout? > > I was thinking of just returning an error from init in that case, but maybe we >

Re: Removing os_error_t

2016-09-12 Thread will sanfilippo
Fine with me, but I also do like using BOOLEAN types as well and have functions return either TRUE or FALSE. I think it makes the code easier to read… so I hope we can still use TRUE or FALSE for some functions. > On Sep 11, 2016, at 11:32 AM, Christopher Collins wrote: >

HAL Timer API

2016-09-08 Thread will sanfilippo
Hello: We are working on a HAL API for timer peripherals. This HAL will be used to provide high resolution timers and not an OS based timer; that already exists. This HAL provides the ability to receive a callback when a timer expires and also to do short, blocking delays. Timer expiration can

  1   2   3   >