element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
STM32F4DISCOVERY Expansion Boards
  • Products
  • Dev Tools
  • STM32F4DISCOVERY Expansion Boards
  • More
  • Cancel
STM32F4DISCOVERY Expansion Boards
Forum STM32F4DIS-WIFI - no output from the wifi module
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
STM32F4DISCOVERY Expansion Boards requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 21 replies
  • Subscribers 10 subscribers
  • Views 2386 views
  • Users 0 members are here
  • stm32f4dis_wifi
  • stm32f4discovery
Related

STM32F4DIS-WIFI - no output from the wifi module

roli
roli over 11 years ago

I have just bought the STM32F4DIS-WIFI today and I have some problems getting it to work on my STM32F4 discovery board. The included example is for the MDK-ARM only and I had some trouble building parts of it (mainly the sn8200_core and sn8200_api files) with IAR. I fixed the problem by commenting out the #include <rtl.h> (I believe it's part of the MDK-ARM) and replacing it with this code:

 

#define INADDR_ANY ((unsigned long int) 0x00000000)
#define INADDR_NONE ((unsigned long int) 0xffffffff)
#define    htonl(l) lswap(l)
#define    htons(s) ((unsigned int)(((unsigned int)(s) >> 8) | ((unsigned int)(s) << 8)))
#define    ntohl(l) lswap(l)
#define    ntohs(s) htons(s)

 

I got the code to compile by doing this but it doesn't appear to be working. This is my main function:

void main() {
  //wifi init
  SN8200_API_Init(921600);
  WifiOn(seqNo++);
  GetStatus(seqNo++);
  WifiScan(seqNo++);
  WifiDisconn(seqNo++);
  WifiJoin(seqNo++);
  SnicInit(seqNo++);
  SnicIPConfig(seqNo++);

  while(1) {}
}

 

I didn't use any DBGBU and other functions (and I don't have anything connected to the USART3). IAR provides printf/scanf functions that work with the included debug console so I didn't see any need for that part of the code.

 

The problem that I am having is this: I get no input from the module. For instance the GetStatus function - I get the -GetStatus but not the actual status. The same goes for wifi scan. I never get the actual list of available SSIDs. I can actually disconnect and join the network though. If I enter my SSID, security mode and password then the module connects to the wifi network as expected. So apparently it is geting the data from the board. But I am not sure why I am not getting anything from the module.

  • Sign in to reply
  • Cancel

Top Replies

  • roli
    roli over 11 years ago in reply to roli +1 verified
    Got it. F*** IAR. It was their printf redirect that was making things not work as they should. I redirected that stream to a simple character array instead and what do you know... everything showed up…
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube