Author Topic: [SOLVED] Bricked module? Can't connect, but I can still do OTA-Update, Red led flashing every 5 sec  (Read 105 times)

rudydevolder

  • Newbie
  • *
  • Posts: 26
  • Belgian guy married Phillipina
  • Location: Philippines
    • View Profile
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.

« Last Edit: August 13, 2016, 11:27:01 am by rudydevolder »

Share on Facebook Share on Twitter


mc-Abe

  • Full Member
  • ***
  • Posts: 167
    • View Profile
    • mc-Things
Could you share the code that bricked the module. Obviously there is a bug somewhere that I would like to find.

rudydevolder

  • Newbie
  • *
  • Posts: 26
  • Belgian guy married Phillipina
  • Location: Philippines
    • View Profile
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.  ???


mc-Abe

  • Full Member
  • ***
  • Posts: 167
    • View Profile
    • mc-Things
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.

rudydevolder

  • Newbie
  • *
  • Posts: 26
  • Belgian guy married Phillipina
  • Location: Philippines
    • View Profile
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.

mc-Abe

  • Full Member
  • ***
  • Posts: 167
    • View Profile
    • mc-Things
We are just doing some final testing on the mc-OTA. We will be releasing this today or tomorrow.

rudydevolder

  • Newbie
  • *
  • Posts: 26
  • Belgian guy married Phillipina
  • Location: Philippines
    • View Profile
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


mc-T2

  • Administrator
  • Sr. Member
  • *****
  • Posts: 252
  • mc-Things! The opportunities are endless!
  • Location: Canada
    • View Profile
@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!
Need more mc-Modules, mc-Gateways or other mc-Things? Check out our product page: www.mcthings.com/products. mc-Development kits are available too!
Check out a live Dashboard using mcThings and Losant! Click here: https://goo.gl/ST43hB

rudydevolder

  • Newbie
  • *
  • Posts: 26
  • Belgian guy married Phillipina
  • Location: Philippines
    • View Profile
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  ;)