Hi James,
Yes, there are two ways. The easier of the two is to use the "virtual COM
port" that is exposed via the USB port. The other way is to attach a three
wire serial cable to the appropriate pins on the nRF52. Either way, you
will need the FTDI driver on your machine and a terminal emulator that is
capable of attaching to a tty device (e.g., minicom or screen). If you are
using a mac, it should already come with the FTDI driver. There may be a
configuration step that I have forgotten about; please feel free to reply
back if you run into issues.
On a mac, I attach to the virtual COM device as follows (I use the dterm
program, but the procedure should be the same with a different tool):
dterm /dev/tty.usbmodem145121 115200 8 n 1
Alternatively, to connect to the 3-wire serial port, I would run dterm like
this:
dterm /dev/tty.usbserial-A6009JND 115200 8 n 1
There is one other means of debugging these issues: you can run the app in
gdb. To do this, use the "newt run" command:
newt run perph 0
Chris
On Mon, May 16, 2016 at 3:10 PM, James Howarth <[email protected]>
wrote:
> Hi Chris,
> Is there a way to hook up to the device while it is running to see the
> debug messages? So that I can diagnose some of these problems myself?
> CheersJames
>
>
>
>
>
>
> On Mon, May 16, 2016 at 12:38 PM -0700, "Christopher Collins" <
> [email protected]> wrote:
>
>
>
>
>
>
>
>
>
>
> Hi James,
>
> On Mon, May 16, 2016 at 10:49:10AM -0700, James Howarth wrote:
> > Hi,
> >
> > I am trying to get the bleprph example up and running on a Nordic nRF52
> > PDK. But I can't seem to see the device using the LightBlue app running
> on
> > my iPhone.
> [...]
>
> Hi James,
>
> I'm pretty sure I know what the problem is - the application task's
> stack is overflowing right out the gate. I'm afraid I have to take the
> blame for this one; the default logging settings use a lot of stack, and
> I don't often test with them.
>
> The fix is simple: increase the application stack size from 200 to 288
> words. You can do this by changing apps/bleprph/src/main.c as follows:
>
> #define BLEPRPH_STACK_SIZE (OS_STACK_ALIGN(288))
>
> This change has already been made to the development branch, but it
> didn't make it into the previous release. Using the develop branch
> instead of fixing the bug yourself is also an option; you can do so by
> changing your project.yml as follows:
>
> 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-dev
> user: apache
> repo: incubator-mynewt-core
>
> (change the "vers" field).
>
> Then 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
>
> Naturally, this branch is quite unstable!
>
> Chris
>
>
>
>
>
>