PIC18F97J60+mrf24wb WIFI API

pic_send实现图片的传输功能 在Linux环境下建立服务器,绑定地址,监听,接受,选择需要发送的图片,写入缓存器,在客户端定义图片的缓存大小,用返回的图片长度进行操作,实现图片在QT界面的显示。 立即下载

Unlike Ethernet, a WiFi application needs to initiate a connection to an access point or an ad hoc network) before data communications can commence. In order to initiate an connection there is a sequence of steps that should be followed. 

 

1) A connection profile must be created (see WF_CPCreate()). The connection profile contains information directing the WiFi driver about the nature of the connection that will be established. The connection profile defines: 

a. SSID (name of Access Point) 

b. Security (open, WEP, WPA, etc.) 

c. Network type (infrastructure or ad hoc). 

 

The Connection Profile functions are used to create and define an connection profile. These functions all begin with WF_CP… 

 

2) The connection algorithm must be defined, and applies to all connection profiles. For most applications the defaults will be sufficient. For example, the default connection algorithm channel list for scanning is 1, 6, and 11. However, if, in your application you know the Access Point will always be on channel 6 you could change this setting, thus making the scan process more efficient. Functions pertaining to the connection algorithm all begin with WF_CA… 

 

3) Once a connection profile and the connection algorithm are customized for an application, the WF_CMConnect() function must be called to initiate the connection process. 

 

4) After WF_Connect() is called the host application will be notified when the MRF24WB0M has succeeded (or failed) in establishing a connection via the event mechanism. The WF_Config.c file has a function, WF_ProcessEvent(), that is a template for processing MRF24WB0M events. In the WiFi demos it simply prints to the console (if the UART is enabled) that the event occurred. This file can be modified to suit the needs of an application – for example, an application could pend on a global flag that would be set in WF_ProcessEvent() when the connection succeeded. Please refer to WF_ProcessEvent for more information on WiFi event handling. 

 

The MRF2WB0M demos (under the Demo App, WiFi Console, and WiFi EZ Config demo directories) contain a function, WF_Connect(), in MainDemo.c that executes the above steps and can be referred to as an example of how to initiate a WiFi connection. The WF_Config.h file has several compile-time constants that can be customized (e.g. MY_DEFAULT_SSID_NAME) as needed. 

 

This help file book describes the host API to the MRF24WB0M on-chip connection manager which creates and maintains Wi-Fi connections. The API is divided into these major sections:

API Section 
Description 
Functions to initialize the host API and MRF24WB0M 
Connection Profile 
Functions to create and maintain one or more connection profiles 
Connection Algorithm 
Functions to fine tune the connection algorithm 
Connection Manager 
Functions to start and stop an 802.11 connection 
Scan 
Functions to scan for wireless networks 
Tx Power Control 
Functions to control the MRF24WB0M Tx power 
Power Save 
Functions to save power consumption by the MRF24WB0M 
Multicast 
Functions to create multicast filters 
Miscellaneous 
Functions to set a custom MAC address, get device information, etc. 
MRF24WB0M Events 
Functions to handle events from the MRF24WB0M 

 

SPI

The WF_Spi.c file contains functions that the Wi-Fi Driver will use to initialize, send, and receive SPI messages between the host CPU and the MRF24WB0M. To communicate with the MRF24WB0M, which is always an SPI slave, the host CPU SPI controller needs to be configured as follows:

  • Mode = 0
  • CPOL (clock polarity) = 0
  • CPHA (clock phase) = 0
  • Host CPU set as master
  • Clock idles high
  • 8-bit transfer length
  • Data changes on falling edge
  • Data sampled on rising edge

 

Below is a list of functions in WF_Spi.c that must be customized for the specific host CPU architecture:

Function 
Description 
WF_SpiInit() 
Initializes the host CPU SPI controller for usage by the Wi-Fi driver. Called by the Wi-Fi driver during initialization. 
WF_SpiTxRx() 
Transmits and/or receives SPI data from the MRF24WB0M. 
WF_SpiEnableChipSelect() 
Set slave select line on MRF24WB0M low (start SPI transfer).

If SPI bus is shared with any other devices then this function also needs to save the current SPI context and then configure the MRF24WB0M SPI context. 
WF_SpiDisableChipSelect() 
Set slave select line on MRF24WB0M high (end SPI transfer).

If SPI bus is shared with any other devices then this function also needs to restore the SPI context (saved during WF_SpiEnableChipSelect()). 

 

External Interrupt

The WF_Eint.c file contains functions that the Wi-Fi Driver will use to enable and disable the MRF24WB0M external interrupt as well as get interrupt status. The functions in this module need to be customized for the specific host CPU architecture. 

The MRF24WB0M asserts its EXINT (external interrupt) line (active low) when specific events occur, such as a data message being received. Note that the host CPU has a choice to either configure the EXINT line to generate an actual interrupt, or, it can be polled. Below is a list of the Wi-Fi Driver functions within WF_Eint.c that must be customized for the specific Host CPU architecture.

Function 
Description 
WF_EintInit() 
Configures the interrupt for use and leaves it in a disabled state. Will be called by the Wi-Fi driver during initialization. If polling the EXINT pin then this function won’t have any work to do except leave the interrupt in a logically disabled state. 
WF_EintEnable() 
Enables the MRF24WB0M external interrupt. If using real interrupts then enable the interrupt. If polling the EXINT pin then this function enables polling of the pin. 
WF_EintDisable() 
Disables the MRF24WB0M external interrupt. If using real interrupts then disable the interrupt. If polling the EXINT pin then this function disables polling of the pin. 
WF_EintIsr() 
This is the interrupt service routine invoked when the EXINT line goes low. It should perform any necessary housekeeping , such as clearing the interrupt. The interrupt must remain disabled until the Wi-Fi Driver calls WF_EintEnable(). The Wi-Fi driver function, WFEintHandler() must be called. 
WF_EintIsDisabled() 
Returns true if the external interrupt is disabled, else returns false. 
WFEintHandler() 
This function does not need to be customized – it is part of the Wi-Fi driver. However, it is added to this list because it must be called each time the MRF24WB0M interrupt service routine (ISR) occurs. 
WF_Config

The WF_Config module (WF_Config.h/WF_Config.c) is used to control several aspects of the WiFi Driver behavior. Most of the customization of the Wi-Fi module is done from the context of this module.

Removal of Unused Driver Functions

In WF_Customize.h there is a block of defines that can be commented out to remove those sections of the Wi-Fi host driver that are not needed by the application. This allows the saving of code and data space.

#define 
Controlling Functions 
WF_USE_SCAN_FUNCTIONS 
Scan API 
WF_USE_TX_POWER_CONTROL_FUNCTIONS 
Tx power control API 
WF_USE_POWER_SAVE_FUNCTIONS 
Power save API 
WF_USE_MULTICAST_FUNCTIONS 
Multicast API 
WF_USE_INDIVIDUAL_SET_GETS 
Affects all get and set functions, except the following:
WF_CPSetElements()
WF_CPGetElements()
WF_CASetElements()
WF_CAGetElements() 
WF_USE_GROUP_SET_GETS 
Affects the following functions:
WF_CPSetElements()
WF_CPGetElements()
WF_CASetElements()
WF_CAGetElements() 
WF_DEBUG

This define enables the WF_ASSERT macro in the Wi-Fi driver. Customer code is free to use this macro. The WF_ASSERT macro can be compiled in or out via the WF_DEBUG define. See the comment above the WF_DEBUG define in WF_Customize.h for details.

WF_CONSOLE

The Wi-Fi driver has a UART console application built in that allows one to type in command lines and has them parsed. If this functionality is not needed than it can be compiled out by commenting out the WF_CONSOLE define.

WF_ProcessEvent()

This function is called by the Wi-Fi Driver when an event occurs that the host CPU needs to be notified of. There are several Wi-Fi connection related events that the application can choose whether to be notified or not. And, there are several events the application will always be notified of. 

The function WF_ProcessEvent() can be customized to support desired handling of events.

Modules
Name 
Description 
Functions to setup, use, and teardown connection profiles 
Functions to alter the behavior of the connection process 
Functions to manage the connection process 
Functions to direct the MRF24WB0M to initiate a site survey 
API to control the Tx power of the MRF24WB0M 
Functions to alter the power savings features of the MRF24WB0M 
Functions for controlling miscellaneous features of the MRF24WB0M 
Topics
Name 
Description 
Describes how to receive and act on events from the MRF24WB0M 
 
Describes some basic tips for setting up and configuring a WiFi network. 
Lists some answers to some common WiFi questions. 
pic单片机控制cc2500无线模块 想学习pic单片机的,和无线模组通讯的可以下来学习一下,所有的代码都经过测试,编译器用picc的。 立即下载

相关推荐

PIC以太网程序(PIC18F97J60+MPLAB IDE 8.1+HI-TECH PICC9.51)

以PIC18F97J60单片机自带以太网模块设计,软件包含SNMP+MICROCHIP得IP协议栈,

认证服务器Authpuppy搭建要点

最近在做无线认证上网的项目,用到wifidog+authpuppy,今天倒腾authpuppy,本来以为很简单,结果因为一些小问题,卡壳好久,记录如下: 1、authpuppy是php写的,数据库用mysql,推荐在linux下部署,本人直接用wamp来做,结果出现了一个较为诡异的问题,最后还是改用linux; 2、Ubuntu 12.04 安装 Apache2+PHP5+My

smalldown的专栏 1681

强大的免费图片处理软件:picasa2简体中文版

注意:只有安装在默认的安装目录才会是中文版,改变默认安装目录后可能会是英文版的!Picasa原为独立收费的图像管理、处理软件,其界面美观华丽,功能实用丰富。现已改为免费软件。只需拥有Picasa,你就可以随心所欲地体验你的数码相片了。  Picasa 是一个可在计算机上查看、整理、修改和共享数码照片的软件,它会让所有这些工作变得简单而有趣。Picasa 不会未经您的允许就删除照片或将照片放到网络上。  - 自动将你的相片从你的数码相机传输到你的电脑上.  - 管理图片并让你能在几秒中内查找到所需的图片.  - 让你轻松地编辑, 打印以及共享相片  - 创建幻灯片, 定购打印以及其它更多!  Picasa会自动根据照片拍摄的时间,目录,机型来判断,自动建立像簿,查找方便,还有timeline功能。  Picasa 要求:  配备 300MHz Pentium处理器和 MMX技术的计算机。  64 MB RAM(建议 128MB)  50 MB 的可用磁盘空间(建议 100MB)  800 ×600 像素,16 位彩色显示器  Microsoft Windows 2000 或 Microsoft Windows XP。  Microsoft Internet Explorer 5.01 或更高版本(建议 6.0 版)。任何时候,如果收到“无法授权”的出错信息,您应当升级到 IE 6.0。  Microsoft DirectX 7.0 或更高版本(XP 系统应配备 8.1,建议配备 9.0b)。  可选:56K 或更快的互联网连接速度(以便访问所有联机服务)。  支持的文件类型有:  图片:jpg、bmp、gif、png、psd、tif  电影:avi、mpg、wmv、asf、mov (QuickTime)  RAW 数据文件,包括 Canon、Nikon、Kodak、Minolta 和 Pentax 相机支持这种格式的文件。  目前可用于中文(简体及繁体)、荷兰语、英语(美国和英国)、法语、德语、意大利语、日语、韩语、葡萄牙语、俄语以及西班牙语。  注意:不支持 Microsoft Windows ME、Microsoft Windows 98 和其他早期版本的 Windows 操作系统在本网站上下载。

wifidog authpuppy 服务器搭建

安装环境(64位 Ubuntu 14.04.4 LTS \n \l )一、安装各种软件包1、apache和php sudo apt-get update sudo apt-get install apache2 php5 复制代码 2、安装数据库(postgresql或者mysql) sudo apt-get install postgresql 复制代码 3、安装需要的库 sudo apt-get install php5-cgi 复制代码 二、安装authpuppy1、到

wangmj518的专栏 1370

Voronoi算法构建多晶

孪晶多晶 采用孪晶的原子链作为种子通过voronoi算法可以得到孪晶多晶结构。 孪晶种子: txt文件不需要特殊设置 box 150 150 150 random 8 得到孪晶多晶: 通过改变孪晶种子的长度可以得到不同孪晶片层厚度的多晶。 准二维柱晶 所有晶粒在某一维度的晶向一致,晶粒仅在平面内具有旋转关系,所有晶界为旋转对称晶界,这种结构的多晶其位错滑移在某些方向受限,但是能极大的提高晶粒...

yamatachi的博客 5280

双极性步进电机驱动技术:从H桥电路到精准控制

本文深入解析了双极性步进电机驱动技术的核心,从H桥电路的基础原理讲起,阐述了其作为实现电机正反转和精准控制的关键。文章详细介绍了H桥的工作模式、防共态导通设计,并对比了L298N、DRV8825及TMC2209等主流集成驱动芯片的选型。进一步探讨了通过微步进与电流矢量控制实现平滑、静音运行的高级技术,并提供了基于STM32的实战代码与避坑指南,帮助开发者从理论到实践全面掌握精准运动控制。

tea88的博客 595

authpuppy 认证服务器搭建

此文仅限于搭建authpuppy 认证服务器,不包含认证插件等安装,仅说明步骤以备下次安装忘记步骤、耽误时间。 环境:ubuntu10.04 软件版本:authpuppy-1.0.0-stable.tgz 准备工作:ubuntu中安装Apache2,php5,mysql,及 postgres。具体的步骤可以去搜下,一般的多是apt-get install 就OK。postgres 安装...

weixin_30810239的博客 254

macOS Monterey官方镜像高速下载指南(附迅雷链接+兼容性清单)

本文提供macOS Monterey官方镜像的高速下载指南,重点介绍利用迅雷等工具加速下载官方安装包的有效方法。同时,详细列出了系统兼容性清单,帮助用户在下载前确认设备支持,并分享了从下载、验证到安全安装的完整流程与常见问题解决方案。

j7k8l的博客 2184

一步一步搭建 OAuth 认证服务器

现在越来越多开放的互联网公司提供对外的 API 接口,使得第三方应用开发人员可以开发基于该平台接口的应用程序。国外有Twitter、Flicker Service等;国内的,像腾讯微博开放平台、新浪微博开放平台等等。 这些平台接口的认证方式,无一例外的,都采取了 OAuth 来实现(Twitter原来使用的是Basic Auth方式,后来全面转向OAuth)。 那么,OAuth 是

leeyisoft的专栏 1928

【智能制造】- APS系列|05 APS 排产的五大底层算法逻辑

很多人误以为APS只是给生产工单排先后顺序,实则整套系统依托成熟算法体系,完成多维度约束下的最优生产决策在制造业数字化排产普及的当下,依旧有不少制造管理者对APS存在认知误区,将其等同于简易工单排序工具。事实上,专业级高级计划与排程系统,早已脱离单纯按时间排序的基础功能,而是依托一整套成熟完善的底层算法逻辑,整合现场各类生产限制条件,在海量变量中自动推演、筛选、输出最贴合企业经营目标的生产方案。

qq_40821260的博客 435

IWR6843ISK+DCA1000EVM 本人遇到的所有报错和解决方案

本文详解了初次使用DCA1000EVM和mmave studio遇到的一系列的问题以及解决方法

2301_77883976的博客 3306

Tomcat上部署Wifidog认证服务器

前言:这个服务器的搭建只是为了了解wifidog与认证服务器的具体交互过程,在搭建商用认证服时,需要有所改进。 关于wifidog认证的流程,下面几篇博客介绍的很不错: http://blog.youkuaiyun.com/huithe/article/details/27195903 一.了解认证交互的数据 搭建wifidog authpuppy服务器,通过抓包,了解了认证过

cocos_yang的博客 1332

风力摆控制系统 PCB 设计 3 要点:STM32+MPU6050+空心杯电机驱动一体化

本文详细解析了风力摆控制系统PCB设计的3大核心要点,重点介绍STM32主控、MPU6050姿态传感器与空心杯电机驱动的一体化方案。通过系统架构设计、PCB布局布线技巧以及噪声抑制方案,帮助参赛者在电子设计竞赛中构建高精度、高稳定性的风力摆控制系统,提升竞赛作品性能。

weixin_30363285的博客 359

authpuppy mysql_php5+apache2+mysql环境安装authpuppy

所用环境: php5, apache2服务器首先检测环境:check_configuration.php,执行该文件,在安装authpuppy之前保证所有必须的条件都满足。 可能会遇到的问题: 解决办法:1.PDO has some drivers installed : FAILED如果你用的数据库是mysql, 请安装; sudo apt-get install php5-mysql2. ...

weixin_39622760的博客 196

tongweb中间件selectApp.jsp存在任意文件上传(含批量验证poc)

tongweb中间件selectApp.jsp存在任意文件上传(含批量验证poc)

weixin_43567873的博客 1985

ESP32设备驱动-MLX90393磁场传感器驱动

MLX90393 磁场传感器可以在运行时重新编程为不同的模式和不同的设置。 该传感器使用 Melexis 专有的 Triaxis® 技术提供与沿 XYZ 轴感应的磁通密度成比例的 16 位输出,还提供温度输出信号。 这些数字值可通过 I2C 和 SPI 获得,其中 MLX90393 是总线上的从设备。

视觉与物联智能 2351

wifi的web 认证。

wifi的web 认证。wifidog+authpuppy+php 或者Wiwiz Auth API

weixin_33827965的博客 464

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

openwrt下的wifidog安装及web认证界面设置

前言: 1、因手头有一个7620N芯片的大功率无线路由器(万兴达WR5508商用路由),由于要使用无线广告营销功能,但在网上搜寻了很久,都没找到合适的固件。 2、可能有人会说支持7620方案的广告营销固件多的是,但这款路由器是大功率的,500mW,刷了海蜘蛛、RippleOS以及其他有wifidog功能的固件,无线超过3-5米就没有信号了。只有刷了openwrt和PandoraBox固

waxind的博客 1万+

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

ddwrt+wifidog搭建热点认证系统(无线路由器web认证)

先来说说什么是热点认证系统,如果你有用过酒店或者机场的wifi,当你连上网络后试图去浏览某些页面的时候就会被从定向到一个特定的页面要求你登录啊什么的,是的,这就是热点登陆系统,可能也可以叫做wifi login portal。不过是什么,如果你理解了这概念,或者觉得有用,那么我们就来实际的搭建一下吧。 准备工作: 1、一个支持ddwrt的路由器,关于如何得到这个路由器以及那些是兼容的请

创造晴天 6万+

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

将普通路由器设置成微信连WiFi路由器的方法

本文介绍将家用普通路由器设置成微信连WiFi路由器的方法。 1. 登录路由器后台,找到无线网络的SSID名称和密码的地方。将SSID和密码分别设置为: SSID: FreeWiFi 密码: WX12345678 比如TP-LINK路由器的设置方法如下 对于双频路由器(指在2.4G和5G两个频率的),将2.4G的WiFi的SSID和密码分别设置为 FreeWiFi 和 WX...

weixin_33670786的博客 595

wifidog和authpuppy配合使用,实现wifi认证

通过在路由器系统(比如dd-wrt,openwrt)安装wifi看门狗程序wifidog,在认证服务器安装authpuppy wifi认证程序,可以实现类似在商场、机场、银行经常看到的免费wifi使之前看到的认证页面或产品、企业广告、介绍页面的功能。(wifidog 和 authpuppy 都是开源项目) wifidog 官网地址:http://dev.wifidog.org/ au

技术无止境 1684

wifidog+authpuppy认证页面的配置

路由器上用的是wifidog  client,服务器后端管理用的是authpuppy。 首先,选择自己的操作系统,在http://www.authpuppy.org/doc/Main_Page网站里面,我的操作系统是Linux。 然后到这个网站http://www.authpuppy.org/doc/Getting_Started去下载check_configuration.php这个文

创造晴天 3万+

wifidog+authpuppy搭建WiFi 接入设备认证测试平台

0:前提 其实搭建认证环境都是基础,zhici

OpenWrt/WLAN/驱动/Android/嵌入式开发总结 3万+

WiFidog运行环境及与authpuppy交互数据

0:WiFiDog运行环境 /wlan/portal/buildroot/etc # ps -w \ PID USER VSZ STAT COMMAND 1 root 868 S init 2 root 0 SW< [kthreadd] 3 root 0 SW< [ksoftirqd/0]

OpenWrt/WLAN/驱动/Android/嵌入式开发总结 1万+

authpuppy mysql_authpuppy 认证服务器搭建

环境:ubuntu10.04软件版本:authpuppy-1.0.0-stable.tgz准备工作:ubuntu中安装Apache2,php5,mysql,及 postgres。具体的步骤可以去搜下,一般的多是apt-get install 就OK。postgres 安装名为postgresql1.首先在authpuppy 官网下载源码http://www.authpuppy.org/。找到dow...

weixin_26873711的博客 262
上一篇: PIC18F97J60+MRF24WB APPDEMO main loop
下一篇: 关于指针和数组的区别
pine222
博客等级 码龄15年 26粉丝 18原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值