socketcand
socketcand copied to clipboard
Error in beacon send()
when i run it like this : socketcand -v -i wlan0 -p 29536 -l 192.168.16.112 ,it report "Error in beacon send()" ,what does this mean ? i run it on my laptop by the way . Is this a bug ?
The first thing that comes to my mind is that the -i parameter is to specify your can interface(s) and not your network interface. It should be something like -i can0 or -i vcan0. If you specify an ip address with -l you should make sure that one of your interfaces (e.g. wlan0) has that ip address assigned. Is that the case?
I'm running it on a board with legitimate can interfaces ./socketcand -v -i can0,can1 -l 192.168.1.1 and I'm getting this issue as well
hello. with usbtin working properly:
sudo socketcand -i slcan0 -l 192.168.66.1 Error in beacon send()
the same result with -l lo -l eth0 -l wlan0 -l 127.0.0.1
Same thing for me when using socketcand -i vcan0 :(
and again using a pi, pican2 and socketcand -i can0 Error in beacon send()
Did any one got this issue solved ?
I'm sorry that this hasn't been maintained. Have you tried using this fork here? I noticed some commits with regards to the beacon handling. https://github.com/hartkopp/socketcand
Please check your target board's ip address configuration.
If you havn't config the bcast it will report that 'Error in beacon send()' due to the broadcast address is not valid.
eth0 Link encap:Ethernet HWaddr 08:00:27:00:01:92
inet addr:10.11.12.13 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:468 errors:0 dropped:8 overruns:0 frame:0
TX packets:392 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:163560 (159.7 KiB) TX bytes:24099 (23.5 KiB)
# ./socketcand -i can0 -l eth0 -v
Verbose output activated
Using network interface '10.11.12.13'
Listen adress is 0.0.0.0
Broadcast adress is 0.0.0.0
creating broadcast thread...
binding socket to 0.0.0.0:29536
Error in beacon send()
Solution:
# ifconfig eth0 10.11.12.13 netmask 255.255.255.0 broadcast 10.11.12.255
# ./socketcand -v -l eth0
Verbose output activated
Using network interface 'eth0'
Listen adress is 10.11.12.13
Broadcast adress is 10.11.12.255
creating broadcast thread...
binding socket to 10.11.12.13:29536
^Creceived SIGINT
closing listening socket
closing client socket
And can found those desc strings from wireshark:
1266 22917.124668183 UDP 3c43414e426561636f6e206e616d653d226275696c64726f... 46878 → 42000 Len=136
0000 ff ff ff ff ff ff 08 00 27 00 01 92 08 00 45 00 ÿÿÿÿÿÿ..'.....E.
0010 00 a4 0e 5a 40 00 40 11 fe cd 0a 0b 0c 0d 0a 0b .¤.Z@.@.þÍ......
0020 0c ff b7 1e a4 10 00 90 4a ee 3c 43 41 4e 42 65 .ÿ·.¤...Jî<CANBe
0030 61 63 6f 6e 20 6e 61 6d 65 3d 22 62 75 69 6c 64 acon name="build
0040 72 6f 6f 74 22 20 74 79 70 65 3d 22 53 6f 63 6b root" type="Sock
0050 65 74 43 41 4e 22 20 64 65 73 63 72 69 70 74 69 etCAN" descripti
0060 6f 6e 3d 22 73 6f 63 6b 65 74 63 61 6e 64 22 3e on="socketcand">
0070 0a 3c 55 52 4c 3e 63 61 6e 3a 2f 2f 31 30 2e 31 .<URL>can://10.1
0080 31 2e 31 32 2e 31 33 3a 32 39 35 33 36 3c 2f 55 1.12.13:29536</U
0090 52 4c 3e 3c 42 75 73 20 6e 61 6d 65 3d 22 76 63 RL><Bus name="vc
00a0 61 6e 30 22 2f 3e 3c 2f 43 41 4e 42 65 61 63 6f an0"/></CANBeaco
00b0 6e 3e n>