Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 8 months ago.
How can rn-171 scan command output be processed in nxp 1768?
Hello....I am using a rn-171 wifly module with mbed application board for my project. And looking for ways to process the scan command output form the wifly module. In datasheet the output for send command will be similar to this
SCAN:Found 1
01,01,-59,04,1104,28,c0,20:4e:7f:08:df:85,dad-rules
END:
I need to process the rssi -59 and mac address c0,20:4e:7f:08:df:85.
Could you please help me with that I haven't found anything relevant to this. Asim Iftikhar
1 Answer
10 years, 8 months ago.
Hi Asim,
I don't have a WiFly module available right now, so this pseudo-code has not been compiled -
#include "WiflyInterface.h" WiflyInterface eth(your port pin assignments); char scanResults[1000]; // how much are we expecting? #define srSize (sizeof(scanResults)/sizeof(scanResults[0])) eth.init(); res = eth.sendCommand("scan\r", NULL, scanResults, srSize); if (res) { // see the strtok example for parsing the results... }
See example use of strtok function.