This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf8001 setup format

I'm using Maple and custom nrf8001 board... I have the following problems...

I'm usign the library from this topic: forums.leaflabs.com/topic.php

But as you can guest it doesn't work... First after reset my device is in Setup mode, so I don't need RadioReset command.

After that when i'm sending setup data, I get 0x89 (ACI_STATUS_ERROR_UNSUPPORTED_SETUP_FOR MAT)

Any idea where I can be wrong???

Parents
  • Here is my xml file:

    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE AttributeServer>
    <Profile Version="1.3">
        <SetupId>0</SetupId>
        <Device>nRF8001_Dx</Device>
        <Service Type="local" PrimaryService="true">
            <Name>UART over BTLE</Name>
            <Uuid BaseUUID="6e400000b5a3f393e0a9e50e24dcca9e" BaseUUIDName="Custom UART">0001</Uuid>
            <Characteristic>
                <Name>UART RX</Name>
                <Uuid BaseUUID="6e400000b5a3f393e0a9e50e24dcca9e" BaseUUIDName="Custom UART">0002</Uuid>
                <DefaultValue></DefaultValue>
                <UsePresentationFormat>0</UsePresentationFormat>
                <UserDescription></UserDescription>
                <MaxDataLength>20</MaxDataLength>
                <AttributeLenType>2</AttributeLenType>
                <ForceOpen>false</ForceOpen>
                <Properties>
                    <WriteWithoutResponse>true</WriteWithoutResponse>
                    <Write>false</Write>
                    <Notify>false</Notify>
                    <Indicate>false</Indicate>
                    <Broadcast>false</Broadcast>
                </Properties>
                <SetPipe>false</SetPipe>
                <AckIsAuto>false</AckIsAuto>
                <PresentationFormatDescriptor Value="0000" Exponent="0" Format="1" NameSpace="01" Unit="0000"/>
                <PeriodForReadingThisCharacteristic>0</PeriodForReadingThisCharacteristic>
                <PeriodForProperties/>
            </Characteristic>
            <Characteristic>
                <Name>UART TX</Name>
                <Uuid BaseUUID="6e400000b5a3f393e0a9e50e24dcca9e" BaseUUIDName="Custom UART">0003</Uuid>
                <DefaultValue></DefaultValue>
                <UsePresentationFormat>0</UsePresentationFormat>
                <UserDescription></UserDescription>
                <MaxDataLength>20</MaxDataLength>
                <AttributeLenType>2</AttributeLenType>
                <ForceOpen>false</ForceOpen>
                <Properties>
                    <WriteWithoutResponse>false</WriteWithoutResponse>
                    <Write>false</Write>
                    <Notify>true</Notify>
                    <Indicate>false</Indicate>
                    <Broadcast>false</Broadcast>
                </Properties>
                <SetPipe>false</SetPipe>
                <AckIsAuto>false</AckIsAuto>
                <PresentationFormatDescriptor Value="0000" Exponent="0" Format="1" NameSpace="01" Unit="0000"/>
                <PeriodForReadingThisCharacteristic>0</PeriodForReadingThisCharacteristic>
                <PeriodForProperties/>
            </Characteristic>
        </Service>
        <Service Type="local" PrimaryService="true">
            <Name>Device Information</Name>
            <Uuid>180a</Uuid>
            <Characteristic>
                <Name>Hardware Revision String</Name>
                <Uuid>2a27</Uuid>
                <DefaultValue>0A</DefaultValue>
                <UsePresentationFormat>0</UsePresentationFormat>
                <UserDescription></UserDescription>
                <MaxDataLength>9</MaxDataLength>
                <AttributeLenType>2</AttributeLenType>
                <ForceOpen>false</ForceOpen>
                <Properties>
                    <WriteWithoutResponse>false</WriteWithoutResponse>
                    <Write>false</Write>
                    <Notify>false</Notify>
                    <Indicate>false</Indicate>
                    <Broadcast>false</Broadcast>
                </Properties>
                <SetPipe>true</SetPipe>
                <AckIsAuto>false</AckIsAuto>
                <PresentationFormatDescriptor Value="0000" Exponent="0" Format="25" NameSpace="01" Unit="0000"/>
                <PeriodForReadingThisCharacteristic>0</PeriodForReadingThisCharacteristic>
                <PeriodForProperties/>
            </Characteristic>
        </Service>
        <Gapsettings>
            <Name>UART</Name>
            <DeviceNameWriteLength>7</DeviceNameWriteLength>
            <LocalPipeOnDeviceName>true</LocalPipeOnDeviceName>
            <DeviceNameShortLength>0</DeviceNameShortLength>
            <Apperance>0000</Apperance>
            <SecurityLevel>0</SecurityLevel>
            <AuthenticationReq>0</AuthenticationReq>
            <IoCapabilities>0</IoCapabilities>
            <BondTimeout>600</BondTimeout>
            <SecurityRequestDelay>0</SecurityRequestDelay>
            <MinimumKeySize>7</MinimumKeySize>
            <MaximumKeySize>16</MaximumKeySize>
            <AdvertisingDataBondedBitmap>1a</AdvertisingDataBondedBitmap>
            <AdvertisingDataGeneralBitmap>1a</AdvertisingDataGeneralBitmap>
            <AdvertisingDataBrodcastBitmap>10</AdvertisingDataBrodcastBitmap>
            <AdvertisingDataBondedScanResponseBitmap>0</AdvertisingDataBondedScanResponseBitmap>
            <AdvertisingDataGeneralScanResponseBitmap>0</AdvertisingDataGeneralScanResponseBitmap>
            <AdvertisingDataBrodcastScanResponseBitmap>0</AdvertisingDataBrodcastScanResponseBitmap>
            <AdvertisingDataBondedBitmapCustom>0</AdvertisingDataBondedBitmapCustom>
            <AdvertisingDataGeneralBitmapCustom>0</AdvertisingDataGeneralBitmapCustom>
            <AdvertisingDataBrodcastBitmapCustom>0</AdvertisingDataBrodcastBitmapCustom>
            <AdvertisingDataBondedScanResponseBitmapCustom>0</AdvertisingDataBondedScanResponseBitmapCustom>
            <AdvertisingDataGeneralScanResponseBitmapCustom>0</AdvertisingDataGeneralScanResponseBitmapCustom>
            <AdvertisingDataBrodcastScanResponseBitmapCustom>0</AdvertisingDataBrodcastScanResponseBitmapCustom>
            <TxPowerLevelOffset>0</TxPowerLevelOffset>
            <MinimumConnectionInterval>6</MinimumConnectionInterval>
            <MaximumConnectionInterval>18</MaximumConnectionInterval>
            <SlaveLatency>0</SlaveLatency>
            <TimeoutMultipler>10</TimeoutMultipler>
            <ServiceToAdvertise>
                <Uuid BaseUUID="6e400000b5a3f393e0a9e50e24dcca9e" BaseUUIDName="Custom UART">0001</Uuid>
            </ServiceToAdvertise>
            <CustomAdTypes>
                <AdType index="1">
                    <Type>19</Type>
                    <Value>0000</Value>
                </AdType>
                <AdType index="2">
                    <Type>18</Type>
                    <Value></Value>
                </AdType>
            </CustomAdTypes>
        </Gapsettings>
        <Hardwaresettings>
            <Clocksource>1</Clocksource>
            <ClockAccuracy>1</ClockAccuracy>
            <InitialTxPower>3</InitialTxPower>
            <HfClkSource>0</HfClkSource>
            <DcDcConverter>0</DcDcConverter>
            <ActiveSignalModeIndex>0</ActiveSignalModeIndex>
            <ActiveSignalToTickDistance>0</ActiveSignalToTickDistance>
            <DynamicWindowLimitingEnabled>false</DynamicWindowLimitingEnabled>
        </Hardwaresettings>
        <CurrentInput>
            <BatteryCharge>220</BatteryCharge>
            <Master32KhzClockAccuracy>10</Master32KhzClockAccuracy>
            <ConnectionInterval>1000</ConnectionInterval>
            <PercentOfTimeSleeping>10</PercentOfTimeSleeping>
            <PercentOfTimeAdvertising>10</PercentOfTimeAdvertising>
            <AdvertisingInterval>1280</AdvertisingInterval>
        </CurrentInput>
    </Profile>
    
    

    I don't see how this is SPI issue... After power-up and hardware reset the device is in setup mode... So I try Test mode.... and everything work perfect...

Reply
  • Here is my xml file:

    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE AttributeServer>
    <Profile Version="1.3">
        <SetupId>0</SetupId>
        <Device>nRF8001_Dx</Device>
        <Service Type="local" PrimaryService="true">
            <Name>UART over BTLE</Name>
            <Uuid BaseUUID="6e400000b5a3f393e0a9e50e24dcca9e" BaseUUIDName="Custom UART">0001</Uuid>
            <Characteristic>
                <Name>UART RX</Name>
                <Uuid BaseUUID="6e400000b5a3f393e0a9e50e24dcca9e" BaseUUIDName="Custom UART">0002</Uuid>
                <DefaultValue></DefaultValue>
                <UsePresentationFormat>0</UsePresentationFormat>
                <UserDescription></UserDescription>
                <MaxDataLength>20</MaxDataLength>
                <AttributeLenType>2</AttributeLenType>
                <ForceOpen>false</ForceOpen>
                <Properties>
                    <WriteWithoutResponse>true</WriteWithoutResponse>
                    <Write>false</Write>
                    <Notify>false</Notify>
                    <Indicate>false</Indicate>
                    <Broadcast>false</Broadcast>
                </Properties>
                <SetPipe>false</SetPipe>
                <AckIsAuto>false</AckIsAuto>
                <PresentationFormatDescriptor Value="0000" Exponent="0" Format="1" NameSpace="01" Unit="0000"/>
                <PeriodForReadingThisCharacteristic>0</PeriodForReadingThisCharacteristic>
                <PeriodForProperties/>
            </Characteristic>
            <Characteristic>
                <Name>UART TX</Name>
                <Uuid BaseUUID="6e400000b5a3f393e0a9e50e24dcca9e" BaseUUIDName="Custom UART">0003</Uuid>
                <DefaultValue></DefaultValue>
                <UsePresentationFormat>0</UsePresentationFormat>
                <UserDescription></UserDescription>
                <MaxDataLength>20</MaxDataLength>
                <AttributeLenType>2</AttributeLenType>
                <ForceOpen>false</ForceOpen>
                <Properties>
                    <WriteWithoutResponse>false</WriteWithoutResponse>
                    <Write>false</Write>
                    <Notify>true</Notify>
                    <Indicate>false</Indicate>
                    <Broadcast>false</Broadcast>
                </Properties>
                <SetPipe>false</SetPipe>
                <AckIsAuto>false</AckIsAuto>
                <PresentationFormatDescriptor Value="0000" Exponent="0" Format="1" NameSpace="01" Unit="0000"/>
                <PeriodForReadingThisCharacteristic>0</PeriodForReadingThisCharacteristic>
                <PeriodForProperties/>
            </Characteristic>
        </Service>
        <Service Type="local" PrimaryService="true">
            <Name>Device Information</Name>
            <Uuid>180a</Uuid>
            <Characteristic>
                <Name>Hardware Revision String</Name>
                <Uuid>2a27</Uuid>
                <DefaultValue>0A</DefaultValue>
                <UsePresentationFormat>0</UsePresentationFormat>
                <UserDescription></UserDescription>
                <MaxDataLength>9</MaxDataLength>
                <AttributeLenType>2</AttributeLenType>
                <ForceOpen>false</ForceOpen>
                <Properties>
                    <WriteWithoutResponse>false</WriteWithoutResponse>
                    <Write>false</Write>
                    <Notify>false</Notify>
                    <Indicate>false</Indicate>
                    <Broadcast>false</Broadcast>
                </Properties>
                <SetPipe>true</SetPipe>
                <AckIsAuto>false</AckIsAuto>
                <PresentationFormatDescriptor Value="0000" Exponent="0" Format="25" NameSpace="01" Unit="0000"/>
                <PeriodForReadingThisCharacteristic>0</PeriodForReadingThisCharacteristic>
                <PeriodForProperties/>
            </Characteristic>
        </Service>
        <Gapsettings>
            <Name>UART</Name>
            <DeviceNameWriteLength>7</DeviceNameWriteLength>
            <LocalPipeOnDeviceName>true</LocalPipeOnDeviceName>
            <DeviceNameShortLength>0</DeviceNameShortLength>
            <Apperance>0000</Apperance>
            <SecurityLevel>0</SecurityLevel>
            <AuthenticationReq>0</AuthenticationReq>
            <IoCapabilities>0</IoCapabilities>
            <BondTimeout>600</BondTimeout>
            <SecurityRequestDelay>0</SecurityRequestDelay>
            <MinimumKeySize>7</MinimumKeySize>
            <MaximumKeySize>16</MaximumKeySize>
            <AdvertisingDataBondedBitmap>1a</AdvertisingDataBondedBitmap>
            <AdvertisingDataGeneralBitmap>1a</AdvertisingDataGeneralBitmap>
            <AdvertisingDataBrodcastBitmap>10</AdvertisingDataBrodcastBitmap>
            <AdvertisingDataBondedScanResponseBitmap>0</AdvertisingDataBondedScanResponseBitmap>
            <AdvertisingDataGeneralScanResponseBitmap>0</AdvertisingDataGeneralScanResponseBitmap>
            <AdvertisingDataBrodcastScanResponseBitmap>0</AdvertisingDataBrodcastScanResponseBitmap>
            <AdvertisingDataBondedBitmapCustom>0</AdvertisingDataBondedBitmapCustom>
            <AdvertisingDataGeneralBitmapCustom>0</AdvertisingDataGeneralBitmapCustom>
            <AdvertisingDataBrodcastBitmapCustom>0</AdvertisingDataBrodcastBitmapCustom>
            <AdvertisingDataBondedScanResponseBitmapCustom>0</AdvertisingDataBondedScanResponseBitmapCustom>
            <AdvertisingDataGeneralScanResponseBitmapCustom>0</AdvertisingDataGeneralScanResponseBitmapCustom>
            <AdvertisingDataBrodcastScanResponseBitmapCustom>0</AdvertisingDataBrodcastScanResponseBitmapCustom>
            <TxPowerLevelOffset>0</TxPowerLevelOffset>
            <MinimumConnectionInterval>6</MinimumConnectionInterval>
            <MaximumConnectionInterval>18</MaximumConnectionInterval>
            <SlaveLatency>0</SlaveLatency>
            <TimeoutMultipler>10</TimeoutMultipler>
            <ServiceToAdvertise>
                <Uuid BaseUUID="6e400000b5a3f393e0a9e50e24dcca9e" BaseUUIDName="Custom UART">0001</Uuid>
            </ServiceToAdvertise>
            <CustomAdTypes>
                <AdType index="1">
                    <Type>19</Type>
                    <Value>0000</Value>
                </AdType>
                <AdType index="2">
                    <Type>18</Type>
                    <Value></Value>
                </AdType>
            </CustomAdTypes>
        </Gapsettings>
        <Hardwaresettings>
            <Clocksource>1</Clocksource>
            <ClockAccuracy>1</ClockAccuracy>
            <InitialTxPower>3</InitialTxPower>
            <HfClkSource>0</HfClkSource>
            <DcDcConverter>0</DcDcConverter>
            <ActiveSignalModeIndex>0</ActiveSignalModeIndex>
            <ActiveSignalToTickDistance>0</ActiveSignalToTickDistance>
            <DynamicWindowLimitingEnabled>false</DynamicWindowLimitingEnabled>
        </Hardwaresettings>
        <CurrentInput>
            <BatteryCharge>220</BatteryCharge>
            <Master32KhzClockAccuracy>10</Master32KhzClockAccuracy>
            <ConnectionInterval>1000</ConnectionInterval>
            <PercentOfTimeSleeping>10</PercentOfTimeSleeping>
            <PercentOfTimeAdvertising>10</PercentOfTimeAdvertising>
            <AdvertisingInterval>1280</AdvertisingInterval>
        </CurrentInput>
    </Profile>
    
    

    I don't see how this is SPI issue... After power-up and hardware reset the device is in setup mode... So I try Test mode.... and everything work perfect...

Children
No Data
Related