Date   

Re: How to write a string to serial?

kk <pinganddu90@...>
 

Hi Kumar

That not works

Thanks

On Wed, Mar 29, 2017 at 11:06 PM, Kumar Gala <kumar.gala@...> wrote:

> On Mar 29, 2017, at 9:56 AM, kk <pinganddu90@...> wrote:
>
> Hi all
>
> I am new to this mailing list.
> I connect my arduino 101 to minicom, I have set the serial port:
>     ttyUSB0 8N1
> I use the Adafruit 4 pin cable (PL2303)
>     black Ground connect GND on arduino 101
>     green Receive connect TX->1 on arduino 101
>     white Transmit connect  RX->1 on arduino 101
> I run the hello_world program:
>     make BOARD=arduino_101 flash
> everything go well, but I can't see the "Hello World! x86" on the minicom.
> I use the BOARD=qemu_x86, I can see the string "Hello World! x86"
> So my question is how to write a string to serial?
>
> Thanks!
>
>
>
> _______________________________________________
> Zephyr-users mailing list
> Zephyr-users@lists.zephyrproject.org
> https://lists.zephyrproject.org/mailman/listinfo/zephyr-users

If you just use printf() you will get strings outputted to serial with most default configurations.

- k


Re: How to write a string to serial?

Felipe Neves
 


Hi, depending on where the message is placed, you will not see it on console.

if I remember the hw example in zephyr was implemented on whis way:

void main(void)
{
   printf("Hello_x86! \r");
}

Instead, do a slight modification on main.c on main function to become:


void main(void)
{
   for(;;) { 
          printf("Hello_x86! \r");
          task_sleep(500);
   }
}


This will continuosly prints the message on your console, and if your def_config is okay, you will able to see the messages hitting
on your minicom instance.

Best,

Felipe

2017-03-29 12:06 GMT-03:00 Kumar Gala <kumar.gala@...>:


> On Mar 29, 2017, at 9:56 AM, kk <pinganddu90@...> wrote:
>
> Hi all
>
> I am new to this mailing list.
> I connect my arduino 101 to minicom, I have set the serial port:
>     ttyUSB0 8N1
> I use the Adafruit 4 pin cable (PL2303)
>     black Ground connect GND on arduino 101
>     green Receive connect TX->1 on arduino 101
>     white Transmit connect  RX->1 on arduino 101
> I run the hello_world program:
>     make BOARD=arduino_101 flash
> everything go well, but I can't see the "Hello World! x86" on the minicom.
> I use the BOARD=qemu_x86, I can see the string "Hello World! x86"
> So my question is how to write a string to serial?
>
> Thanks!
>
>
>
> _______________________________________________
> Zephyr-users mailing list
> Zephyr-users@lists.zephyrproject.org
> https://lists.zephyrproject.org/mailman/listinfo/zephyr-users

If you just use printf() you will get strings outputted to serial with most default configurations.

- k
_______________________________________________
Zephyr-users mailing list
Zephyr-users@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users



--
Felipe S. Neves 
Embedded software & systems engineer
Skype: fneves1989
+55 11 96610 – 0855 


Re: How to write a string to serial?

kk <pinganddu90@...>
 

Hi Feilpe

I found the "task_sleep()" function in legacy.h, When I add the "task_sleep(500)" and the include file legacy.h, the compiler tell:
    undefined reference to `_legacy_sleep'
I am confused.

Thanks
   

On Wed, Mar 29, 2017 at 11:34 PM, Felipe Neves <ryukokki.felipe@...> wrote:

Hi, depending on where the message is placed, you will not see it on console.

if I remember the hw example in zephyr was implemented on whis way:

void main(void)
{
   printf("Hello_x86! \r");
}

Instead, do a slight modification on main.c on main function to become:


void main(void)
{
   for(;;) { 
          printf("Hello_x86! \r");
          task_sleep(500);
   }
}


This will continuosly prints the message on your console, and if your def_config is okay, you will able to see the messages hitting
on your minicom instance.

Best,

Felipe

2017-03-29 12:06 GMT-03:00 Kumar Gala <kumar.gala@...>:

> On Mar 29, 2017, at 9:56 AM, kk <pinganddu90@...> wrote:
>
> Hi all
>
> I am new to this mailing list.
> I connect my arduino 101 to minicom, I have set the serial port:
>     ttyUSB0 8N1
> I use the Adafruit 4 pin cable (PL2303)
>     black Ground connect GND on arduino 101
>     green Receive connect TX->1 on arduino 101
>     white Transmit connect  RX->1 on arduino 101
> I run the hello_world program:
>     make BOARD=arduino_101 flash
> everything go well, but I can't see the "Hello World! x86" on the minicom.
> I use the BOARD=qemu_x86, I can see the string "Hello World! x86"
> So my question is how to write a string to serial?
>
> Thanks!
>
>
>
> _______________________________________________
> Zephyr-users mailing list
> Zephyr-users@...ct.org
> https://lists.zephyrproject.org/mailman/listinfo/zephyr-users

If you just use printf() you will get strings outputted to serial with most default configurations.

- k
_______________________________________________
Zephyr-users mailing list
Zephyr-users@...ct.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users



--
Felipe S. Neves 
Embedded software & systems engineer
Skype: fneves1989
+55 11 96610 – 0855 


Re: How to write a string to serial?

kk <pinganddu90@...>
 

My def_config was arduino_101_defconfig.

On Wed, Mar 29, 2017 at 11:55 PM, kk <pinganddu90@...> wrote:
Hi Feilpe

I found the "task_sleep()" function in legacy.h, When I add the "task_sleep(500)" and the include file legacy.h, the compiler tell:
    undefined reference to `_legacy_sleep'
I am confused.

Thanks
   

On Wed, Mar 29, 2017 at 11:34 PM, Felipe Neves <ryukokki.felipe@...> wrote:

Hi, depending on where the message is placed, you will not see it on console.

if I remember the hw example in zephyr was implemented on whis way:

void main(void)
{
   printf("Hello_x86! \r");
}

Instead, do a slight modification on main.c on main function to become:


void main(void)
{
   for(;;) { 
          printf("Hello_x86! \r");
          task_sleep(500);
   }
}


This will continuosly prints the message on your console, and if your def_config is okay, you will able to see the messages hitting
on your minicom instance.

Best,

Felipe

2017-03-29 12:06 GMT-03:00 Kumar Gala <kumar.gala@...>:

> On Mar 29, 2017, at 9:56 AM, kk <pinganddu90@...> wrote:
>
> Hi all
>
> I am new to this mailing list.
> I connect my arduino 101 to minicom, I have set the serial port:
>     ttyUSB0 8N1
> I use the Adafruit 4 pin cable (PL2303)
>     black Ground connect GND on arduino 101
>     green Receive connect TX->1 on arduino 101
>     white Transmit connect  RX->1 on arduino 101
> I run the hello_world program:
>     make BOARD=arduino_101 flash
> everything go well, but I can't see the "Hello World! x86" on the minicom.
> I use the BOARD=qemu_x86, I can see the string "Hello World! x86"
> So my question is how to write a string to serial?
>
> Thanks!
>
>
>
> _______________________________________________
> Zephyr-users mailing list
> Zephyr-users@...ct.org
> https://lists.zephyrproject.org/mailman/listinfo/zephyr-users

If you just use printf() you will get strings outputted to serial with most default configurations.

- k
_______________________________________________
Zephyr-users mailing list
Zephyr-users@...ct.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users



--
Felipe S. Neves 
Embedded software & systems engineer
Skype: fneves1989
+55 11 96610 – 0855 



Re: How to write a string to serial?

Qiu, PeiyangX <peiyangx.qiu@...>
 

You can try changing the serial connections.

Green -> RX

White -> TX

Black -> GND

 

From: zephyr-users-bounces@... [mailto:zephyr-users-bounces@...] On Behalf Of kk
Sent: Wednesday, March 29, 2017 10:57 PM
To: zephyr-users@...
Subject: [Zephyr-users] How to write a string to serial?

 

Hi all

I am new to this mailing list.

I connect my arduino 101 to minicom, I have set the serial port:
    ttyUSB0 8N1

I use the Adafruit 4 pin cable (PL2303)

    black Ground connect GND on arduino 101

    green Receive connect TX->1 on arduino 101

    white Transmit connect  RX->1 on arduino 101

I run the hello_world program:

    make BOARD=arduino_101 flash

everything go well, but I can't see the "Hello World! x86" on the minicom.
I use the BOARD=qemu_x86, I can see the string "Hello World! x86"

So my question is how to write a string to serial?

Thanks!

 

 

 


Re: How to write a string to serial?

kk <pinganddu90@...>
 

Thanks all, I have solve the problem by using:
    for(;;)
    {
        printk("Hello World\n");
    }
But those were all garbled on the minicom. How about yours? How yours see the debug information from serial generally?

On Thu, Mar 30, 2017 at 8:21 AM, Qiu, PeiyangX <peiyangx.qiu@...> wrote:

You can try changing the serial connections.

Green -> RX

White -> TX

Black -> GND

 

From: zephyr-users-bounces@lists.zephyrproject.org [mailto:zephyr-users-bounces@lists.zephyrproject.org] On Behalf Of kk
Sent: Wednesday, March 29, 2017 10:57 PM
To: zephyr-users@lists.zephyrproject.org
Subject: [Zephyr-users] How to write a string to serial?

 

Hi all

I am new to this mailing list.

I connect my arduino 101 to minicom, I have set the serial port:
    ttyUSB0 8N1

I use the Adafruit 4 pin cable (PL2303)

    black Ground connect GND on arduino 101

    green Receive connect TX->1 on arduino 101

    white Transmit connect  RX->1 on arduino 101

I run the hello_world program:

    make BOARD=arduino_101 flash

everything go well, but I can't see the "Hello World! x86" on the minicom.
I use the BOARD=qemu_x86, I can see the string "Hello World! x86"

So my question is how to write a string to serial?

Thanks!

 

 

 



Can not get any call back when bluetooth connect fail

ghost <hfggw@...>
 

Hi all,

I am use bluetooth function in NRF52_PCA10040 board, I get a issue that when a central get a connect fail after I call bt_conn_create_le function, it didn’t get any call back.
I do know the connect was fail, so that I can not start SCAN function again which is stop before bt_conn_create_le.
I check the log, it has been get in the function of le_conn_update in the conn.c, but nothing to notify or call back to my APP.
Do you have any suggestion?

Thanks
guiwu.guo


Re: Can not get any call back when bluetooth connect fail

Johan Hedberg
 

Hi guiwu gue,

On Fri, Apr 07, 2017, ghost wrote:
I am use bluetooth function in NRF52_PCA10040 board, I get a issue
that when a central get a connect fail after I call bt_conn_create_le
function, it didn’t get any call back.
I do know the connect was fail, so that I can not start SCAN function
again which is stop before bt_conn_create_le.
I check the log, it has been get in the function of le_conn_update in
the conn.c, but nothing to notify or call back to my APP.
Do you have any suggestion?
Is this the same issue you've outlined here:

https://jira.zephyrproject.org/browse/ZEP-2005

If so, does the attached patch help?

Johan


Re: Can not get any call back when bluetooth connect fail

ghost <hfggw@...>
 


Hi Johan,

Thanks for your reply, I fail to add your batch by "git apply  conn-timeout.patch",
I add the modification manually, but the issue still doesn't fix.
What I found is that when the issue happen, the connect state is "connect" but not "connect-scan".
I add the log in the attachment, please check it, in the log I only open the "conn debug"

Thanks,
guiwu.guo


At 2017-04-08 02:22:18, "Johan Hedberg" <johan.hedberg@...> wrote: >Hi guiwu gue, > >On Fri, Apr 07, 2017, ghost wrote: >> I am use bluetooth function in NRF52_PCA10040 board, I get a issue >> that when a central get a connect fail after I call bt_conn_create_le >> function, it didn’t get any call back. >> I do know the connect was fail, so that I can not start SCAN function >> again which is stop before bt_conn_create_le. >> I check the log, it has been get in the function of le_conn_update in >> the conn.c, but nothing to notify or call back to my APP. >> Do you have any suggestion? > >Is this the same issue you've outlined here: > > https://jira.zephyrproject.org/browse/ZEP-2005 > >If so, does the attached patch help? > >Johan


 


Re: Can not get any call back when bluetooth connect fail

ghost <hfggw@...>
 

Hi Johan,

Oh, I forgot to answer a question in the previous mail. 
--Is this the same issue you've outlined here:
Yes, it is the same issue.
Thanks,
guiwu.guo




At 2017-04-10 10:58:51, "ghost" <hfggw@...> wrote:

Hi Johan,

Thanks for your reply, I fail to add your batch by "git apply  conn-timeout.patch",
I add the modification manually, but the issue still doesn't fix.
What I found is that when the issue happen, the connect state is "connect" but not "connect-scan".
I add the log in the attachment, please check it, in the log I only open the "conn debug"

Thanks,
guiwu.guo


At 2017-04-08 02:22:18, "Johan Hedberg" <johan.hedberg@...> wrote: >Hi guiwu gue, > >On Fri, Apr 07, 2017, ghost wrote: >> I am use bluetooth function in NRF52_PCA10040 board, I get a issue >> that when a central get a connect fail after I call bt_conn_create_le >> function, it didn’t get any call back. >> I do know the connect was fail, so that I can not start SCAN function >> again which is stop before bt_conn_create_le. >> I check the log, it has been get in the function of le_conn_update in >> the conn.c, but nothing to notify or call back to my APP. >> Do you have any suggestion? > >Is this the same issue you've outlined here: > > https://jira.zephyrproject.org/browse/ZEP-2005 > >If so, does the attached patch help? > >Johan


 




Zephyr BLE - use public(fixed) address

Purushothaman, Neha <neha.purushothaman@...>
 

Hello,

 

Can Zephyr allow us to use the HW MAC address of the BLE module while advertising?

 

I am working on the BLE sample codes in Zephyr 1.6,  and noticed that while running the Zephyr BLE peripheral_hr sample code(or any other peripheral examples) on quark_se_c1000_devboard that the MAC address keeps changing every time the board is power cycled. The Bluetooth module used is nRF51 Raytac with hci_uart project flashed on.

 

It seems as if when the host requests for the Bluetooth address (common_init() in subsys/bluetooth/host/hci_core.c), the controller returns variable 'pub_addr'  (subsys/bluetooth/controller/ll.c). This variable, not being initialized, results in always returning 0. The host on receiving 0:0:0:0:0:0 from the controller sets static random address, which was why it kept changing every time I reset the board.

 

Is there a way to disable this feature? I could initialize the pub_addr and get a constant MAC address, but that would mean changing it every time i flash a new BLE module. Does Zephyr allow us to just use the public ( or HW) MAC address?

 

Thanks in advance,

Neha


Re: Zephyr BLE - use public(fixed) address

Luiz Augusto von Dentz
 

Hi Neha,

Look at BLUETOOTH_INTERNAL_STORAGE:

https://gerrit.zephyrproject.org/r/gitweb?p=zephyr.git;a=blob;f=subsys/bluetooth/host/Kconfig;h=b2e3775f4f07c5cf786de714e8bb1f6524589cd4;hb=HEAD

There is the shell test that actually set it with arduino 101.

On Wed, Apr 12, 2017 at 12:32 AM, Purushothaman, Neha
<neha.purushothaman@intel.com> wrote:
Hello,



Can Zephyr allow us to use the HW MAC address of the BLE module while
advertising?



I am working on the BLE sample codes in Zephyr 1.6, and noticed that while
running the Zephyr BLE peripheral_hr sample code(or any other peripheral
examples) on quark_se_c1000_devboard that the MAC address keeps changing
every time the board is power cycled. The Bluetooth module used is nRF51
Raytac with hci_uart project flashed on.



It seems as if when the host requests for the Bluetooth address
(common_init() in subsys/bluetooth/host/hci_core.c), the controller returns
variable 'pub_addr' (subsys/bluetooth/controller/ll.c). This variable, not
being initialized, results in always returning 0. The host on receiving
0:0:0:0:0:0 from the controller sets static random address, which was why it
kept changing every time I reset the board.



Is there a way to disable this feature? I could initialize the pub_addr and
get a constant MAC address, but that would mean changing it every time i
flash a new BLE module. Does Zephyr allow us to just use the public ( or HW)
MAC address?



Thanks in advance,

Neha


_______________________________________________
Zephyr-users mailing list
Zephyr-users@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users


--
Luiz Augusto von Dentz


Development Environment

Kevin Stöckl <k_stoeckl@...>
 

Hello to all,
I am new in using Zephyr, but i want to make a project with the arduino due and the Linux OS. So my Question is what Environment i should use for developing a project on Linux for the Arduino due.

Thanks in Advance


Re: Development Environment

Andersen, John <john.s.andersen@...>
 

Hi Keven,

You would probably want to flash Zephyr onto the Due and then on the Linux host
side, connected with a serial cable (UART) talk to the Due using python or
something anything with a library to help you talk UART.

For instance on the host with python you would have

```
with serial.Serial('/dev/ttyS1', 19200, timeout=1) as ser:
x = ser.read() # read one byte from Due
s = ser.read(10) # read up to ten bytes (timeout) from Due
line = ser.readline() # read a '\n' terminated line from Due
ser.write(b'hello') # write a string to the Due
```
(From: https://pythonhosted.org/pyserial/shortintro.html)


Then in Zephyr anything you printk would be sent to the python (or other)
process running on the Linux machine attached to it.

```
Serial Port

The Atmel SAM3X8E processor has a single UART that is used by the SAM-BA
bootloader. This UART has only two wires for RX/TX and does not have flow
control (CTS/RTS) or FIFO. The RX/TX pins are connected to the ATmega16U2,
which provides USB-to-TTL serial function. The Zephyr console output, by
default, is utilizing this controller.
```
(From: https://www.zephyrproject.org/doc/latest/board/arduino_due.html)

Really all that is happening is that what you normally see through the Arduino
IDE when you run the program, the serial output. Is now just getting received
by the python program on Linux. Only you're not using the Arduino framework
you're using Zephyr so instead of Serial.write() (i think it is) you just use
printk.

To write to the python on the Linux host I think this issue is pertinent
(https://jira.zephyrproject.org/browse/ZEP-89). Someone else
please chime in here. (Andy CC'd because assigned to him).

- John

On Wed, Apr 19, 2017 at 09:12:37AM +0000, Kevin Stöckl wrote:
Hello to all,
I am new in using Zephyr, but i want to make a project with the arduino
due and the Linux OS. So my Question is what Environment i should use
for developing a project on Linux for the Arduino due.
Thanks in Advance
_______________________________________________
Zephyr-users mailing list
Zephyr-users@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users


Arduino 101 - pinmax of pins with multiple connections.

Graham Stott <gbcstott1@...>
 

My project only needs two PWM outputs so I want to switch the two unused PWM to GPIOs. The best candidates are PWM 0 (IO 3) and PWM 1 (IO 5) however these are the pins that are connected to another output pin from Curie.  Curie pins B1 and H1 go to IO-3 and A3 and G2 go to IO-5.  The GPIOs that I want to switch to, are on the other Curie output pins. For example GPIO 17 comes from pin B1 while PWM 0 comes from H1.

 

I believe that I need to put the unused pin in a high impedance mode so that it does not affect the other pin. I do not see any were in Zephyr where this is done so I presume that the OS assumes that the hardware comes up in this state and therefore it only does the pinmax for the pin to IO-3 and IO-5 that it wants. Note that there are in fact three other pins that are like this (IO-11, IO-12 and IO-13) which the documentation does not mention. The documentation is not helpful as it just says “IO-3 and IO-5 require both pins to be set for functionality changes. I did look at the pinmux.c and the header files but they were not helpful.

 

Can anyone point me to an example where/how this is done.   I looked at the sample code and online and could not find anything.

 

My guess is that I need to put the unused pin in input mode with no pull up and then pinmux the other pin to the output I want.

 

Graham


Reg: Enable arc to access the spi controller on I/O fabric on C1000

Mahendravarman Rajarao (RBEI/EAA10) <Mahendravarman.Rajarao@...>
 

Hi

 

Please help me on the following queries

 

I have downloaded zephyr 1.6 and I have applied the patch https://gerrit.zephyrproject.org/r/#/c/8708/ to Enable arc to access the spi controller on I/O fabric.

 

I have few queries on the above.

 

1.      I have declared CONFIG_SPI in the prj.conf for the ARC project and SPI access is working.

Can I declare the CONFIG_ SPI on the prj.conf on the X86 also ?

My query is simultaneous SPI access is possible via ARC and X86 ? or should we declare CONFIG_SPI in any one of the cores only.

 

2.      After reset of C1000, the code in the ARC is getting executed first, Followed by x86 .

By default can I make some settings to delay the execution of ARC code  other than task_sleep ?

 

 

     

 

 

Best regards
Mahendra


Re: Reg: Enable arc to access the spi controller on I/O fabric on C1000

Michael Rosen
 

1. I have declared CONFIG_SPI in the prj.conf for the ARC project and SPI access is working.
Can I declare the CONFIG_ SPI on the prj.conf on the X86 also ?
My query is simultaneous SPI access is possible via ARC and X86 ? or should we declare CONFIG_SPI in any one of the cores only.
You can, just be aware that there isn't any builtin mutual exclusion between the x86 and ARC cores in the OS, so if both cores are trying to access the same SPI controller, there will likely be concurrency issues. But it should be perfectly fine to use SPI0 from x86 and SPI1 from ARC (just be aware there still might be issues if you attempt to clock gate the controllers from both cores). Just be sure to disable the SPI controller you aren't using on the core that isn't using it or the interrupt routing will break things (wrong core responding to the interrupt).

x86.conf:

CONFIG_SPI=y
CONFIG_SPI_QMSI=y
CONFIG_SPI_0=y
CONFIG_SPI_1=n

arc.conf:

CONFIG_SPI=y
CONFIG_SPI_QMSI=y
CONFIG_SPI_0=n
CONFIG_SPI_1=y

2. After reset of C1000, the code in the ARC is getting executed first, Followed by x86 .
By default can I make some settings to delay the execution of ARC code  other than task_sleep ?
You can make sure ARC starts later if you modify the following file (unfortunately, the option isn't Kconfig'able):
arch/x86/soc/intel_quark/quark_se/soc.c

And modify the priority under SYS_INIT to be later. However, if you want it to happen AFTER the x86 application starts, youll need to still modify that file to remove the SYS_INIT and add this to your application:

extern int _arc_init(struct dev* arg);

// use in app like so
// if (_arc_init(NULL)) {
// printk("ARC initialization failed!\n");
// }

Its pretty ugly, but functional. You will still need CONFIG_ARC_INIT=y to build the _arc_init function.

Mike


[net]Why not respond RS message

guiwu.guo <hfggw@...>
 

Hi all,

I am development a Ipv6 project now, I have enable the CONFIG_NET_IPV6_ND.
But when the connection establish between two note, the note doesn't processing the RS message.
the log is like this:
[net/core] [DBG] net_recv_data: (0x200092b8): fifo 0x20003620 iface 0x20000e60 pkt 0x20008fa4 len 28
[net/core] [INF] net_analyze_stack: net (0x200081a4): RX thread stack real size 1596 unused 796 usage 704/1500 (43 %)
[net/core] [DBG] net_rx_thread: (0x200081a4): Received pkt 0x20008fa4 len 28
[net/ipv6] [DBG] net_ipv6_process_pkt: (0x200081a4): IPv6 packet len 56 received from fe80::d2af:d0ff:fe36:f04d to ff02::1
[net/ipv6] [DBG] process_icmpv6_pkt: (0x200081a4): ICMPv6 Router Solicitation received type 133 code 0
[net/core] [DBG] processing_data: (0x200081a4): Dropping pkt 0x20008fa4
In the code of icmpv6 that only register the request handler of echo_request:
static struct net_icmpv6_handler echo_request_handler = {
.type = NET_ICMPV6_ECHO_REQUEST,
.code = 0,
.handler = handle_echo_request,
};
Does it loss RS request processing in icmpv6?

Thanks,
Guiwu.guo


using Intel ISSM tolos to compile arduino_101_sss

Carles Perello
 

Hi

While having no issues using Intel ISSM toolkit on arduino_101, when I try to compile using arduino_101_sss as target, it complains that

arc-elf32-gcc.exe: error: unrecognized argument in option '-mcpu=quarkse_em'

what would be the apropiate cpu to use on ISSM tools?


cheers


★ Zephyr Users, Felipe te mandou uma mensagem

Felipe Neves
 

21 - 40 of 2550