Nice ! Solved. Thanks.
Here are the datas :
[{"id":"38fd6d46.07d862","type":"tab","label":"IWAP02","disabled":false,"info":""},{"id":"4a330da4.5ac7b4","type":"inject","z":"38fd6d46.07d862","name":"TEST IWAP02#","topic":"","payload":"IWAP02,zh_cn,0,7,460,0,9520|3671|13,9520|3672|12,9520|3673|11,9520|3674|10,9520|3675|9,9520|3676|8,9520|3677|7#","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":114,"y":132.7999906539917,"wires":[["b13eed31.409e9"]]},{"id":"b13eed31.409e9","type":"switch","z":"38fd6d46.07d862","name":"SORT INCOMING","property":"payload","propertyType":"msg","rules":[{"t":"regex","v":"^IWAP02","vt":"str","case":false}],"checkall":"true","repair":false,"outputs":1,"x":381.00000381469727,"y":143.8000030517578,"wires":[["97b7209d.3d45"]]},{"id":"168c17f3.e614a8","type":"comment","z":"38fd6d46.07d862","name":"INCOMING MESSAGES FROM THE WATCH","info":"","x":177.3000030517578,"y":22,"wires":[]},{"id":"e6d39b5d.4017e8","type":"comment","z":"38fd6d46.07d862","name":"OUTGOING MESSAGES TO THE WATCH","info":"","x":184.00000762939453,"y":355.8000297546387,"wires":[]},{"id":"f8900c11.a7614","type":"change","z":"38fd6d46.07d862","name":"IWBP02# ","rules":[{"t":"set","p":"payload","pt":"msg","to":"IWBP02# ","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":97.00000762939453,"y":428.80000591278076,"wires":[["2817006d.81197"]]},{"id":"2817006d.81197","type":"debug","z":"38fd6d46.07d862","name":"outgoing debug","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":864.3000106811523,"y":354.2000045776367,"wires":[]},{"id":"21466e3.35e1792","type":"change","z":"38fd6d46.07d862","name":"IWBP02 LBS ADDRESS","rules":[{"t":"set","p":"payload","pt":"msg","to":"ADDRESS NEEDED","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":152.00000762939453,"y":492.0000057220459,"wires":[["2817006d.81197"]]},{"id":"9cd8efdf.edd82","type":"inject","z":"38fd6d46.07d862","name":"TEST IWAP02_ADDRESS","topic":"","payload":"IWAP02,zh_cn,1,7,460,0,9520|3671|13,9520|3672|12,9520|3673|11,9520|3674|10,9520|3675|9,9520|3676|8,9520|3677|7,4,1|D8-24-BD-79-FA-1F|59&2|3C-46-D8-6D-CE-01|81&3|0C-4C-39-1A-7C-65|69&4|70-A8-E3-5D-D7-C0|65#","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":143,"y":211.00000381469727,"wires":[["b13eed31.409e9"]]},{"id":"97b7209d.3d45","type":"function","z":"38fd6d46.07d862","name":"AP02 split flag 0/1","func":"// flag = 0 \n//IWAP02,zh_cn,0,7,460,0,9520|3671|13,9520|3672|12,9520|3673|11,9520|3674|10,9520|3675|9,9520|3676|8,9520|3677|7#\n// flag = 1\n// IWAP02,zh_cn,0,7,460,0,9520|3671|13,9520|3672|12,9520|3673|11,9520|3674|10,9520|3675|9,9520|3676|8,9520|3677|7,4,1|D8-24-BD-79-FA-1F|59&2|3C-46-D8-6D-CE-01|81&3|0C-4C-39-1A-7C-65|69&4|70-A8-E3-5D-D7-C0|65#\nlet answer = {} \nmsg.payload = msg.payload.replace(/#$/, \"\"); // remove trailing #\nlet elements = msg.payload.split(\",\") // this gives an array containing the bits\nanswer.command = elements[0] // IWAP02\nanswer.languageNotice = elements[1] // zh_cn\nanswer.flag = elements[2] // 0\nnode.warn(`flag is: ${answer.flag}`)\n// switching answer if flag is 0/1\nanswer.baseCount = Number(elements[3]) // 7\n// you can work out how to put the node.warn statements in yourself\nanswer.mcc = elements[4] // 460\nanswer.mnc = elements[5] // 0\n// now need to get the bases\nlet i;\nanswer.basesGSM = []\nfor (i=6; i<6+answer.baseCount; i++) {\n let baseElements = elements[i].split(\"|\")\n answer.basesGSM.push({lac: baseElements[0], cid: baseElements[1], dbm: baseElements[2]}) // 9520|3671|10\n}\n// now need to get the bases\nlet e;\nanswer.basesWIFI = []\nfor (e=7; e<6+answer.basesGSM; i++) {\n let baseElements = elements[e].split(\"&\")\n answer.basesWIFI.push({ssid: baseElements[0], macAddres: baseElements[1], signal: baseElements[2]}) // 4,1|D8-24-BD-79-FA-1F|59&2|3C-46-D8-6D-CE-01|81&3|0C-4C-39-1A-7C-65|69&4|70-A8-E3-5D-D7-C0|65\n}\nmsg.payload = answer\nreturn msg\n","outputs":1,"noerr":0,"x":614.3000106811523,"y":144.20001411437988,"wires":[["4abce473.7edcfc"]]},{"id":"343e90e6.de5b1","type":"debug","z":"38fd6d46.07d862","name":"incoming debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":863.0000076293945,"y":267.00000381469727,"wires":[]},{"id":"4abce473.7edcfc","type":"switch","z":"38fd6d46.07d862","name":"Answer option","property":"payload.flag","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":603.3000106811523,"y":187.40001392364502,"wires":[["f8900c11.a7614","343e90e6.de5b1"],["21466e3.35e1792","343e90e6.de5b1"]]},{"id":"8f5bfaf1.3b9f48","type":"function","z":"38fd6d46.07d862","name":"Colin - AP02 split flag 0/1","func":"// flag = 0 \n//IWAP02,zh_cn,0,7,460,0,9520|3671|13,9520|3672|12,9520|3673|11,9520|3674|10,9520|3675|9,9520|3676|8,9520|3677|7#\n// flag = 1\n// IWAP02,zh_cn,0,7,460,0,9520|3671|13,9520|3672|12,9520|3673|11,9520|3674|10,9520|3675|9,9520|3676|8,9520|3677|7,4,1|D8-24-BD-79-FA-1F|59&2|3C-46-D8-6D-CE-01|81&3|0C-4C-39-1A-7C-65|69&4|70-A8-E3-5D-D7-C0|65#\nlet answer = {} \nmsg.payload = msg.payload.replace(/#$/, \"\"); // remove trailing #\nlet elements = msg.payload.split(\",\") // this gives an array containing the bits\nanswer.command = elements[0] // IWAP02\nanswer.languageNotice = elements[1] // zh_cn\nanswer.flag = elements[2] // 0\nnode.warn(`flag is: ${answer.flag}`)\n// switching answer if flag is 0/1\nanswer.baseCount = Number(elements[3]) // 7\n// you can work out how to put the node.warn statements in yourself\nanswer.mcc = elements[4] // 460\nanswer.mnc = elements[5] // 0\n// now need to get the bases\nlet i;\nanswer.basesGSM = []\nfor (i=6; i<6+answer.baseCount; i++) {\n let baseElements = elements[i].split(\"|\")\n answer.basesGSM.push({lac: baseElements[0], cid: baseElements[1], dbm: baseElements[2]}) // 9520|3671|10\n}\n// the rest needs to go in here\nmsg.payload = answer\nreturn msg\n","outputs":1,"noerr":0,"x":637.0000534057617,"y":79,"wires":[[]]}]
I won't be online tomorrow. I'm going to take a lesson for WIFI positionning system (fingerprinting datas) and LBS tracking. I hope to come on tuesday with the solution for missing parts here.
The system is working like this :
in LBS or WIFI tracking algorithm, the datas sent by the watch have to be converted by a special request made on the web and probablly sent back in a worldmap node with an API... So when the GPS can't send the watch position as the device can't be reachable inside a building or when there are big clouds or storms, the WIFI positioning system (WIFI triangulation) will take this operation in charge... and when GPS or WIFI tracking are not able to send a position, the LBS (telecoms positioning system triangulation) will solve this.
So for the the IWAP01, it is a full position coordinates sent together as : GPS+WIFI+LBS+STATUS bases... And for IWAP02 : only the LBS+WIFI tracking sytem are operating... Complicate but really efficient