Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FDP-2551: Implement sending firmware update to device #53

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

sanderv
Copy link
Contributor

@sanderv sanderv commented Oct 3, 2024

No description provided.

@sanderv sanderv marked this pull request as draft October 3, 2024 13:15
…FDP-2551-firmware

# Conflicts:
#	application/src/main/kotlin/org/gxf/crestdeviceservice/command/entity/Command.kt
#	application/src/main/kotlin/org/gxf/crestdeviceservice/command/service/CommandService.kt
#	application/src/main/kotlin/org/gxf/crestdeviceservice/service/DownlinkService.kt
#	application/src/main/kotlin/org/gxf/crestdeviceservice/service/UrcService.kt
#	application/src/test/kotlin/org/gxf/crestdeviceservice/CommandFactory.kt
#	application/src/test/kotlin/org/gxf/crestdeviceservice/command/service/CommandServiceTest.kt
#	application/src/test/kotlin/org/gxf/crestdeviceservice/service/DownlinkServiceTest.kt
#	application/src/test/kotlin/org/gxf/crestdeviceservice/service/UrcServiceTest.kt
#	components/firmware/src/main/kotlin/org/gxf/crestdeviceservice/firmware/entity/FirmwarePacket.kt
#	components/firmware/src/main/kotlin/org/gxf/crestdeviceservice/firmware/repository/FirmwarePacketRepository.kt
#	components/psk/src/main/kotlin/org/gxf/crestdeviceservice/psk/service/PskService.kt
Signed-off-by: Sander Verbruggen <[email protected]>
Copied Base85 from https://github.com/Sheep-y/Base85, see NOTICE file for details

Signed-off-by: Sander Verbruggen <[email protected]>
Signed-off-by: Sander Verbruggen <[email protected]>
Copy link

sonarcloud bot commented Oct 8, 2024


/** Returns the command including extra data needed by the device */
fun generateCommandString(command: Command): String
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line

}

override fun getSupportedCommand() = Command.CommandType.FIRMWARE
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line

}

override fun getSupportedCommand() = Command.CommandType.PSK
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line

}

override fun getSupportedCommand() = Command.CommandType.PSK_SET
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line

import org.springframework.stereotype.Service

/** Creates downlinks to be returned to a device after it makes contact. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/** Creates downlinks to be returned to a device after it makes contact. */
/** Creates downlinks to be sent to a device after it makes contact. */

// SPDX-License-Identifier: Apache-2.0
package org.gxf.crestdeviceservice.firmware.entity

import java.util.*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imports splitsen

// SPDX-License-Identifier: Apache-2.0
package org.gxf.crestdeviceservice.firmware.entity

import java.util.*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imports splitsen

OTA0000++%oAafJ@bH$e-l!rv8lPdLW9=tvX*t_nHb!L6~Z5Iz6^B2Y02EHN<!`0$7$5%6H+oDgV001uFe;E>=9l&2lflHZc=k{S@ussI200000J0RjUA0RRC1{{UJL(YgQt000000000203ZPu009Uh5Yfs207*_pPdZdZOaK4?000003J~6^04y*pFf1`KEFv*7Ga?NDLC(Cj<ktx$Tg*MYs57Jqc6pCjM_Km)VhHdIq3TwMa9I:DONE


Bastiaan & Jeffrey
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

}

@Service
internal class InternalFirmwareHashService : FirmwareHashService {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internal?

}

private fun replaceCurrentFirmwareHash(packet: String, deviceSecret: String): String {
val command = packet.substring(0, OTA_START.length)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
val command = packet.substring(0, OTA_START.length)
val command = OTA_START

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants