4 thoughts on “Debugger run time and board script execution differences”
Hello,
I was wondering what the difference is between running the debugger and the python script directly from the board. The reason I ask this is due to the fact that I am not getting any TCP data from the board to my server while running code directly off the board. However I am able to get data when I run from the debugger.
Is the message sending/termination different when executing on the board? I ask this because I dont even see the packet (using wireshark) get transmitted from the board when executing from the board. However I do see it when running the debugger.
Thanks
Andrew
You mean Wireshark intercepting on the server machine? At least you see the connection initialization?
Try MDM.send(‘AT&K0r’, 2) before doing socket things.
So I tried the MDM.send(‘AT&K0r’,2) before any socket code. The debugger still works but the board execution of the script still will not send the data out. I am able to see the connection initialize via Wireshark.
Is there prehaps another control flow item in control that the debugger handles?
Some more tweaks:
– wait for CONNECT message before sending anything through the socket. Do not rely on a predefined timeout
– send your data
– do a proper socket close with silence guard spaces of 2-3 seconds before and after the +++ sequence
We use cookies to enhance your browsing experience and help us improve our websites. To improve our website, we carefully select third parties that use cookies to allow us to serve specific content and achieve the purposes set out in our cookie policy. For more information on how to make adjustments through your browser to the cookies being used on your device, please click Find Out More link. By closing this banner or continuing to browse our website, you agree to our use of such cookies. FIND OUT MORE
Hello,
I was wondering what the difference is between running the debugger and the python script directly from the board. The reason I ask this is due to the fact that I am not getting any TCP data from the board to my server while running code directly off the board. However I am able to get data when I run from the debugger.
Code example:
import GPS
import MDM
import MOD
SERVER_PORT = ‘4040’
SERVER_ADDR = ‘XXX.XXX.XXX.XXX’
def main():
i = 0
while (i < 2):
GPS.powerOnOff(0)
MOD.sleep(30)
GPS.powerOnOff(1)
MOD.sleep(30)
i = i + 1
MDM.send(‘AT#SD=1,0,’+SERVER_PORT+’,"’+SERVER_ADDR+’",0,0,0r’,2)
MOD.sleep(30)
MDM.send(‘HELLO+++’,2)
MOD.sleep(10)
MDM.send(‘AT#SH=1r’,2)
main()
Is the message sending/termination different when executing on the board? I ask this because I dont even see the packet (using wireshark) get transmitted from the board when executing from the board. However I do see it when running the debugger.
Thanks
Andrew
You mean Wireshark intercepting on the server machine? At least you see the connection initialization?
Try MDM.send(‘AT&K0r’, 2) before doing socket things.
So I tried the MDM.send(‘AT&K0r’,2) before any socket code. The debugger still works but the board execution of the script still will not send the data out. I am able to see the connection initialize via Wireshark.
Is there prehaps another control flow item in control that the debugger handles?
Some more tweaks:
– wait for CONNECT message before sending anything through the socket. Do not rely on a predefined timeout
– send your data
– do a proper socket close with silence guard spaces of 2-3 seconds before and after the +++ sequence