Re: How to determine the length of received data in a GATT callback

2016-05-28 Thread James Howarth
Ahh, thanks Chris. Much appreciated. On Sat, May 28, 2016 at 3:53 PM, Christopher Collins wrote: > Hi James, > > On Sat, May 28, 2016 at 12:53:14PM -0700, James Howarth wrote: > > Hi, > > > > Looking at the peripheral callback gatt_svr_chr_access_gatt, is there a > way > >

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

2016-05-28 Thread David Moshal
still not there, but one step further: ../newt target show targets/my_blinky_sim app=apps/blinky bsp=@apache-mynewt-core/hw/bsp/native build_profile=debug ../newt run my_blinky_sim No download script for BSP hw/bsp/native Debugging

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

2016-05-28 Thread Christopher Collins
Hi David, On Sat, May 28, 2016 at 06:05:10PM -0700, David Moshal wrote: > how do I find the name of the target? newt target show e.g., [ccollins@iori:~/tmp/newttest]$ newt target show targets/blink_nordic app=apps/blinky bsp=@apache-mynewt-core/hw/bsp/nrf52pdk

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

2016-05-28 Thread Sterling Hughes
Newt target show. In your case it's my_blinky_sim. I can tell because it's in the path to the elf file-- every target's build is put in a separate directory. Sterling > On May 28, 2016, at 6:05 PM, David Moshal wrote: > > how do I find the name of the target? > Dave >

Re: Javascript Support (was Re: [SUMMARY][DISCUSS] A users@ mailing list for Apache Mynewt)

2016-05-28 Thread Sterling Hughes
Hi David, You look at Espruino’s compiler, and it was clearly written in a swashbuckling style: Thanks for the links. At this point though my C knowledge isn't sufficient to comment either way. However, I will share that I have a class of 3-6 graders (22 kids aged 8-11 years), who are all

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

2016-05-28 Thread David Moshal
agreed David On Sat, May 28, 2016 at 3:54 PM, Sterling Hughes wrote: > I agree - it should just default to 0 imo. When I run on real targets I > usually just provide 0.0.0. > > Failing a default, it should work consistently and display an error when you >

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

2016-05-28 Thread David Moshal
``` ⇒ ../newt run ./bin/my_blinky_sim/apps/blinky/blinky 0 Error: Invalid target name: ./bin/my_blinky_sim/apps/blinky/blinky ``` Undocumented cryptic commands required for 'getting started' project ? Not good, and doesn't inspire newbies to donate their time to the project, just saying. For

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

2016-05-28 Thread Sterling Hughes
I agree - it should just default to 0 imo. When I run on real targets I usually just provide 0.0.0. Failing a default, it should work consistently and display an error when you don't provide a version. Sterling > On May 28, 2016, at 3:48 PM, Christopher Collins

Re: How to determine the length of received data in a GATT callback

2016-05-28 Thread Christopher Collins
Hi James, On Sat, May 28, 2016 at 12:53:14PM -0700, James Howarth wrote: > Hi, > > Looking at the peripheral callback gatt_svr_chr_access_gatt, is there a way > to determine the length of data received? > > Here's the whole function definition. > > static int >

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

2016-05-28 Thread Christopher Collins
On Sat, May 28, 2016 at 01:38:48PM -0700, Sterling Hughes wrote: > $ newt run > > Will do this for you. No need to call binary directly. If you are building for real hardware (i.e., not sim), then you need to add a version number to the end of the command. So, the command would look

Re: Correct way to add a task that only runs once

2016-05-28 Thread Sterling Hughes
Hi James, Callouts are perfect for this type of function. I’d recommend multiplexing this within the task context you are running out of. Essentially the logic works like: - Turn the LED on - Set a callout for 1 second to turn the LED back off If your task is waiting on an event queue,

Correct way to add a task that only runs once

2016-05-28 Thread James Howarth
Hi, I want to be able to flash an LED on for ~1 second when some condition occurs. I don't want this to be flashing all the time like the blinky example. What's the right way to add a task that runs only once? Or should I not be using a task at all for this? Cheers James

Re: Javascript Support (was Re: [SUMMARY][DISCUSS] A users@ mailing list for Apache Mynewt)

2016-05-28 Thread David Moshal
> Oracle happened. ;-) got it, sorry about that. Dave On Sat, May 28, 2016 at 1:46 PM, David G. Simmons wrote: > >> On May 28, 2016, at 4:23 PM, David Moshal wrote: >> >> thanks, I did not know about that project. >> what happened to it? > > Oracle

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

2016-05-28 Thread David G. Simmons
I think you want newt run blinky Blinky is the target. newt knows how to find it. dg > On May 28, 2016, at 4:46 PM, David Moshal wrote: > > sorry, my question could have been clearer, what's the path and target > name for your 'Create First Project' project? > >

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

2016-05-28 Thread David Moshal
sorry, my question could have been clearer, what's the path and target name for your 'Create First Project' project? http://mynewt.apache.org/os/get_started/project_create/ I tried: ``` ../newt run ./bin/my_blinky_sim/apps/blinky/blinky.elf Error: Invalid target name:

Re: Javascript Support (was Re: [SUMMARY][DISCUSS] A users@ mailing list for Apache Mynewt)

2016-05-28 Thread David G. Simmons
> On May 28, 2016, at 4:23 PM, David Moshal wrote: > > thanks, I did not know about that project. > what happened to it? Oracle happened. ;-) dg -- David G. Simmons (919) 534-5099 Web • Blog • Linkedin • Twitter • GitHub /** Message digitally signed for security and

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

2016-05-28 Thread Sterling Hughes
$ newt run Will do this for you. No need to call binary directly. Newt run also will upload targets to the host device for you, when you connect one. Not sure about the mapping, I'll let Todd and Chris chime in. Sterling > On May 28, 2016, at 1:26 PM, David Moshal

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

2016-05-28 Thread David Moshal
ok, so Docker knowledge is a pre-requisite, has been ages since I last used Docker. what's the host directory mapped to? Dave On Sat, May 28, 2016 at 1:18 PM, Sterling Hughes wrote: > Newt run target name will run it in the container-- when using docker the

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

2016-05-28 Thread Sterling Hughes
Newt run target name will run it in the container-- when using docker the sim binary is compiled under Linux to run on Linux. Sterling (Thumb typing) > On May 28, 2016, at 1:07 PM, David Moshal wrote: > > Not sure if this is the best place to put this, I managed to get >

Re: Javascript Support (was Re: [SUMMARY][DISCUSS] A users@ mailing list for Apache Mynewt)

2016-05-28 Thread David G. Simmons
> On May 28, 2016, at 3:57 PM, David Moshal wrote: > > I don't know of any other embedded platform capable of supporting that > use case, or that abuse, do you? > I mean, that's literally the ultimate newbie scenario - completely new > to programming! Project Sun SPOT

Re: Javascript Support (was Re: [SUMMARY][DISCUSS] A users@ mailing list for Apache Mynewt)

2016-05-28 Thread David Moshal
> Incredibly useful advice, thank you. You're welcome Now, if I can just find some way to get up and running, I might be able to help implement that! > You look at Espruino’s compiler, and it was clearly written in > a swashbuckling style: Thanks for the links. At this point though my C

How to determine the length of received data in a GATT callback

2016-05-28 Thread James Howarth
Hi, Looking at the peripheral callback gatt_svr_chr_access_gatt, is there a way to determine the length of data received? Here's the whole function definition. static int gatt_svr_chr_access_gatt(uint16_t conn_handle, uint16_t attr_handle, uint8_t op, union

Re: Javascript Support (was Re: [SUMMARY][DISCUSS] A users@ mailing list for Apache Mynewt)

2016-05-28 Thread David Moshal
David, Sterling, let me throw in my 2 cents. Firstly, Thank you David Simmons, it's really interesting to look at it from the perspective of the original embedded Java efforts. I recall following that project closely in the late 1990s. In the case of Javascript though, I think the problem may be

Re: Javascript Support (was Re: [SUMMARY][DISCUSS] A users@ mailing list for Apache Mynewt)

2016-05-28 Thread Sterling Hughes
also: as you look at this, if you need changes to newt (tool) or can think of ways to have newt make bringing in 3rd party libraries easier, feel free to ping dev@ (ideal) or me directly. we enforce a directory structure on packages with newt, but that doesn’t always need to be the case — we

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

2016-05-28 Thread Sterling Hughes
On 28 May 2016, at 10:38, aditi hilbert wrote: I think John D. Ament raised some good points. * Nothing in our binaries say Mynewt - do we need to by Apache rules? * Our repos already include mynewt - so we should be fine there. * the package "apache-newt" lacks a NOTICE/LICENSE file * our

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

2016-05-28 Thread aditi hilbert
> [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) Aditi

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: [VOTE] Release Apache Mynewt 0.9.0-incubating-rc2

2016-05-28 Thread David G. Simmons
> On May 27, 2016, at 10:56 PM, Christopher Collins wrote: > > [ ] +1 Release this package > [X] 0 I don't feel strongly about it, but don't object > [ ] -1 Do not release this package because... -- David G. Simmons (919) 534-5099 Web • Blog • Linkedin • Twitter • GitHub