Re: TCP assert error logs
Vakul Garg <vakul.garg@...>
Hi Paul
toggle quoted messageShow quoted text
-----Original Message-----I used TCP/UDP POSIX sockets between two local apps just because I thought I can't multiplex a local IPC method such as mailbox/pipe with network sockets connected to a remote endpoint. If I change my code to use net_context apis for remote networking and use mailbox/pipe between local apps, will I be able to multiplex net_contexts with mailbox/pipes using k_poll mechanism? But there's definitely desire to extend POSIX support in Zephyr, so any
|
|
Re: 96boards Nitrogen
Ricardo Salveti de Araujo <ricardo.salveti@...>
On Wed, Sep 13, 2017 at 6:37 PM, Steve Brown <sbrown@...> wrote:
Has anyone had success with samples/bluetooth/beacon on this device?It is supposed to just work, without any additional changes, so wonder if this could be hw issues. Can you check the hw revision for your Nitrogens (should be either v0.9, v1.0 or v1.1)? I got several from v0.9 and v1.1 and they are all functional. Just tested the beacon sample from Zephyr 1.9 and it is working just fine. Cheers, -- Ricardo Salveti
|
|
Re: 96boards Nitrogen
eden candelas <e.candelas@...>
Hello, I did modified the example to work as iBeacon ( the version on the example is for an eddystone). Basically you have to update the ad[] struct with the byte array required for the iBeacon spec. Attached to this mail you will find the main.c that I have been using to test that functionality.
On Wed, Sep 13, 2017 at 4:37 PM, Steve Brown <sbrown@...> wrote: Has anyone had success with samples/bluetooth/beacon on this device?
|
|
96boards Nitrogen
Steve Brown
Has anyone had success with samples/bluetooth/beacon on this device?
Even the nitrogen_beacon.hex file from 96boards.org won't transmit. The console messages are as expected, but nothing on the air. Same results on two recent boards from Seeed. The same .hex file flashed to a redbear ble nano2 does transmit. There is no console output because a different uart is used, but the beacons are on the air. The designation on the nRF52 is N52832/QFAAB0/1616BD. I looked at the errata and didn't see anything obvious. I'm waiting for a reply from Seeed as to what they use to test the ble functionality of the devices before they ship. As a last resort, I'll try Nordic's SDK and see if I get the same results. Thanks, Steve
|
|
Re: UDP recvfrom
Paul Sokolovsky
On Wed, 13 Sep 2017 08:58:16 +0000
Vakul Garg <vakul.garg@...> wrote: HiIndeed, it's not yet implemented. Initial patch was posted: https://github.com/zephyrproject-rtos/zephyr/pull/1055 , but it's still in review and needs some refactors. You can try if it applies to the current tree and can get you going in the meantime. Anticipating a further question, getaddrinfo() is also not yet available, I hope to post a patch for it today-tomorrow.
-- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
|
|
Re: TCP assert error logs
Paul Sokolovsky
On Wed, 13 Sep 2017 08:50:02 +0000
Vakul Garg <vakul.garg@...> wrote: UDP loopback works and I can make progress with it for now.Yes, POSIX bits is Zephyr are very initial and very bare so far - a bit of threads and a bit of sockets support. There're neither full-featured poll() implementation, nor fd's (file descriptors), nor other POSIX IPC. But there's definitely desire to extend POSIX support in Zephyr, so any feedback is appreciated. (You may also want to route this feedback via Maureen Helm, who's both on Zephyr and Linaro LITE TSCs, so with her input, specific things may get planned and prioritized.) [] -- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
|
|
UDP recvfrom
Vakul Garg <vakul.garg@...>
Hi
I am using UDP sockets (posix flavor) in my app. I need to determine the incoming UDP datagram’s source IP address and port. For this, typically recvfrom() is used.
Since this call is not available, what are my options?
Can someone please advise?
Regards, Vakul
|
|
Re: TCP assert error logs
Vakul Garg <vakul.garg@...>
Hi Paul
toggle quoted messageShow quoted text
UDP loopback works and I can make progress with it for now. (Ultimately, I need to move to some non-networking IPC such as mailbox or pipe. The problem I face with that now is that I cannot multiplex these zephyr IPC in POSIX poll() along with socket descriptors.) Thanks & Regards Vakul
-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@...] Sent: Wednesday, September 13, 2017 1:08 PM To: Vakul Garg <vakul.garg@...> Cc: zephyr-users@... Subject: Re: [Zephyr-users] TCP assert error logs Hello Vakul, On Tue, 12 Sep 2017 09:09:10 +0000 Vakul Garg <vakul.garg@...> wrote: Hello PaulThanks for that! It's on my todo list to look into that issue again, the testcase will be helpful then. In the meantime, following may be helpful for you: 1. UDP communication using a local interface works in Zephyr, we have a testcase for that in tests/net/socket/udp/ 2. If you need TCP communication, you would need to use HOST-Zephyr communication. (Well, there is also a setup to allow 2 Zephyr QEMU instances to communicate with each other, I didn't check it for a while though).
-- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
|
|
Re: TCP assert error logs
Paul Sokolovsky
Hello Vakul,
On Tue, 12 Sep 2017 09:09:10 +0000 Vakul Garg <vakul.garg@...> wrote: Hello PaulThanks for that! It's on my todo list to look into that issue again, the testcase will be helpful then. In the meantime, following may be helpful for you: 1. UDP communication using a local interface works in Zephyr, we have a testcase for that in tests/net/socket/udp/ 2. If you need TCP communication, you would need to use HOST-Zephyr communication. (Well, there is also a setup to allow 2 Zephyr QEMU instances to communicate with each other, I didn't check it for a while though).
-- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
|
|
Re: TCP assert error logs
Vakul Garg <vakul.garg@...>
Hello Paul
toggle quoted messageShow quoted text
I have attached a test case with the given ticket. Regards Vakul
-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@...] Sent: Monday, September 11, 2017 4:52 PM To: Vakul Garg <vakul.garg@...> Cc: zephyr-users@... Subject: Re: [Zephyr-users] TCP assert error logs Hello Vakul, On Sat, 9 Sep 2017 09:31:14 +0000 Vakul Garg <vakul.garg@...> wrote: I just open a TCP server socket and let it listen for new connectionsRight, that might work, thanks to https://gerrit.zephyrproject.org/r/#/c/7007/ , and if you verified, it apparently does (I don't remember if I ever using 127.0.0.1 address, I usually tried to use a local interface address in such cases, i.e. 192.0.2.1 by default). But just to get terminology right, there's no explicit loopback interface in Zephyr, it's just an adhoc check for the conventional loopback address (though this note is probably irrelevant for your usecase, so feel free to ignore it [for now]). Then another thread creates a TCP client socket and connects to theWhat can I say? With such scenario, you went farther than I. Last time I tried, it wasn't possible to establish a TCP connection under such conditions at all: https://jira.zephyrproject.org/browse/ZEP-2001 . I'd suggest to add some comments to the above ticket, describing your usecase. And ultimately, we'd need a typical small testcase to reproduce the issue, so feel free to post your code to make a step towards progress in that direction. I faced that issue when testing networking support in Zephyr.JS and MicroPython projects, so there're no readily available minimal testcases. Thanks, Paul
-- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
|
|
Re: TCP assert error logs
Paul Sokolovsky
Hello Vakul,
On Sat, 9 Sep 2017 09:31:14 +0000 Vakul Garg <vakul.garg@...> wrote: I just open a TCP server socket and let it listen for new connectionsRight, that might work, thanks to https://gerrit.zephyrproject.org/r/#/c/7007/ , and if you verified, it apparently does (I don't remember if I ever using 127.0.0.1 address, I usually tried to use a local interface address in such cases, i.e. 192.0.2.1 by default). But just to get terminology right, there's no explicit loopback interface in Zephyr, it's just an adhoc check for the conventional loopback address (though this note is probably irrelevant for your usecase, so feel free to ignore it [for now]). Then another thread creates a TCP client socket and connects to theWhat can I say? With such scenario, you went farther than I. Last time I tried, it wasn't possible to establish a TCP connection under such conditions at all: https://jira.zephyrproject.org/browse/ZEP-2001 . I'd suggest to add some comments to the above ticket, describing your usecase. And ultimately, we'd need a typical small testcase to reproduce the issue, so feel free to post your code to make a step towards progress in that direction. I faced that issue when testing networking support in Zephyr.JS and MicroPython projects, so there're no readily available minimal testcases. Thanks, Paul
-- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
|
|
Re: TCP assert error logs
Vakul Garg <vakul.garg@...>
I just open a TCP server socket and let it listen for new connections on 127.0.0.1 on a given server port.
toggle quoted messageShow quoted text
Then another thread creates a TCP client socket and connects to the 127.0.0.1 on the same server port. After connection is successful, client sends one data message on the socket.
-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@...] Sent: Saturday, September 09, 2017 2:57 PM To: Vakul Garg <vakul.garg@...> Cc: zephyr-users@... Subject: Re: [Zephyr-users] TCP assert error logs Hello Vakul, On Sat, 9 Sep 2017 06:47:35 +0000 Vakul Garg <vakul.garg@...> wrote: HiTo the best of my knowledge, there is (was) no loopback interface support in Zephyr. So, I'd interested to know how to achieved the setup above.
-- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
|
|
Re: TCP assert error logs
Paul Sokolovsky
Hello Vakul,
On Sat, 9 Sep 2017 06:47:35 +0000 Vakul Garg <vakul.garg@...> wrote: HiTo the best of my knowledge, there is (was) no loopback interface support in Zephyr. So, I'd interested to know how to achieved the setup above.
-- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
|
|
TCP assert error logs
Vakul Garg <vakul.garg@...>
Hi
I have two threads on my system communicating using TCP over loopback interface. I am getting following errors.
[net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed} [net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain TCP header [net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed} [net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain TCP header [net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed} [net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain TCP header [net/buf] [ERR] net_buf_unref_debug: net_pkt_frag_unref():826: buf 0x200046a0 double free [net/buf] [ERR] net_buf_unref_debug: net_pkt_frag_unref():826: buf 0x200046a0 double free [net/buf] [ERR] net_buf_unref_debug: net_pkt_frag_unref():826: buf 0x20004830 double free
Can someone help?
Regards, Vakul
|
|
Re: Help with compiling for qemu ARM cortex m3
Vakul Garg <vakul.garg@...>
Hi Andrew
toggle quoted messageShow quoted text
The suggested commands are very useful. Thanks for your advice. Regards, Vakul
-----Original Message-----
From: zephyr-users-bounces@... [mailto:zephyr-users-bounces@...] On Behalf Of Boie, Andrew P Sent: Thursday, September 07, 2017 9:39 PM To: Kumar Gala <kumar.gala@...>; Priyanka Rawat <priyanka.rawat@...> Cc: zephyr-users@... Subject: Re: [Zephyr-users] Help with compiling for qemu ARM cortex m3 "make ram_report" and "make rom_report" dump out some helpful information to see what in your code is using so much memory.However, I want to test with the same SRAM value as in real hardwareeventually I want to test with KW41Z board). So instead of increasing Andrew _______________________________________________ Zephyr-users mailing list Zephyr-users@... https://lists.zephyrproject.org/mailman/listinfo/zephyr-users
|
|
Re: Help with compiling for qemu ARM cortex m3
Boie, Andrew P
"make ram_report" and "make rom_report" dump out some helpful information to see what in your code is using so much memory.However, I want to test with the same SRAM value as in real hardware (e.g.,eventually I want to test with KW41Z board). So instead of increasing the current Andrew
|
|
Re: Help with compiling for qemu ARM cortex m3
Kumar Gala
On Sep 7, 2017, at 4:37 AM, Priyanka Rawat <priyanka.rawat@...> wrote:I don’t believe there is a way to change the amount of memory in qemu. Even with switching to the KW41Z guess you are going to run into memory issues (as it has 128k). So are you building your own application or one of the samples/tests? You can try and remove config options to reduce memory, but if you are 82K overflowing than I’m guessing you need to look at how your application is utilizing memory and see if you can reduce that. - k
|
|
Help with compiling for qemu ARM cortex m3
Priyanka
Hi
I tried to compile my sample application code for the target
BOARD ?= qemu_cortex_m3 It compiles for qemu_x86 however for qemu_cortex_m3 it gives me errors related to SRAM overflowed. $zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-zephyr-eabi/gcc/arm-zephyr-eabi/6.2.0/real-ld: zephyr_prebuilt.elf section `noinit' will not fit in region `SRAM'
$zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-zephyr-eabi/gcc/arm-zephyr-eabi/6.2.0/real-ld: section .intList VMA [0000000020010000,0000000020010043] overlaps section noinit VMA [000000002000d5a0,000000002002413b] $zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-zephyr-eabi/gcc/arm-zephyr-eabi/6.2.0/real-ld: region `SRAM' overflowed by 82236 bytes collect2: error: ld returned 1 exit status $zephyr/Makefile:878: recipe for target 'zephyr_prebuilt.elf' failed I test with the recent zephyr version (master branch). In dts/arm/ti/lm3s6965.dtsi the SRAM for qemu_cortex_m3 defined is 64 KB. I can manage to compile for qemu_cortex_m3 by increasing the value of SRAM from 64 KB to 128 KB in dts/arm/ti/lm3s6965.dtsi sram0: memory@20000000 {
device_type = "memory"; compatible = "mmio-sram"; reg = <0x20000000 (64*1024)>;
However, I want to test with the same SRAM value as in real hardware (e.g., eventually I want to test with KW41Z board). So instead of increasing the current SRAM value, I would rather modify proj.conf.}; Could someone please tell me what would be the right approach to address this issue of SRAM overflow for qemu ARM ? Thanks Priyanka
|
|
Re: qemu_x86 zephyr bluetooth beacon sample error
Priyanka
Hi Johan Thanks for the reply. The error is with the (recent) master branch of zephyr. Yes, I did try restarting Qemu, but it didn't resolve the issue. Just to give you a sense of how I test this sample with BlueZ emulator and tools (in case I am missing or doing something wrong here) : I have following running in different terminals. $ sudo ./btvirt -l2
Bluetooth emulator ver 5.46 $ sudo btmon Bluetooth monitor ver 5.46 $ sudo tools/btproxy -u Listening on /tmp/bt-server-bredr
Opening user channel for hci0 New client connected # zephyr/samples/bluetooth/beacon$ make run
Starting Beacon Demo
[bt] [INF] show_dev_info: Identity: 00:aa:01:00:00:23 (public) [bt] [INF] show_dev_info: HCI: version 5.0 (0x09) revision 0x0000, manufacturer 0x003f [bt] [INF] show_dev_info: LMP: version 5.0 (0x09) subver 0x0000 Bluetooth initialized Beacon started [bt] [ERR] read_payload: Not enough space in buffer [bt] [WRN] hci_cmd_done: pool id 1 pool 0x00405098 != &hci_cmd_pool 0x00405078 I try this with the basic proj.conf provided in the sample "beacon" $ hciconfig -a gives me the following Can't read class of device on hci0: Connection timed out (110) hci0: Type: BR/EDR Bus: VIRTUAL BD Address: 00:AA:01:00:00:23 ACL MTU: 192:1 SCO MTU: 0:0 UP RUNNING RX bytes:0 acl:0 sco:0 events:203 errors:0 TX bytes:7024 acl:0 sco:0 commands:636 errors:0 Features: 0xa4 0x08 0x08 0xc0 0x58 0x1e 0x7b 0x83 Packet type: DM1 DH1 HV1 Link policy: RSWITCH SNIFF Link mode: SLAVE ACCEPT Name: 'xxxxxx #1' Can't read class of device on hci0: Connection timed out (110) Thanks Priyanka From: Johan Hedberg <johan.hedberg@...>
Sent: Tuesday, September 5, 2017 2:45 PM To: Priyanka Rawat Cc: zephyr-users@... Subject: Re: [Zephyr-users] qemu_x86 zephyr bluetooth beacon sample error Hi Priyanka,
On Tue, Sep 05, 2017, Priyanka Rawat wrote: > While running the bluetooth sample "beacon" for the target qemu_x86, > > I get the following error > > Starting Beacon Demo > > Bluetooth initialized > Beacon started > [bt] [ERR] read_payload: Not enough space in buffer > [bt] [WRN] hci_cmd_done: pool id 1 pool 0x00405098 != &hci_cmd_pool 0x00405078 > > Is this a known issue? Could someone please tell me the possible cause > of this error and how to fix it possibly? Thanks. What version of Zephyr is this with? I've noticed that sometimes there seems to be some garbage data inserted to the virtual UART between btproxy and qemu, and restarting qemu usually helps with that. I've at least seen the first error when that happens. Johan
|
|
Re: qemu_x86 zephyr bluetooth beacon sample error
Hi Priyanka,
On Tue, Sep 05, 2017, Priyanka Rawat wrote: While running the bluetooth sample "beacon" for the target qemu_x86,What version of Zephyr is this with? I've noticed that sometimes there seems to be some garbage data inserted to the virtual UART between btproxy and qemu, and restarting qemu usually helps with that. I've at least seen the first error when that happens. Johan
|
|