Author Topic: New module firmware 7-368 problem  (Read 325 times)

Nick_W

  • Full Member
  • ***
  • Posts: 215
    • View Profile
New module firmware 7-368 problem
« on: August 31, 2016, 07:26:30 am »
Just downloaded and installed all the new firmware/software

There seems to be a problem with module 110 F/W V 7-368. I have loaded it into 3 modules, and in all cases, the modules boot, then stop responding (I get beacons only). After a few minutes, they hang. I believe they hang as I flash the green LED briefly when publishing, and the green LED comes on and stays on.

This happens no matter what program I use (small or large).

I have reverted to F/W 7-366 which works without problems.

You might want to take a look.

Share on Facebook Share on Twitter


mc-Abe

  • Full Member
  • ***
  • Posts: 167
    • View Profile
    • mc-Things
Re: New module firmware 7-368 problem
« Reply #1 on: August 31, 2016, 09:15:08 am »
Could you provide a bit more detail about what you are doing in the script?

Nick_W

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Re: New module firmware 7-368 problem
« Reply #2 on: August 31, 2016, 10:42:56 am »
This is my test script

Code: [Select]
//
// This example publishes the Uptime, Battery Voltage and Temperature once per minute
// Data also is published in the beacon data fields. This can be read via MQTT.
// Must include TempSensor and MQTT Library
//

Enum dataType As Byte
    NONE = 0
    VERSION = 1 //default beacon data for MQTT
    UPTIME = 2
    BATTVOLTAGE = 3
    TEMPERATURE = 4
    TEMPERATURE2 = 5
    HUMIDITY = 6
    DEWPOINT = 7
    PRESSURE = 8
    ALTITUDE = 9
    MOTION = 10
    DOOR = 11
    KNOCK = 12
End Enum

Class MQTT
    Shared mcUIDString As String
   
    Shared Sub Publish(topic As String, value As String)
        If mcUIDString = Nothing Then
            mcUIDString = Device.mcUID().ToString("X8")
        End If
        Dim text_string As ListOfByte = New ListOfByte()
        text_string.Add(value)
        Lplan.Publish("MCThings/" + mcUIDString + "/" + topic, text_string)
    End Sub
   
    Shared Sub Publish(topic As String, value As Object)
        Dim text As String = value.ToString()
        If mcUIDString = Nothing Then
            mcUIDString = Device.mcUID().ToString("X8")
        End If
        Dim text_string As ListOfByte = New ListOfByte()
        text_string.Add(text)
        Lplan.Publish("MCThings/" + mcUIDString + "/" + topic, text_string)
    End Sub
   
    Shared Sub Publish_exact(topic As String, text As String)
        Dim text_String As ListOfByte = New ListOfByte()
        text_String.Add(text)
        Lplan.Publish(topic, text_String)
    End Sub
   
Class Main
   
    Shared data As dataType
   
    Shared Event Publish() RaiseEvent Every 1 Minutes
        LedGreen = True
       
        Select data
            Case dataType.UPTIME
                Dim Uptime As Integer = Device.Uptime()
                MQTT.Publish("Uptime", Uptime)
                MQTT.BeaconPublish(dataType.UPTIME, Uptime)
                data = dataType.BATTVOLTAGE
            Case dataType.BATTVOLTAGE
                Dim BattVolt As Integer = Device.BatteryVoltage()
                MQTT.Publish("BatteryVoltage", BattVolt)
                MQTT.BeaconPublish(dataType.BATTVOLTAGE, BattVolt)
                data = dataType.TEMPERATURE
            Case dataType.TEMPERATURE
                Dim TempC As Float = TempSensor.GetTemp
                MQTT.Publish("Temperature", TempC)
                MQTT.BeaconPublish(dataType.TEMPERATURE, TempC)
                data = dataType.UPTIME
            Case Else
                MQTT.Publish("Status", "OnLine")
                data = dataType.UPTIME
        End Select
        LedGreen = False
    End Event 
End Class

The enum and Class MQTT are in a separate file, just joined together for ease of posting here.

With the latest FW this publishes "Online" so it gets through the main event, publishes a few values, then hangs with the green LED On. Beacons continue to publish.

This is the output:

Code: [Select]
MCThings/000111BC/Status OnLine
MCThings/000111BC/Version 7.368
MCThings/000111BC/Rssi -45
MCThings/000111BC/Version 7.368
MCThings/000111BC/Rssi -45
MCThings/000111BC/Version 7.368
MCThings/000111BC/Rssi -45
MCThings/000111BC/Uptime 60
MCThings/000111BC/Uptime 60.0
MCThings/000111BC/Rssi -45
MCThings/000111BC/Uptime 60.0
MCThings/000111BC/Rssi -45
MCThings/000111BC/BatteryVoltage 2917
MCThings/000111BC/BatteryVoltage 2917.0
MCThings/000111BC/Rssi -44
MCThings/000111BC/BatteryVoltage 2917.0
MCThings/000111BC/Rssi -45
MCThings/000111BC/BatteryVoltage 2917.0
MCThings/000111BC/Rssi -45
MCThings/000111BC/BatteryVoltage 2917.0
MCThings/000111BC/Rssi -44
MCThings/000111BC/BatteryVoltage 2917.0
MCThings/000111BC/Rssi -44
MCThings/000111BC/BatteryVoltage 2917.0
MCThings/000111BC/Rssi -44

The only published output is:
Code: [Select]
MCThings/000111BC/Status OnLine
MCThings/000111BC/Uptime 60
MCThings/000111BC/BatteryVoltage 2917

The rest are decoded beacons (values Rssi, Version and ones with .0 at the end are all decoded beacons).

With 7-366 this works fine.

The same happens with every other program I have tried.

Nick_W

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Re: New module firmware 7-368 problem
« Reply #3 on: August 31, 2016, 10:54:39 am »
OK, further investigation,

With 7-366, it doesn't publish temperature - using the default I2C library - It seems to reset at that point.

Looking at other posts, these does seem to be something wrong with I2C, it just so happens that all my programs publish temperature (it's there so why not).

So it's a reset vs a Hang.

I'll download the latest versions as I see you have an I2C fix and see if that fixes it.

Nick_W

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Re: New module firmware 7-368 problem
« Reply #4 on: August 31, 2016, 11:04:41 am »
Thats it!

7-369 fixes it, it was the I2C bug.

Thanks for the quick fix.

mc-Abe

  • Full Member
  • ***
  • Posts: 167
    • View Profile
    • mc-Things
Re: New module firmware 7-368 problem
« Reply #5 on: August 31, 2016, 05:24:57 pm »
Glad that this fixed it. Sorry about the bug. Sometimes quick turnarounds lead to a little less than ideal testing.