-->
Page 1 of 1

Howto find/extract details in a string?

PostPosted: Sat Aug 15, 2015 5:25 pm
by mano1979
I use nodemcu as firmware...

If i get the list of available acces-points like this:

mol guest : 4,-89,36:31:c4:5c:8b:16,1
UPC1377914 : 4,-92,8c:04:ff:13:4c:d0,11
plop : 4,-93,20:cf:30:0e:ed:69,1
UPC286147 : 3,-80,70:54:d2:b1:52:59,11
UPC244510037 : 3,-95,f8:04:2e:3e:45:c8,6
VGV75198F9ABF : 3,-82,84:9c:a6:8f:9a:bf,8
VGV751928E090 : 3,-84,4c:09:d4:28:e0:90,8
mol : 4,-91,34:31:c4:5c:8b:16,1
Ziggo : 0,-81,72:54:d2:b1:52:5b,11

How would i extract the signal strenght? (mol guest : 4,-->-89<--,36:31:c4:5c:8b:16,1 (between the arrows)
Ofcourse in the LUA (nodemcu) language.

Whati want to do is scan for a specific ssid/network and then check the signal strength...

Re: Howto find/extract details in a string?

PostPosted: Sun Aug 16, 2015 11:22 am
by GerryKeely
Hi

Perhaps the string.sub and string.find Lua functions as used in this program could be of use

http://benlo.com/esp8266/esp8266Project ... googleTime

regards
Gerry

Re: Howto find/extract details in a string?

PostPosted: Tue Aug 18, 2015 10:04 am
by mano1979
indeed! I gotit to work.