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

Added BSSID scan result #425

Closed
wants to merge 7 commits into from
Closed

Added BSSID scan result #425

wants to merge 7 commits into from

Conversation

kennethlimcp
Copy link
Contributor

Sample output:

GOOD DAY, WIFI TESTER AT YOUR SERVICE!!!
WIFI_SCAN:;checking command: WIFI_SCAN:;
SCAN_START
xxx,-73,0x08:0x0F:0x0E:0x0D:0x03:0x04
kenken,-45,0x0C:0x05:0x02:0x01:0x06:0x02
xxx,-76,0x06:0x06:0x09:0x03:0x0C:0x05
xxxxxx,-76,0x02:0x00:0x0F:0x02:0x06:0x09
xxxx,-58,0x00:0x0C:0x06:0x0C:0x09:0x02
SCAN_STOP

@mdma, seems like the Atom editor i'm using stripped the tabs/spaces. Let me know if that's not ok and i will try to re-do it again!

Sample output:
```
GOOD DAY, WIFI TESTER AT YOUR SERVICE!!!
WIFI_SCAN:;checking command: WIFI_SCAN:;
SCAN_START
xxx,-73,0x08:0x0F:0x0E:0x0D:0x03:0x04
kenken,-45,0x0C:0x05:0x02:0x01:0x06:0x02
xxx,-76,0x06:0x06:0x09:0x03:0x0C:0x05
xxxxxx,-76,0x02:0x00:0x0F:0x02:0x06:0x09
xxxx,-58,0x00:0x0C:0x06:0x0C:0x09:0x02
SCAN_STOP
```
@m-mcgowan
Copy link
Contributor

The changes look good to me (would have been easier to see the actual changes without all the whitespace changes! :-P)

Rather than printing out 0x in front of each octet, it's more customary to just print the octet, separated by a colon. E.g. 08:0F:0E:0D:03:04 for the first example.

In wlan_scan_callback in wifitester.cpp, check that ssid is not NULL before copying with memcpy. (This is my code, so I should have done this, just an oversight.)

@kennethlimcp
Copy link
Contributor Author

Just to confirm the syntax should be: (https://github.com/spark/firmware/blob/develop/system/src/wifitester.cpp#L163)

if(ssid != NULL){
   ------
    }

Will checking ssid_len for 0 be doing the same thing?

- check for NULL results
- list BSSID first for nice formatting
- use ":" for mac octet
@kennethlimcp
Copy link
Contributor Author

@m-mcgowan it's done :)

SCAN_START
00:00:00:00:00:00,kenken,-58
00:00:00:00:00:00,Yiiiii,-84
00:00:00:00:00:00,1008,-63
SCAN_STOP

Spoofing the BSSID and not an error

@m-mcgowan
Copy link
Contributor

Cool,are the BSSIDs correct? Or is that just an example?

@kennethlimcp
Copy link
Contributor Author

@m-mcgowan , they are correct on my side. (i.e not 00:00:00:00) :)

tester.serialPrint(",");
itoa(rssi, str_ssid, 10);
tester.serialPrintln(str_ssid);
if(ssid != NULL){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When ssid is NULL you can still use bssid, just not ssid. So the code that deails with bssid can come out of the loop. When ssid is null, just set str_ssid to an empty string: str_ssid[0] = 0;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok got it! Might need to wait for more tests. reading BSSID with no SSID has some hang issue in our tests

@m-mcgowan
Copy link
Contributor

Hi there @kennethlimcp! Any status updates on this? Is it still something you'd like to merge? Something to keep in mind is that we will have the WiFi.scan() API soon if that's a good alternative.

@kennethlimcp
Copy link
Contributor Author

@m-mcgowan i'm happy to close this and rebase once the scan() API is available.

Thanks! I'm sure it will be useful for people since identifying various AP will be useful. ;)

@m-mcgowan
Copy link
Contributor

We now have WiFi.scan() (#568) which provides the BSSID as part of the result, so I'm going to close out this PR without merging. I hope the new API gives you what you need.

@m-mcgowan m-mcgowan closed this Aug 25, 2015
technobly added a commit that referenced this pull request Dec 22, 2016
a892020 unifying Since x.x.x firmware version messages
b153672 Since 0.7.0 -> Since 0.6.1
52a6313 Merge commit '60e0e09d54c2b5c1ebe875861da77a306d3c785b' into prerelease-dup
9dac290 More typos fixed
5295a53 corrected grammar (#524)
9f4b24b Spell check docs
fcca5c6 occaisonal --> occasional
60e0e09 Reference documentation
ef0dad7 Merge pull request #1190 from spark/feature/setup-button-mirror
d2eb670 Merge pull request #1195 from spark/fix/revert_publish_api
05d0200 Merge branch 'develop' into feature/listen-timeout
2b43c71 grammatical error
878ba19 Revert Particle.publish() API changes; docs for WITH_ACK flag
b7030c5 Update firmware.md
d84a942 Add advanced process control
fa03d96 Fix broken link on firmware page
03b8a78 Document Process::run
08047a0 EEPROM is borken on RPi
566a869 buttonMirror() documentation
ea100c7 Support for `Serial1` is not complete
468b33d Raspberry Pi I2C firmware docs
32e5ba4 Remove software timers from RPi docs.
26d7251 Merge branch 'develop' into feature/conn_state_events
e15b410 added v0.6.0 firmware notes
38614db adds Docs for set|getListenTimeout()
9949e2d adds usb-serial1 device tags
eee29b2 cleanup serial2 and manual edits from last merge with conflicts
616330f Merge branch 'master' into prerelease
4590339 Update firmware docs to use device features
8e1149f Add device feature flags
62312f0 Add Raspberry Pi to firmware, tools and guides
7168402 Update firmware.md
c93d248 Clarification of retained SRAM size
73f2e00 corrected typo 'sequencially' to 'sequentially'
648234c Merge pull request #468 from spark/feature/usb-docs-0.6.0
d3e5eba Reference docs
7794203 Merge branch 'master' into prerelease
edcf989 adds link to freertos4core particle library
1ffdd80 time_changed system event
dbc5d03 Time.isValid(), Particle.syncTimeDone()/syncTimePending()/timeSyncedLast() documentation
c380dfd [optional] needs to include the optional comma too
6f5c96d Merge branch 'master' into prerelease
6cf14d1 Update firmware.md
6e6e216 Merge branch 'master' into prerelease
f2cf630 adding notes for 0.5.1 and 0.5.2 firmware versions
6249120 adds reference.hbs back to firmware.md
6fa5464 ensure firmwareversions.js only loads on firmware.md aka firmware reference
4fc16b8 added CLI version, electron part 2/3 options and downgrading instructions
ad530eb Separate Firmware Release and Formatting Tweaks
aafbabe Create possibility for passing variables thorugh query params, for Firmware Releases
25cab35 Fixes typo
1aa4c18 Add B0-B5, C0-C5 to GPIO list in note for electron
c857e8a Merge branch 'master' into prerelease
dac4690 Keyboard and Mouse documentation
8d974bf Updated Serial documentation
fd24a4d Merge pull request #467 from dougalcampbell/patch-1
4d75a59 Missing doc for TCPClient(buffer, len)
1b667e5 Use `hostname` instead of `URL` terminology
d0e5903 Merge commit '568ceade3e1481cdb00dcdf51a97a737750a96bb' from firmware-docs into staging
d49ac39 Merge branch 'master' into feature/tutorials
e205803 Makes tests pass, fixing broken dashboard links
66a1955 Fix your product id link
81f7eb6 More Dashboard -> Console
266e459 fixed: markdown for threading docs
4f615c9 missing markdown for interrupts example
568cead Daylight Saving Time (DST) documentation
a696d8a new analogRead() pinMode behavior for 0.5.3 system firmware
aa2994a Fix description of sleep(pin, edge)
5c049dc fix typos
b69e421 Typo in SoftAP example
be62c64 Clarify behavior of 0 seconds in System.sleep() (#425)
838d6c7 missing parameters for printlnf()
7503310 relocated note
62acc8d missed # in condition 😊
f50a589 Update firmware.md
7bc380b Note WKP for deep sleep
af77e5e Merge branch 'feature/reset-network-flag' into develop
405e9e9 Documentation fixes
0415ab4 API docs
0e0a691 Minor fixes
53f993b API docs for logging attributes
18483a2 Merge pull request #991 from spark/feature/dac-pwm-resolution
747f8d0 Merge pull request #997 from spark/feature/serial-config
26eaba8 Merge pull request #998 from spark/feature/logger_api
b7f3081 Update flush() documentation
af32b6b Store last reset reason and publish it to the cloud (#944)
08d2d42 USART configuration documentation
20ebf60 API docs
29e91a1 reduce datausage on reset/wakeup (#953)
6665b03 typo
4caa81c One carriage return isn't enough to make a new paragraph (#414)
a4f05d6 Fix typo in handlebar if
c790bcb Take out factory reset for anything but the Core
d41c053 WIFI_CONNECT_NO_LISTEN actually is WIFI_CONNECT_SKIP_LISTEN
4db5752 Increase documented number of cloud functions and variables (#397)
80ff0e9 Add PRODUCT_ID to the firmware docs
dc99c6e Reword cloud function #389
66f4acf analogWriteResolution documentation
3602095 Fix layout in Serial.begin()
df96c32 Clarify include header for Serial2
761f7c4 explicitly show the particle.function protype
6667d16 add a single letter, whenver->whenever
79ea057 Wire.stretchClock() feature enabled by default for I2C Slave mode
f3ad8b5 made firmware.md a symlnk on linux...didn't take on OS X

git-subtree-dir: docs/reference
git-subtree-split: a892020dc28f10d348c813f63e77099993ecf5f6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants