Skip to content

Commit

Permalink
[DeviceSettings] Pass dev_addr is update payload
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherdro committed Apr 8, 2018
1 parent a0ef78e commit c098d1f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/screens/DeviceSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,14 @@ class DeviceSettings extends Component {
_saveDevice = async () => {
const { updateDeviceAsync } = this.props
const { application } = this.props.navigation.state.params
const { dev_eui, dev_id, app_key, app_skey, nwk_skey } = this.props.device
const {
dev_addr,
dev_eui,
dev_id,
app_key,
app_skey,
nwk_skey,
} = this.props.device

this.setState({ inProgressSave: true })

Expand All @@ -159,13 +166,15 @@ class DeviceSettings extends Component {
app_eui: this.state.appEui,
description: this.state.description,
dev_eui,
dev_addr,
disable_fcnt_check: !this.state.frameCounterChecks,
method: this.state.activationMethod,
uses_32bit_fcnt: this.state.frameCounterWidth === '32',
}

try {
const device = await updateDeviceAsync(application, dev_id, updatedDevice)

if (device)
this.setState({
originalActivationMethod: device.app_key ? OTAA : ABP,
Expand Down

0 comments on commit c098d1f

Please sign in to comment.