Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P2P/Roku ssids crash server #15

Open
ConnorRigby opened this issue Sep 15, 2018 · 2 comments
Open

P2P/Roku ssids crash server #15

ConnorRigby opened this issue Sep 15, 2018 · 2 comments
Assignees
Labels

Comments

@ConnorRigby
Copy link
Contributor

00:02:22.438 [error] GenServer :"Nerves.WpaSupplicant.wlan0" terminating
** (MatchError) no match of right hand side value: ["p2p_group_client: dev", "b8:a1:75:5e:22:c0 iface", "b8:a1:75:5e:22:c0 dev_capab", "0x20 config_methods", "0x8004 dev_type", "2-0050F204-2 dev_name", "'                                '"]
    (nerves_wpa_supplicant) lib/nerves_wpa_supplicant/messages.ex:153: anonymous fn/2 in Nerves.WpaSupplicant.Messages.kv_resp/1
    (elixir) lib/list.ex:187: List."-foldl/3-lists^foldl/2-0-"/3
    (nerves_wpa_supplicant) lib/nerves_wpa_supplicant.ex:242: Nerves.WpaSupplicant.handle_wpa/2
    (stdlib) gen_server.erl:637: :gen_server.try_dispatch/4
    (stdlib) gen_server.erl:711: :gen_server.handle_msg/6
    (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: {#Port<0.123>, {:data, "id=9\nbssid=b8:a1:75:83:72:f5\nfreq=2462\nbeacon_int=100\ncapabilities=0x0511\nqual=0\nnoise=-89\nlevel=-71\ntsf=0000000000000000\nage=0\nie=00164449524543542d726f6b752d3139302d36463137363801088c129824b048606c03010b0706555320010b1e200100230212002a01002f010030140100000fac040100000fac040100000fac0208002d1abc1916ffff0000000000000000000000000000000000000000003d160b0013000000000000000000000000000000000000007f080400000000000040dd090010180201004c0000dd180050f2020101800003a4000027a4000042435e0062322f00dd050050f20500dda50050f204104a0001101044000102103b0001031047001022210203040506070809b8a1758372f510210004526f6b751023000a526f6b7520537469636b1024001933363030582076657220382e3130206275696c6420343134351042000c35532a2a2a2a2a2a2a3139301054000800060050f2040001101100164449524543542d726f6b752d3139302d364631373638100800020000103c0001011049000600372a000120dd71506f9a09020200372b0d2500baa1758372f3008000070050f20400010010110010526f6b7520537469636b202d203139300e3d003cb8a1755e22c0b8a1755e22c020800400020050f204000200101100202020202020202020202020202020202020202020202020202020202020202020dd16506f9a0a00000601111c4400960a0006baa1758372f3\nflags=[WPA2-PSK-CCMP][WPS][ESS][P2P]\nssid=DIRECT-roku-190-6F1768\nwps_state=configured\nwps_primary_device_type=6-0050F204-1\nwps_device_name=DIRECT-roku-190-6F1768\nwps_config_methods=0x0000\np2p_dev_capab=0x37\np2p_group_capab=0x2b\np2p_primary_device_type=7-0050F204-1\np2p_device_name=Roku Stick - 190\np2p_device_addr=ba:a1:75:83:72:f3\np2p_config_methods=0x80\np2p_group_client: dev=b8:a1:75:5e:22:c0 iface=b8:a1:75:5e:22:c0 dev_capab=0x20 config_methods=0x8004 dev_type=2-0050F204-2 dev_name='                                '\nsnr=18\nest_throughput=48000\n"}}
State: %Nerves.WpaSupplicant{ifname: "wlan0", port: #Port<0.123>, requests: [{{#PID<0.463.0>, #Reference<0.2612488931.268697601.250103>}, {:BSS, 9}}]}
@aaronrenner
Copy link

I am also seeing this behavior when I scan for wifi networks with my both my rpi0w and rpi3.

** (exit) exited in: GenServer.call(#PID<0.1427.0>, :scan, 30000)
    ** (EXIT) an exception was raised:
        ** (MatchError) no match of right hand side value: ["p2p_group_client: dev", "ac:3a:7a:2a:da:ef iface", "ac:3a:7a:2a:da:ef dev_capab", "0x20 config_methods", "0x8004 dev_type", "2-0050F204-2 dev_name", "'SDK Oz3000 Reference Keypad     '"]
            (nerves_wpa_supplicant) lib/nerves_wpa_supplicant/messages.ex:153: anonymous fn/2 in Nerves.WpaSupplicant.Messages.kv_resp/1
            (elixir) lib/list.ex:187: List."-foldl/3-lists^foldl/2-0-"/3
            (nerves_wpa_supplicant) lib/nerves_wpa_supplicant.ex:242: Nerves.WpaSupplicant.handle_wpa/2
            (stdlib) gen_server.erl:637: :gen_server.try_dispatch/4
            (stdlib) gen_server.erl:711: :gen_server.handle_msg/6
            (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
    (elixir) lib/gen_server.ex:924: GenServer.call/3

I'm just running the following commands from iEX

iex(1)> :ok = Nerves.Network.setup "wlan0"
iex(2)> Nerves.Network.scan "wlan0"

ConnorRigby added a commit that referenced this issue Oct 31, 2018
This only prevents crashing. It doesn't actually
properly parse the message causing the crash in #15
ConnorRigby added a commit that referenced this issue Oct 31, 2018
This only prevents crashing. It doesn't actually
properly parse the message causing the crash in #15
ConnorRigby added a commit that referenced this issue Oct 31, 2018
This only prevents crashing. It doesn't actually
properly parse the message causing the crash in #15
@aaronrenner
Copy link

Here's the full WPA supplicant response from the roku, that can't be decoded:

00:01:09.950 [debug] Failed to decode response: "id=2\nbssid=ac:3a:7a:84:9a:1d\nfreq=2462\nbeacon_int=100\ncapabilities=0x0511\nqual=0\nnoise=-89\nlevel=-49\ntsf=0000000000000000\nage=0\nie=00164449524543542d726f6b752d3331382d35314442343101088c129824b048606c03010b0706555320010b1e200100230210002a01002f010030140100000fac040100000fac040100000fac0208002d1abc1916ffff0000000000000000000000000000000000000000003d160b0013000000000000000000000000000000000000007f080400000000000040dd090010180201004c0000dd180050f2020101800003a4000027a4000042435e0062322f00dd050050f20500dd9c0050f204104a0001101044000102103b0001031047001022210203040506070809ac3a7a849a1d10210004526f6b7510230006536f66744150102400142076657220382e3130206275696c6420343133311042000c324c2a2a2a2a2a2a2a3331381054000800060050f2040001101100164449524543542d726f6b752d3331382d353144423431100800020000103c0001011049000600372a000120dd6c506f9a09020200272b0d2000ae3a7a849a1b008000070050f2040001001011000b4c6976696e6720526f6f6d0e3d003cac3a7a2adaefac3a7a2adaef20800400020050f2040002001011002053444b204f7a33303030205265666572656e6365204b65797061642020202020dd16506f9a0a00000601111c4400960a0006ae3a7a849a1b\nflags=[WPA2-PSK-CCMP][WPS][ESS][P2P]\nssid=DIRECT-roku-318-51DB41\nwps_state=configured\nwps_primary_device_type=6-0050F204-1\nwps_device_name=DIRECT-roku-318-51DB41\nwps_config_methods=0x0000\np2p_dev_capab=0x27\np2p_group_capab=0x2b\np2p_primary_device_type=7-0050F204-1\np2p_device_name=Living Room\np2p_device_addr=ae:3a:7a:84:9a:1b\np2p_config_methods=0x80\np2p_group_client: dev=ac:3a:7a:2a:da:ef iface=ac:3a:7a:2a:da:ef dev_capab=0x20 config_methods=0x8004 dev_type=2-0050F204-2 dev_name='SDK Oz3000 Reference Keypad     '\nsnr=40\nest_throughput=65000"

Thanks for fixing the crash issue so I could grab this string.

@ConnorRigby ConnorRigby self-assigned this Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants