I am running on an i.MX6 the picoserver app
https://github.com/seL4/camkes/tree/master/apps/picoserver
Both the echo and listener components print out to serial:
listener instance starting up, going to be listening on 10.0.0.2:4321
echo instance starting up, going to be listening on 10.0.0.2:1234
but only the echo component receives PicoTCP events:
Assigned ipv4 10.0.0.2 to device eth0
IPv6: DAD verified valid address.
echo: Connection established with 10.0.0.1 on socket 1
echo: Received a message on socket 3, going to echo to Listener
echo: Received a message on socket 3, going to echo to Listener
echo: Received a message on socket 3, going to echo to Listener
Note that the listener component does not even print out "Connection
established".
I tried to figure out why, and found out that by editing this part of picoserver.camkes:
/*
* The attributes of the *_(control/send/recv) interfaces should be the same and
unique between
* different components, this determines the client ID of this component with
respect to
* the PicoServer component
*/
echo.echo_control_attributes = "1";
echo.echo_recv_attributes = "1";
echo.echo_recv_shmem_size = 0x1000;
echo.echo_send_attributes = "1";
echo.echo_send_shmem_size = 0x1000;
echo.ip_addr = PICOSERVER_IP_ADDR;
/*
* Listener config
*/
listener.listener_control_attributes = "2";
listener.listener_recv_attributes = "2";
listener.listener_recv_shmem_size = 0x1000;
listener.listener_send_attributes = "2";
listener.listener_send_shmem_size = 0x1000;
listener.ip_addr = PICOSERVER_IP_ADDR;
and changing the attributes to this:
/*
* The attributes of the *_(control/send/recv) interfaces should be the same and
unique between
* different components, this determines the client ID of this component with
respect to
* the PicoServer component
*/
echo.echo_control_attributes = "0";
echo.echo_recv_attributes = "0";
echo.echo_recv_shmem_size = 0x1000;
echo.echo_send_attributes = "0";
echo.echo_send_shmem_size = 0x1000;
echo.ip_addr = PICOSERVER_IP_ADDR;
/*
* Listener config
*/
listener.listener_control_attributes = "1";
listener.listener_recv_attributes = "1";
listener.listener_recv_shmem_size = 0x1000;
listener.listener_send_attributes = "1";
listener.listener_send_shmem_size = 0x1000;
listener.ip_addr = PICOSERVER_IP_ADDR;
then listener will print that it has connected to echo, but now echo will not print out
anything.
How do I make both echo and listener print out on the serial port?
Which part of the code looks at echo.echo_recv_attributes = "1"; and
listener.listener_recv_attributes = "2"; in order to determine the client ID of
the echo and listener components with respect the PicoServer component? From what I can
tell, attributes was not declared as an actual attribute.