0

Router Crashes on receiving serial packet (SLAP)

asked 2015-04-24 01:00:45 -0700

TheHindenburg gravatar image

updated 2015-04-24 01:03:48 -0700

I've been trying to have a Router and a Thin Client talk to one another over a Serial connection and as such tried to enable SLAP on both ends and then run the two in Linux while simulating a connection over Virtual Serial Ports(socat).

But when I ran the two together the Alljoyn Daemon crashed immediately after getting the CONN Packet from the Thin Client.

Changes made:

  1. On the Router end I just changed the alljoyn_core/router/posix/alljoyn-daemon.cc file to initialize SLAP with one of the Virtual Ports I had started.

    From this:

    From This:

    To this:

    image description

  2. On the Thin Client end I used the btle-transport branch code and did the Serial Port programming for Linux.

Here are images of the output:

  1. Thin Client:
ubuntu@Ankit:~/allseen/btle-transport/ajtcl$ samples/basic/./basic_client                                                                                                 
Reminder: Object not yet added to the ObjectList, do not for get to call RegisterObjects


(Basic Client Introspection)


AJ_Serial_Up
Linux Serial setup
Initializing serial transport
AJ_SerialTargetInit
AJ_SetTxSerialTransmit
AJ_SetTxCB
AJ_SetRxCB
Checking for Recieved Data : Received Nothing.
Checking for Recieved Data : Received Nothing.
Send CONN
Checking for Recieved Data : Received Nothing.
AJ_TX: 12
192 0 14 0 4 67 79 78 78 94 251 192
runTx: 12
Writing to Port
Checking for Recieved Data : 192 0 14 0 4 65 67 80 84 175 20                                                                                                 7 192
readBytesFromUart: 12


Classifying Packet as ACPT
Send NEGO
Checking for Recieved Data : Received Nothing.
Checking for Recieved Data : Received Nothing.
QueueUnreliable: type 14 unreliable packet already queued! 0                                                                                                 x1e1d8f0
Send NEGO
Checking for Recieved Data : Received Nothing.
Checking for Recieved Data : Received Nothing.
QueueUnreliable: type 14 unreliable packet already queued! 0                                                                                                 x1e1d8f0
Send NEGO
Checking for Recieved Data : Received Nothing.
Checking for Recieved Data : Received Nothing.
QueueUnreliable: type 14 unreliable packet already queued! 0                                                                                                 x1e1d8f0
Send NEGO
Checking for Recieved Data : Received Nothing.
^C
ubuntu@Ankit:~/allseen/btle-transport/ajtcl$
  1. Router: The error seems to be a double free or corruption error which usually come up when you try to free the same memory twice or access already freed memeory

ubuntu@Ankit:~/allseen/alljoyn-14.12.00b-src$ build/linux/x86_64/debug/dist/cpp/bin/./alljoyn-daemon
AllJoyn Message Bus Daemon version: v14.12.00b
Copyright (c) 2009-2015 AllSeen Alliance.

Build: AllJoyn Library v14.12.00b (Built Fri Apr 24 07:33:46 UTC 2015 by ubuntu)
Setting up transport for address: slap:type=uart,dev=/dev/pts/4,baud=115200
Setting up transport for address: tcp:iface=*,port=9955
Setting up transport for address: udp:iface=*,port=9955
Setting up transport for address: unix:abstract=alljoyn
   0.549 ****** ERROR NETWORK external          common/os/posix/Socket.cc:370 | Binding (sockfd = 41) to @alljoyn: 98 - Address already in use: ER_OS_ERROR
   0.549 ****** ERROR ALLJOYN external          ...aemonTransportPosix.cc:340 | DaemonTransport::ListenFd(): Bind() failed: ER_OS_ERROR
   0.550 ****** ERROR NETWORK                   common/os/posix/Socket.cc:346 | Binding (sockfd = 33) to 0.0.0.0 9955: 98 - Address already in use: ER_OS_ERROR
   0.551 ****** ERROR TCP                       ...outer/TCPTransport.cc:4318 | TCPTransport::HandleNetworkEventInstance(): Failed to bind to 0.0.0.0 ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-04-30 02:36:07 -0700

TheHindenburg gravatar image

Well, whatever the issue was it got fixed with the 15.04 release. No idea why it was crashing though, probably something to do with threads but that's just a guess on my part.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-04-24 01:00:45 -0700

Seen: 334 times

Last updated: Apr 30 '15