Topics

Need help in establishing client-server socket communication between my Ubuntu PC and PCA10056 board, on which Zephyr is running. #nrf52840 #samples


giriprasad@...
 

Thanks Marc,

I have verified that and it is fine. As mentioned in the previous mails, I am suspecting on the changes that I have made in the file "zephyr/subsys/net/l2/ethernet/ethernet.c". Although, I am not supposed to make changes in that file, I made them for my testing purpose and ping is working only with those changes. Apart from the changes I have mentioned, I haven't done any other changes to the lower layers of Zephyr. I have just done few configurations in the application layer. I am not sure, why enc28j60 is not working directly with Zephyr. Please help me in this regards. Please let me know if more information is needed.

Regards,
Giri


Jukka Rissanen
 

Hi Giri,

can you create an issue in github for this. Trying to resolve your issue in mailing list is not very effective.

Cheers,
Jukka


On Thu, 2019-09-26 at 02:19 -0700, giriprasad@... wrote:
But, without those changes, if I am trying to ping the board on which Zephyr is running, it is not responding to ping requests and wireshark capture in this scenario can be found in the attached file. I am unable to figure out where the mistake is happening. I have been trying in different ways but in vain. Is there any suggestions or check points to resolve this issue. Please help...

Thanks & Regards,
Giri Prasad N.
_._,_._,_


giriprasad@...
 

But, without those changes, if I am trying to ping the board on which Zephyr is running, it is not responding to ping requests and wireshark capture in this scenario can be found in the attached file. I am unable to figure out where the mistake is happening. I have been trying in different ways but in vain. Is there any suggestions or check points to resolve this issue. Please help...

Thanks & Regards,
Giri Prasad N.


Marc Herbert
 

On 24 Sep 2019, at 02:20, giriprasad@... wrote:

Thanks for the reply. I have verified the ufw status and it is inactive. Is it enough to say that firewall is disabled.
It should but might not be enough because ufw is just a user interface. Use "ip[6]tables -L" to verify the actual state.


Jukka Rissanen
 

The changes that you do there basically turn off ARP, the end result is that the IPv4 connectivity cannot work properly after this.

Cheers,
Jukka


On Wed, 2019-09-25 at 04:15 -0700, giriprasad@... wrote:
Hi Jukka,

"net iface" is returning a valid mac address. But for my Ethernet to work, I have tweaked Zephyr code. I have posted about it in another topic of this mailing list. Please follow this linkĀ https://lists.zephyrproject.org/g/devel/message/6325
Please let me understand the problem I am facing, as mentioned in the above link. I am suspecting that, this is causing the issue. Please help me in this regards.

Thanks & regards,
Giri.


giriprasad@...
 

Hi Jukka,

"net iface" is returning a valid mac address. But for my Ethernet to work, I have tweaked Zephyr code. I have posted about it in another topic of this mailing list. Please follow this linkĀ https://lists.zephyrproject.org/g/devel/message/6325
Please let me understand the problem I am facing, as mentioned in the above link. I am suspecting that, this is causing the issue. Please help me in this regards.

Thanks & regards,
Giri.


Jukka Rissanen
 

Hi Giri,

yes, that is definitely a problem. The destination MAC address should be a valid unicast address. Does you ethernet board have a proper MAC address set to it? You can see the MAC address using "net iface" command in net-shell.

Cheers,
Jukka


On Tue, 2019-09-24 at 05:52 -0700, giriprasad@... wrote:
Hi Jukka,

I have verified the MAC address. Zephyr is sending the [SYN/ACK] packet with destination MAC address as "ff:ff:ff:ff:ff:ff", which is a broadcast address. Does this causing my ubuntu to not receive the packets?

Thanks & Regards,
Giri


giriprasad@...
 

Hi Jukka,

I have verified the MAC address. Zephyr is sending the [SYN/ACK] packet with destination MAC address as "ff:ff:ff:ff:ff:ff", which is a broadcast address. Does this causing my ubuntu to not receive the packets?

Thanks & Regards,
Giri


Jukka Rissanen
 

Hi Giri,

You could also verify from wireshark that the MAC addresses are
correctly set in the packets. If zephyr sends a packet
using wrong destination MAC address, then your ubuntu would not
receive it.

Cheers,
Jukka

On Tue, 2019-09-24 at 02:20 -0700, giriprasad@... wrote:
Hi,

Thanks for the reply. I have verified the ufw status and it is
inactive. Is it enough to say that firewall is disabled.

Regards,
Giri
_._,_._,_
Links:


giriprasad@...
 

Hi,

Thanks for the reply. I have verified the ufw status and it is inactive. Is it enough to say that firewall is disabled.

Regards,
Giri


Jukka Rissanen
 

Hi,

The text logs do not reveal anything useful (other than the zephyr
version used and that you are using ethernet + dhcp).

From the wireshark image, we can see that ubuntu does not receive the
SYN,ACK that zephyr sends as ubuntu tries to send SYN multiple times.
Perhaps there is a firewall that blocks the connection?

Cheers,
Jukka

On Mon, 2019-09-23 at 23:59 -0700, giriprasad@... wrote:
Hi Team,

I am running tcp socket client program in Ubuntu bash of Windows
subsystem for Linux and server program on PCA10056 board, on which
zephyr is running. I am able to establish connection and transfer
data between server and client. Please observe the zephyr debug log
of this, in the file attached with name
"socket_connection_log_zephyr_server_wsl_client.txt". Also observe
the log of wireshark running on Windows PC. File name is
"ws_log_sock_conn_zephyr_server_wsl_client.png"


After this, I have tried running the client code in the PC which is
running on Ubuntu OS. But, this time I am unable to establish
connection between my PC and PCA10056. Please observe the zephyr
debug log of this, in the file attached with name
"socket_connection_log_zephyr_server_ubuntu_client.txt". Also observe
the log of wireshark running on Ubuntu PC. File name is
"ws_log_sock_conn_zephyr_server_ubuntu_client.png".

I am unsure of this behavior. Please help me to establish connection
between Ubuntu PC and PCA10056. Please let me know, if more
information is needed.

Thanks & Regards,
Giri Prasad N.


giriprasad@...
 

Hi Team,

I am running tcp socket client program in Ubuntu bash of Windows subsystem for Linux and server program on PCA10056 board, on which zephyr is running. I am able to establish connection and transfer data between server and client. Please observe the zephyr debug log of this, in the file attached with name "socket_connection_log_zephyr_server_wsl_client.txt". Also observe the log of wireshark running on Windows PC. File name is "ws_log_sock_conn_zephyr_server_wsl_client.png"


After this, I have tried running the client code in the PC which is running on Ubuntu OS. But, this time I am unable to establish connection between my PC and PCA10056. Please observe the zephyr debug log of this, in the file attached with name "socket_connection_log_zephyr_server_ubuntu_client.txt". Also observe the log of wireshark running on Ubuntu PC. File name is "ws_log_sock_conn_zephyr_server_ubuntu_client.png".

I am unsure of this behavior. Please help me to establish connection between Ubuntu PC and PCA10056. Please let me know, if more information is needed.

Thanks & Regards,
Giri Prasad N.