schollz / find3-cli-scanner

The command-line scanner that supports Bluetooth and WiFi
https://www.internalpositioning.com/doc/tracking_your_computer.md
149 stars 55 forks source link

Cannot launch find3-cli-scanner from Mac OSX #4

Closed phadkead closed 6 years ago

phadkead commented 6 years ago

I followed all the steps from https://www.internalpositioning.com/doc/tracking_your_computer.md and I am trying to launch find3-cli-scanner from docker instance, but it gives following exception:

2018-03-27 02:00:14 [INFO] main.go main:76 scanning with en0
2018-03-27 02:00:14 [ERROR] utils.go RunCommand:40 exit status 1: /sbin/iw dev en0 scan -u
2018-03-27 02:00:15 [ERROR] main.go basicCapture:164 json: cannot unmarshal number into Go value of type main.Response

Looks like docker image is not able to access wifi. Inside docker image:

root@linuxkit-025000000001:/# iwconfig
tunl0     no wireless extensions.
lo        no wireless extensions.
ip6tnl0   no wireless extensions.
docker0   no wireless extensions.
eth0      no wireless extensions.

Is there any workaround to run the scanner from Mac OSX?

schollz commented 6 years ago

Weird, I thought it would but I never tested (I don't have any apple stuff).

I think I can support the Apple natively. Can you just double check for me, run the scanning command:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s

And see if it has similar output to this:

                            SSID BSSID             RSSI CHANNEL HT CC SECURITY (auth/unicast/group)
                     xfinitywifi 22:86:8c:d5:30:d8 -82  11      Y  US NONE
                    XFSETUP-30DA 10:86:8c:d5:30:d8 -81  11      Y  US WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP)
                           RGNWG 00:7f:28:8b:0c:1d -74  11      Y  -- WPA2(PSK/AES,TKIP/TKIP)
                XFSETUP-30DA_EXT 74:44:01:35:46:34 -75  11      Y  -- WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP)
                        traviata 20:e5:2a:16:79:d4 -73  11,-1   Y  -- WPA2(PSK/AES/AES)
                     xfinitywifi 4e:7a:8a:1d:7e:cc -70  6       Y  US NONE
                     xfinitywifi e6:89:2c:1a:02:e0 -91  6       Y  US NONE
                       HOME-02E2 e8:89:2c:1a:02:e0 -92  6       Y  US WPA(PSK/TKIP,AES/TKIP) WPA2(PSK/TKIP,AES/TKIP)
                          threeR 3c:7a:8a:1d:7e:cc -70  6       Y  US WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP)
                       NETGEAR13 50:6a:03:93:89:e3 -91  1       Y  -- WPA2(PSK/AES/AES)
                           Ewifi 08:86:3b:6d:bc:16 -53  1       Y  TW WPA(PSK/AES/AES) WPA2(PSK/AES/AES)
                         namaste c0:ff:d4:e6:dd:2b -67  1       Y  -- WPA2(PSK/AES/AES)
                  ForzaRoma 5GHz 60:a4:4c:29:8b:44 -88  157,+1  Y  -- WPA2(PSK/AES/AES)
                          Ewifi5 08:86:3b:6d:bc:18 -66  153,-1  Y  -- WPA(PSK/AES/AES) WPA2(PSK/AES/AES)
schollz commented 6 years ago

Also, is there any command-line utility to do something similar with Bluetooth in OSX? Do you have btmgmt installed? (Install bluez or something similar)

phadkead commented 6 years ago

Yes I can see similar output for command /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s

I am not sure about command line utility for Bluetooth in OSX though

schollz commented 6 years ago

@phadkead It should now work natively on OS X