Tool/software: TI-RTOS
Hey guys,
I am currently using the Sensor/Collector example software and added some code to use it for a PIR sensor. This basically works fine, but I have issues with the sensor rejoining old network and joining a new network when he was in another network before. In the sensor, POWER_MEAS is enabled!!!
I've installed the packet sniffer and wireshark to track current messages and find a solution.
I've been through a few tests and I use wireshark and putty. Putty is used to read out the collector messages via UART to see if it receives messages:
Test 0:
If the network is set up and works after restarting the collector with the restart button, it is not printing any messages to UART anymore though wireshark shows, that the sensor is proceeding to send data..
Test 1:
- The network is working and sensor sends data, which I can see in Wireshark and on the UART-Terminal
- I do then set the Collector to factory new but I do not remove it from the PC
- Wireshark shows that sensor sends data and ACK (though i dont know who send the ACK wireshark doesnt display an address or destination, I guess the collector)
- But no data is shown on the UART-Terminal
So, any idea what is happening? Who is sending the ACK, and if the collector is sending the ACK any idea why it is not displaying the value via UART?!
Test 2:
- The network is working and sensor sends data I can see in Wireshark and on the UART-Terminal
- Collector is removed from the PC (not set to factory new)
- Sensor gets into orphaned state and after 3 unsuccessful scans, it deletes NV, sends a disassociation Request and sets a SensorStartEvent.
- Collector is connected to the PC again and UART shows data from Sensor 0x02
So this test works perfectly.
Test 3:
- The network is working and sensor sends data I can see in Wireshark and on the UART-Terminal
- Sensor is removed from PC
- Collector set to factory new and removed from PC
- Sensor is connected to PC again -> shows orphaned state and after 3 unsuccessful scans, it deletes NV, sends a disassociation Request and sets a SensorStartEvent.
- Collector is connected with PC again
- Sensor is found again and sends data in Wireshark, the data can also be seen in the collector UART messages
So this test works well, too.
Test 4:
- The network is working and sensor sends data I can see in Wireshark and on the UART-Terminal
- Collector is set to factory new state and then removed from the PC (sensor is running all the time)
- Wireshark shows that every 5s a Beacon request is send to destination 0xffff immediately followed by "Beacon, Src:0xaabb" from 0xaabb but looks they are not pairing.
- When I remove the sensor, wireshark shows no further transmissions, so I guess the sensor was sending the beacons before, is that right?
- When I connect the sensor again, they pair and it works.
When I repeat Test 4 and I don't remove the sensor but press the sensors reset button it works, too. But using SysCtrlSystemReset() does not work, though I have to solve this issue automatically by software.
To sum it up, the sensor only connects to a new network if the sensor is flashed again with the software, the sensor is removed and connected to the PC again or manually reseted by the reset button...
I need to do solve this by software, any ideas? And regarding Test 1, any idea what is happening?
kind regards
Stefan