• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: 关于UDP发送数据的一些请教.
#6
新會員
新會員


查看用戶資訊
谢谢啦.

發表於: 2008/12/16 19:38
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 关于UDP发送数据的一些请教.
#5
版主
版主


查看用戶資訊
請打電話給上海的 CAE Victor Wang (Tel: 86-21-5407-5319) 他比較有深入的研究。

發表於: 2008/12/16 8:40
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 关于UDP发送数据的一些请教.
#4
新會員
新會員


查看用戶資訊
UP,up,请版主大人回答一下小弟的问题哦,谢谢拉

發表於: 2008/12/15 23:06
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 关于UDP发送数据的一些请教.
#3
新會員
新會員


查看用戶資訊
首先谢谢您的回复,这个例子我是这样使用的:
...
static NODE_INFO UDP_NOD;
BYTE i;
UDP_NOD.IPAddr.v[0]= 192;
UDP_NOD.IPAddr.v[1]= 168;
UDP_NOD.IPAddr.v[2]= 0;
UDP_NOD.IPAddr.v[3]= 33;
MySocket = UDPOpen(5050, &UDP_NOD, 5050);
//MySocket = UDPOpen(5050, NULL, 5050);
//当我使用NULL时会发送广播消息,经过测试可以成功发送出去,但是当我使用以上的定义IP的方法后,并不能能够正确的发送消息,其中包括将IP定义为 255.255.255.255
if( MySocket == INVALID_UDP_SOCKET )
return;
请问,是不是UDP_NOD数据的IP地址定义方法不是我所写的这样?

發表於: 2008/12/14 14:20
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 关于UDP发送数据的一些请教.
#2
版主
版主


查看用戶資訊
Microchip 上海 Office CAE 回答如下,如還有疑問請聯絡上海 CAE Victor Wang (Tel: 21-5407-5319)

According to UDPOpen function

UDP_SOCKET UDPOpen(

UDP_PORT localPort,

NODE_INFO * remoteNode,

UDP_PORT remotePort

);



Where the ‘remoteNode’ is a pointer to the ‘NODE_INFO’ structure. ‘NODE_INFO’ contains the IP address and MAC address information of the remote node.



So when call UDPOpen both the IP address and MAC address of the remote node should be provided.

發表於: 2008/12/12 15:09
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


关于UDP发送数据的一些请教.
#1
新會員
新會員


查看用戶資訊
请教斑竹,我使用TCP/IP协议栈的UDP发送数据时遇到以下问题,当使用OPEN函数,将remoteNode这个参数取值为空时,可以正常发送广播数据,但是将这个参数制定为一个具体的IP地址时,数据不能正常发送,我想请教remoteNode这个参数如果指定为一个具体的IP地址的定义方法(例如定义为192.168.0.33),请斑竹指点.谢谢

發表於: 2008/12/11 23:10
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------