mc-Things

mc-Products => mc-Module => Topic started by: rudydevolder on August 02, 2016, 09:12:30 pm

Title: [SOLVED] Bricked module? Can't connect, but I can still do OTA-Update, Red led flashing every 5 sec
Post by: rudydevolder on August 02, 2016, 09:12:30 pm
Red LED flashes every 5 seconds.
Beacon updates: I cannot even see it in devices.  :-[
I assume the module is resetting (hence red led flashes every 5 seconds), but I can't connect to try to reload the program/script.
All firmware and software are the latest versions. I found another topic almost the same that said to install firmware 0.7 v361, I already had this installed, so I tried to upgrade again.
The upgrade works, but the problem remains.  >:(
I read there will be an option to erase the script in the new OTA-update software. I hope this version will be available soon.  ::)
- Last update: Bricked a second module, found the problem: I used Shared Event Boot() only did some Dim's in it and a for next loop with a Type-Casting inside.

Title: Re: Bricked module? Can't connect, but I can still do OTA-Update, Red led flashing every 5 sec
Post by: mc-Abe on August 03, 2016, 10:32:00 am
Could you share the code that bricked the module. Obviously there is a bug somewhere that I would like to find.
Title: Re: Bricked module? Can't connect, but I can still do OTA-Update, Red led flashing every 5 sec
Post by: rudydevolder on August 04, 2016, 12:04:01 am
Hmm, I can't find the code any-more and I don't want to brick another module before I can unbrick my 2 modules first. But I think I know what my mistake was.:
Instead of :
Dim data As ListOfByte = New ListOfByte
I forgot the New statement and did:
Dim data As ListOfByte = ListOfByte  :P

After that I did:
data.Add(element)
spi_device.Transfer(data)

I found out about my mistake by running in the debugger, he complaint that I had a null pointer variable or something like that. :o
My compiler didn't complain and so my module became bricked. So I think it's good practice to debug always first.  ???

Title: Re: Bricked module? Can't connect, but I can still do OTA-Update, Red led flashing every 5 sec
Post by: mc-Abe on August 04, 2016, 01:10:33 am
You are right that it is best practice to debug first. If you get a runtime error, the module enters debug mode and awaits a connection. Are you running the latest gateway host processor version? You should be able to connect to the device after a runtime error has occurred. I will test to see what the behaviour is under these circumstances.
Title: Re: Bricked module? Can't connect, but I can still do OTA-Update, Red led flashing every 5 sec
Post by: rudydevolder on August 07, 2016, 02:16:34 am
My 3th module bricked now.  :'(
 
After I ran the program successfully in debug mode I just wanted to upload, immediately after my mcModule was bricked, I didn't modify any code.

I hope soon the new version from the OTA update to reset the script will come out, so I can test further, because now I'm totally stuck.

I was experimenting with my SPI to WS2801 LED software. Working pretty well at first, only the first LED was flickering but I found this is a common problem with the length of the cable or the power supply to the Led's and I only tried with different speeds of the SPI-bus, recompiling and uploading again and again, than it happened.
Title: Re: Bricked module? Can't connect, but I can still do OTA-Update, Red led flashing every 5 sec
Post by: mc-Abe on August 09, 2016, 02:32:36 pm
We are just doing some final testing on the mc-OTA. We will be releasing this today or tomorrow.
Title: Re: Bricked module? Can't connect, but I can still do OTA-Update, Red led flashing every 5 sec
Post by: rudydevolder on August 09, 2016, 10:26:11 pm
Thank you, you guys are awesome. Thanks for the good service and quick replies. I am impressed with the scripting language,  the editor, autocompletion and autoformatting makes it a superfast tool.
I know programming and debugging is far from easy, you're also depending on other tools with limitations and bugs you often bump in to.
Keep up the good work  ;D

Title: Re: Bricked module? Can't connect, but I can still do OTA-Update, Red led flashing every 5 sec
Post by: mc-T2 on August 12, 2016, 05:27:02 pm
@rudydevolder - We just uploaded the new version of the mc-OTA updater. Please be sure to download it from our website. This new version allows you to erase a script on your modules, if need be.

Thanks!
Title: [SOLVED] Bricked module? Can't connect, but I can still do OTA-Update, Red led flashing every 5 sec
Post by: rudydevolder on August 13, 2016, 11:26:15 am
Thanks for the updated version with the possibility to reset the script, that did the trick  ;D

All my bricked modules are working again now, thanks  ;)