This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

sl_NetAppDnsGetHostByName() returning -6150, resolving DNS failure

Part Number: CC3135MOD
Other Parts Discussed in Thread: CC3135, BOOSTXL-CC3135, , UNIFLASH, SEGGER

We are working on a project that connects to the AWS server using AWS free rtos SDK through CC3135 wifi module.

Our Host controller is STM32L496, we ported the CC3135 wifi SDk to the STM controller successfully able to communicate with the AWS server. We used BOOSTXL-CC3135 kit for the Wifi connection.

We designed a PCB with STM32 and CC3135 MOD , we tried to run the same code that is working with BOOSTXL-CC3135. But we are getting issues while connecting to the AWS. Issue is briefed below,

1. The application gets the below error response,

    [ERROR][NET][29098] Failed to resolve au9b75i3zpxa8-ats.iot.us-east-1.amazonaws.com.

2.On stepping through the code we found the function sl_NetAppDnsGetHostByName() return -6150 instead of 0

3.The wifi is connected to the local hotspot but it is not communicating with the AWS server.

4.nReset pin is made high by default in the hardware.

5.Same code is working perfectly fine with BOOSTXL-CC3135 kit, do we need to modify anything specific to the CC3135MOD.

Kindly help us asap since our production is blocked because of this issue

  • Hi,

    Error code -6150 signalise that there is no response to DNS request. You can use Wireshark network sniffer to determine what is going on at your network.

    Do you use same network settings (DNS server, gateway) and same ServicePack at your hardware and  BOOSTXL-CC3135?

    Jan

  • Currently  we have two setups in our hand, one with BOOSTXL-CC3135 and another is with CC3135MOD.

    same code is working fine with BOOSTXL but getting in to issues when used with CC3135 MOD.

    we used same WiFi hotspots for both cases, doesn't change any DNS settings,

    Is there any software change need to be done for CC3135MOD, I am using same WIFI SDK for both BOOSTXL and CC3135 MOD

  • Hi,

    Do you have uploaded ServicePack inside your devices? If not you should do this definitely. This can be dove via Uniflash software - please see this article.

    Jan

  • Till now we have not changed any software in the CC3135MOD, I try to flash the latest service pack in to the CC3135 MOD , and post the result,

    Thanks for your responses

  • In our PCB we have only spi pins out, i would like to know how to connect Jlink to uniflash, when i try to connect the CC3135MOD to uniflash through Jlink it is not detected. 

    We cannot use UART for flashing since it connected to the STM32L496.

  • Hi,

    For uploading content by Uniflash you need to use UART. There is no possibility to use JTAG.

    Another option may to be upload image from host MCU. Image can be preprepared by Uniflash and from host uploaded by API sl_FsProgram(). More information about this API you find at CC31xx/CC32xx host driver documentation. ServicePack version uploaded inside device you can get by API sl_DeviceGet()  SL_DEVICE_GENERAL and SL_DEVICE_GENERAL_VERSION.

    From my point of view it is not best practice that you not have available UART or FLASH_SPI_* pins at your hardware. Because this will complicate your development and later production. Please see production line guide.

    Jan

  • Currently we are trying to tap the UART lines for flashing the image,i will post the results once it is done, i have one query, Other than JTAG can we use any other spi flashing tool?If yes, Is there any tool recommended by TI?

    If Uniflash supports only flashing via serial, what is the purpose of the SPI lines on the device? My intention for this question is, Since we have only SPI pins taken out in the board and we are planning to fabricate 20 such boards, Is there any other way to flash the image through the SPI, so we can avoid tapping out the UART lines in our PCB.

  • Hi,

    You have options:

    • integrate into your STM32 firmware capability to use sl_FsProgram() and program image from host (this may to be reasonable way if you have enough resources inside your MCU)
    • connect your module by UART and program module from Uniflash (GUI, CLI) or by Embedded programming
    • connect your module by SPI (FLASH_SPI_* lines not the host SPI lines!) and use 3rd party programmer for SPI flash chip like a Cheetah SPI
      or BeeProg

    All possibilities of production programming you find at production line guide at my previous answer.

    Jan

  • We connected PC to Wifi mod using EMUBOOST kit and nReset of the CC3135MOD is kept at Logic 0, but the uniflash is not detecting the chipset,

    Do we need to install any drivers for the tool to detect the CC3135MOD?

  • Hi,

    At EMUBOOST is used FTDI chip. FTDI drivers should be installed together with Uniflash. This may to check by presence of COM ports from EMUBOOST inside device manager. Please make sure that you have connected your EMUBOOST properly (chapter 4.4 of production line guide).

    Jan

  • We need few inputs on the flashing methods suggested in the previous answer.

    1.To flash the firmware using the api sl_FsProgram() , Do you have any sample code which we can refer to implement in to our STM32 firmware,

    2.What is the sequence/procedure we need to follow to flash the firmware in to the CC3135MOD using spi programmer like cheetah SPI?.

    3.We are planning to buy the cheetah spi programmer, Is it capable of detecting the CC3135MOD?

    Currently we are in critical situation needing your support at the fullest, kindly help us solving this issue quickly, we cannot go ahead for production before solving this issue.

  • Hi,

    1. CC31xx/CC32xx driver documentation contains example how to use sl_FsProgram() API.

    2. I don't know exact workflow with this 3rd party programmer. General steps for using 3rd party programmer are described at production line guide chapter 5. But I hope that you understand that for gang programming are used different SPI pins than for connection of your host (as I stated few times above).

    3. Cheetah spi programmer is used for programming internal SPI flash module. This SPI flash is a 32MBit serial flash from Macronix (MX25R3235F). You can buy any SPI flash programmer which supports this SPI memory. Choice is up to you. As I remember this 3rd party flash programmer was recommanded by TI employees few times.

    ServicePack upload is a mandatory step during your production process, and you need to be capable do it. But did you tried use Wireshark and sniff DNS communication? It may to be possible, that you have not properly configured your network infrastructure as well.

    Jan

  • As I mentioned in my previous response, same application code is working with BOOSTXL  and not working in CC3135MOD, is there any other api which can used in the host firmware to read the current service pack version,

    If available, I try to read the versions of both CC3135MOD and BOOSTXL if it comes out that both are same then I can conclude the problem is else where not on the service pack,

    This question is just a thought

  • Hi,

    > As I mentioned in my previous response, same application code is working with BOOSTXL  and not working in CC3135MOD.

    You want to say, that is not possible that DNS requests are blocked at your network infrastructure/firewall according MAC address or IP address, right? OK, It is good to know that you eliminated this possibilities already.

    If available, I try to read the versions of both CC3135MOD and BOOSTXL if it comes out that both are same then I can conclude the problem is else where not on the service pack

    I already answered this question at my previous answer. Usage of sl_DeviceGet() API you find at host driver documentation. E.g.:

    SlDeviceVersion_t ver;
    pConfigLen = sizeof(ver);
    pConfigOpt = SL_DEVICE_GENERAL_VERSION;
    sl_DeviceGet(SL_DEVICE_GENERAL,&pConfigOpt,&pConfigLen,(_u8 *)(&ver));
    printf("CHIP %d\nMAC 31.%d.%d.%d.%d\nPHY %d.%d.%d.%d\nNWP %d.%d.%d.%d\nROM %d\nHOST %d.%d.%d.%d\n",
                     ver.ChipId,
                     ver.FwVersion[0],ver.FwVersion[1],
                     ver.FwVersion[2],ver.FwVersion[3],
                     ver.PhyVersion[0],ver.PhyVersion[1],
                     ver.PhyVersion[2],ver.PhyVersion[3],
                     ver.NwpVersion[0],ver.NwpVersion[1],ver.NwpVersion[2],ver.NwpVersion[3],
                     ver.RomVersion,
                     SL_MAJOR_VERSION_NUM,SL_MINOR_VERSION_NUM,SL_VERSION_NUM,SL_SUB_VERSION_NUM);

    Jan

  • Hi,

    as per your suggestion we tried  sl_DeviceGet() API and these are the results for both devices,

    CHIP 536901672.  MAC 31.228.122.0.32.  PHY 200.255.4.32. NWP 133.76.0.8.  ROM 65488.  HOST 3.0.1.46. (for CC3135MOD).

    CHIP 823132160.  MAC 31.3.1.0.5.            PHY 3.1.0.17.         NWP 4.1.0.27.       ROM 8738.    HOST 3.0.1.46. (for CC3135 BOOSTXL).

    and here HOST driver version is given in the application itself like,

    #define SL_DRIVER_VERSION "3.0.1.46"
    #define SL_MAJOR_VERSION_NUM 3L
    #define SL_MINOR_VERSION_NUM 0L
    #define SL_VERSION_NUM 1L
    #define SL_SUB_VERSION_NUM 46L

    let us know the differences between the two.

  • Hi,

    Values returned from MOD does not make sense. You should do ServicePack update definitely.

    Jan

  • Good news!!!,

    We have successfully flashed the latest firmware in to CC3135MOD using uniflash and EMUBOOST, and the issue is fixed. Thanks for your continuous support.

    As I mentioned in my previous answers we unfortunately didn't provide any connectors for flashing through UART , we have interfaces only for SPI, so we had to tap the uart lines with jumpers and flashed, 

    With this now we could verify the root cause of the problem, but we cannot do the same for all our PCB's, Only option available for us is to flash through SPI, and we planning to buy cheetah spi programmer, I have some queries on this,

    1.Sequence will be like generate the gang image using uniflash, we will get a binary (.bin file), we need to flash this binary to the CC3135MOD through this  progammer. Is this correct?

    2. While flashing through UART, we connected the hibernate pin to the EMUBOOST, but for spi flashing, with respect to production line guide Only nreset shall be pulled low, hibernate pin will be floating, Whether our assumptions are correct?

    3.In your previous response you mentioned uniflash does not support JTAG, currently we have segger Jlink programmer at our hand which supports Macronix (MX25R3235F) serial flash, can we prepare only the gangimage from uniflash and try to flash through segger jlink in spi mode. Will it work this way?

  • Hi,

    Answers to your questions:

    1. Yes, this is correct.

    2. You need to keep CC3135 device in reset state to not interfere between CC3135 and programmer during writing into SPI flash.

    3. I have no experience with flashing SPI flash by Jlink. But if you have hardware with capability of writing SPI flash you can use them. For programming you need to use CC3135MOD pins FLASH_SPI_MOSI, FLASH_SPI_CLK, FLASH_SPI_nCS_IN, FLASH_SPI_MISO.

    Jan

  • Hi,

    We have few queries for using Uniflash tool to generate Gang programming image without connecting the device(CC3135MOD).

    1. which mode we need to use to generate the image(Development mode/Production mode).

    2. What is the difference between Production and development modes? since the development mode needs MAC address which we can't get without connecting the device.

    3.What mode to be used in the Uniflash, Simple or advance mode ?

  • Hi,

    1. I am not sure how development/production mode works in case of CC31xx devices, because I use CC3220 and CC3235 device. But generally you should to use production mode in case of gang programming.

    2. In development mode are enabled some features intended for development (e.g. reading content of sFlash by Uniflash). Yes, your comment is correct. If you don't want to prepare image for each device separately, you need to use production mode.

    3. It does not matter, because you want to upload Service Pack only.

    Jan