Bolt IoT module resetting when restarted via the restart command in vps

I created a restart program on my digital ocean server as shown in the course video. the status and turning on of light programs are working fine, but when I run the restart program, the module shuts down and resets itself .i.e. it won’t connect to the wifi network. I have to go through the setup process everytime. Please help me with this issue and thanks in advance!

1 Like

Hi,

Could you reply with the code that you have written for the “restart program”?
Also which part of the course showed you how to write a “restart program”?

Hi,

The code is given in Project 6: Checking Device Status and Restarting the Device.
Below is the code I wrote for the “restart” program:

from boltiot import Bolt
api_key= “60c5d95e-0e8f-4a71-b526-a6499ceb24d2”
device_id=“BOLT7421165”
mybolt=Bolt(api_key,device_id)
response=mybolt.restart()
print (response)

Hello sir, I am also facing the same issue as he is facing,please help me with issue and thanks in advance.
Also I have used the same code as he has used.

1 Like

I was facing the same problem too. The module restarts but doesn’t connect to the wifi. Resetting it just like the first time is what you need to do.

Hi @trahul.2008 I was also having same issue when i run the restart program. So the thing is when the restart program was run the wifi module forgets the wifi network to which you were connected. So in your Bolt app add the device again and repeat the same steps to connect to the network.
Hope it helps.

1 Like

Hello Sir
I am also facing the same issue. After running this code, I am also unable to reconnect my device. Also by adding new device too it isn’t connecting. Kindly help me out in this issue.

Hi @arrogancy254 I had also faced the same issue when I run the restart code in virtual box. To fix this issue, you just have to open the Bolt app and click on add new device option. After clicking follow the steps. If you face any kind of issue regarding how to add new device, check the content available in your course i.e linking the micro controller to the cloud. After that repeat the same steps to connect the network.
Hope it helps.

I also have encountered the same problem. Once I have executed the code through the vmware ubuntu server, the Bolt device restarted and it cannot be connected to the wifi anymore.
I have tried to connect the wifi to the bolt device from the begining, but the bolt application in the phone stopped working(not responding). The code which I have used is:

from boltiot import Bolt
apiKey =“XXXXXXXXXXXXXXXXXX”
deviceID=“BOLTXXXXXXXX”
myBolt=Bolt(apiKey,deviceID)
response=myBolt.restart()
print(response)

The part of the course which showed this code is PROJECT 6: Checking device status and restarting the device

Hi, @divyenth your code is correct. I want to give suggestion that always try give blank spaces in between. It is a good practice and helps others for understanding code in a proper way. I too encountered the same issue when I run that code. So, for solving issue regarding app is not responding, first of all clear your app data from app management in settings, then try to run the Bolt app and click on add new device. After clicking on add new device follow the steps on screen. If you face any kind of issue regarding how to add a new device, check the content available in your course i.e linking the micro controller to the cloud.After adding device to the app it will again connect to cloud and your green LED will turn on.
Hope this helps.