2013年3月2日 星期六

upnpc testing report in real world


列出目前已經支援的routerports

/ # upnpc -m 192.168.2.23 -l

upnpc : miniupnpc library test client. (c) 2006-2008 Thomas Bernard

Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/

for more information.

List of UPNP devices found on the network :

desc: http://192.168.2.1/root.sxml

st: urn:schemas-upnp-org:device:InternetGatewayDevice:1


Found valid IGD : http://192.168.2.1:4444/wipconn

Local LAN ip address : 192.168.2.23

Connection Type : IP_Routed

Status : Connected, uptime=634, LastConnectionError : ERROR_NONE

MaxBitRateDown : 10000000 bps MaxBitRateUp 10000000 bps

ExternalIPAddress = 59.115.131.135

0 TCP 88->192.168.2.23:8082 'video' ''

1 TCP 89->192.168.2.23:8081 'video-1' ''

GetGenericPortMappingEntry() returned 713 (SpecifiedArrayIndexInvalid)


upnpc 新開一個port 80 mappingarm9 device 8080

/ # upnpc -a 192.168.2.23 8080 80 tcp

upnpc : miniupnpc library test client. (c) 2006-2008 Thomas Bernard

Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/

for more information.

List of UPNP devices found on the network :

desc: http://192.168.2.1/root.sxml

st: urn:schemas-upnp-org:device:InternetGatewayDevice:1


Found valid IGD : http://192.168.2.1:4444/wipconn

Local LAN ip address : 192.168.2.23

ExternalIPAddress = 59.115.131.135

InternalIP:Port = 192.168.2.23:8080

external 59.115.131.135:80 TCP is redirected to internal 192.168.2.23:8080





檢查一下 開port成功

/ # upnpc -m 192.168.2.23 -l

upnpc : miniupnpc library test client. (c) 2006-2008 Thomas Bernard

Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/

for more information.

List of UPNP devices found on the network :

desc: http://192.168.2.1/root.sxml

st: urn:schemas-upnp-org:device:InternetGatewayDevice:1


Found valid IGD : http://192.168.2.1:4444/wipconn

Local LAN ip address : 192.168.2.23

Connection Type : IP_Routed

Status : Connected, uptime=646, LastConnectionError : ERROR_NONE

MaxBitRateDown : 10000000 bps MaxBitRateUp 10000000 bps

ExternalIPAddress = 59.115.131.135

0 TCP 80->192.168.2.23:8080 'libminiupnpc' ''

1 TCP 88->192.168.2.23:8082 'video' ''

2 TCP 89->192.168.2.23:8081 'video-1' ''

GetGenericPortMappingEntry() returned 713 (SpecifiedArrayIndexInvalid)

/ # Jan 2 00:13:33 MJPG-streamer [936]: serving client: 220.132.160.12:36267

Jan 2 00:13:33 MJPG-streamer [936]: serving client: 220.132.160.12:36268


arm9 device ip = 192.168.2.23)需加上gateway

/ # route add -net 0.0.0.0 gw 192.168.2.1

否則會找不到device


在公司電腦開瀏覽器 打入59.115.131.135 然後enter就可以連上webcam


刪除這個port mapping

upnpc -m 192.168.2.23 -d 80 tcp


加入8080 mapping arm9 8080 port

/ # upnpc -m 192.168.2.23 -a 5050 tcp 8080 tcp

在其他上網電腦開瀏覽器 打入59.115.131.1358080 然後enter就可以連上webcam

(ex. mjpg-streamer-r63)










If we want 11131/11142 ports service to out arm9 board then just type

upnpc -m 192.168.1.23 -r 11131 tcp 11142 udp



upnpc : miniupnpc library test client. (c) 2006-2008 Thomas Bernard

Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/

for more information.

List of UPNP devices found on the network :

desc: http://192.168.1.1:5431/dyndev/uuid:0013d4d1-fe68-0013-d4d1-fe680032a9a2

st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found a (not connected?) IGD : http://192.168.1.1:5431/uuid:0013d4d1-fe68-0013-1

Trying to continue anyway

Local LAN ip address : 192.168.1.23

ExternalIPAddress = 192.168.50.111

InternalIP:Port = 192.168.1.23:11131

external 192.168.50.111:11131 TCP is redirected to internal 192.168.1.23:11131

ExternalIPAddress = 192.168.50.111

InternalIP:Port = 192.168.1.23:11142

external 192.168.50.111:11142 UDP is redirected to internal 192.168.1.23:11142




If we want 8080/8081 service to out arm9 board then just type

upnpc -m 192.168.1.23 -r 8080 tcp 8081 tcp

upnpc : miniupnpc library test client. (c) 2006-2008 Thomas Bernard

Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/

for more information.

List of UPNP devices found on the network :

desc: http://192.168.1.1:5431/dyndev/uuid:0013d4d1-fe68-0013-d4d1-fe680032a9a2

st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found a (not connected?) IGD : http://192.168.1.1:5431/uuid:0013d4d1-fe68-0013-1

Trying to continue anyway

Local LAN ip address : 192.168.1.23

ExternalIPAddress = 192.168.50.111

InternalIP:Port = 192.168.1.23:8080

external 192.168.50.111:8080 TCP is redirected to internal 192.168.1.23:8080

ExternalIPAddress = 192.168.50.111

InternalIP:Port = 192.168.1.23:8081

external 192.168.50.111:8081 TCP is redirected to internal 192.168.1.23:8081



check put route setting ,the port had been successfully added!!

2009年3月18日 星期三

use miniupnpc-1.2 to map port on ARM

#use upnpc to map port 2222 to 80 port
# router internal ip is 192.168.2.1
# ARM9 ip is 192.168.2.33
/mnt/upnpc-1.2/bin $ route add -net 0.0.0.0 gw 192.168.2.1
/mnt/upnpc-1.2/bin $ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.2.1 0.0.0.0 UG 0 0 0 eth0

/mnt/upnpc-1.2/bin $ ./upnpc -a 192.168.2.33 80 2222 tcp
upnpc : miniupnpc library test client. (c) 2006-2008 Thomas Bernard
Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
for more information.
List of UPNP devices found on the network :
desc: http://192.168.2.1:80/igd.xml
st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found valid IGD : http://192.168.2.1:80/upnp/control?WANIPConnection
Local LAN ip address : 192.168.2.33
ExternalIPAddress = 61.230.49.126
InternalIP:Port = 192.168.2.33:80
external 61.230.49.126:2222 TCP is redirected to internal 192.168.2.33:80
/mnt/upnpc-1.2/bin $

2009年3月2日 星期一

webcam VC0323+MI1320 Sensor driver support

webcam VC0323+MI1320 Sensor driver support, need to modify driver gspcav1-20071224 gspca_cpre.c
case BRIDGE_VC0323:
spca50x->epadr = 2;
spca50x->cameratype = YUY2; //arthur JPGV;
info("USB GSPCA camera found.(VC0323) ");
memcpy(&spca50x->funct, &fvc0321,
sizeof (struct cam_operation));
break;


and
case 0x0323:
spca50x->desc = Vimicro0323;
spca50x->bridge = BRIDGE_VC0323;
spca50x->sensor = SENSOR_MI1320; //arthur SENSOR_OV7670;

i use camstream for test 320x240 fps=10 test it ok.

2008年12月28日 星期日

zd1211b.ko/zd1211.ko working on at91rm9200

zd1211b.ko test get ip from wireless AP ok!! but very slow.
==========================================================================
~ $ ifconfig wlan0 up

~ $ iwconfig wlan0 essid SMC
~ $ Channel changed:5 to 1
~ $ iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wlan0 802.11b/g NIC ESSID:"SMC"
Mode:Managed Channel=0 Access Point: 00:13:F7:A4:44:5A
Bit Rate:0 kb/s
Retry:on RTS thr=9999 B Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:66/100 Signal level:49/100 Noise level:0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:5392 Missed beacon:0


~ $ iwevent
Waiting for Wireless Events from interfaces...
04:05:13.589203 wlan0 Scan request completed
04:05:15.191925 wlan0 New Access Point/Cell address:00:13:F7:A4:44:5A
lo Interface doesn't support scanning.

eth0 Interface doesn't support scanning.

04:05:28.385284 wlan0 Scan request completed
Channel changed:11 to 5
04:05:30.457702 wlan0 New Access Point/Cell address:00:13:F7:A4:44:5A
04:05:43.697876 wlan0 Scan request completed
Channel changed:11 to 5
04:05:45.660309 wlan0 New Access Point/Cell address:00:13:F7:A4:44:5A
lo Interface doesn't support scanning.

eth0 Interface doesn't support scanning.

04:05:58.017609 wlan0 Scan request completed
lo Interface doesn't support scanning.

eth0 Interface doesn't support scanning.

04:06:12.307159 wlan0 Scan request completed
cgi_half_bottom 0
lanrestart
No DHCP used by LAN, skip.
wlan0: No such process
ifconfig
lo Interface doesn't support scanning.

eth0 Interface doesn't support scanning.

04:06:27.416778 wlan0 Scan request completed
cgi_half_bottom 0
lanrestart
No DHCP used by LAN, skip.
wlan0: No such process
ifconfig
04:06:30.107025 wlan0 New Access Point/Cell address:00:13:F7:A4:44:5A
iwconfig
No DHCP used by LAN, skip.
udhcpc
udhcpc (v1.7.5) started
ifconfig
done
Sending discover...
lo Interface doesn't support scanning.

eth0 Interface doesn't support scanning.

Sending discover...
Sending discover...
Sending discover...
04:06:44.165558 wlan0 Scan request completed
Sending discover...
Sending discover...
******We Lose AP for 5 seconds
04:06:50.236267 wlan0 New Access Point/Cell address:Not-Associated
Sending discover...
Sending discover...
Sending discover...
Sending discover...
04:07:03.291656 wlan0 Scan request completed
04:07:05.254028 wlan0 New Access Point/Cell address:00:13:F7:A4:44:5A
04:07:18.338318 wlan0 Scan request completed
04:07:20.215515 wlan0 New Access Point/Cell address:00:13:F7:A4:44:5A
Sending discover...
Sending select for 192.168.2.195...
Lease of 192.168.2.195 obtained, lease time 86400
dns1 = 192.168.2.1, dns2 =
done
killall: crond: no process killed
lo Interface doesn't support scanning.

eth0 Interface doesn't support scanning.

04:08:29.702066 wlan0 Scan request completed
=====================================================================
zd1222.ko also ok !!

fix error: 'init_net' undeclared (first use in this function)

there are no init_net in kernel-2.6.23 and under ,so just remove "init_net" , the compile will pass.

ZD1211_2_22_0_0 driver

//for 2.6.24 above// for (adapters_proc_dir = init_net.proc_net->subdir;
for (adapters_proc_dir = proc_net->subdir; //for 2.6.23


//arthur create_proc_entry(ADAPTERS_PROC_DIR, S_IFDIR, init_net.proc_net);
create_proc_entry(ADAPTERS_PROC_DIR, S_IFDIR, proc_net); //arthur



//arthur remove_proc_entry(ADAPTERS_PROC_DIR, init_net.proc_net);
remove_proc_entry(ADAPTERS_PROC_DIR, proc_net); //arhtur

how to rename eth1 to wlan0

iftab put under /etc/ directory
=====================================================
eth0 mac 00:03:EA:11:4A:84
wlan0 mac 00:0E:2E:5E:42:37



and under arm9 console just type "ifrename"

P.S. ifrename is a tool in wireless_tools.29

done !!!!!

2008年12月25日 星期四

upnpc setting testing in real


列出目前已經支援的routerports

/ # upnpc -m 192.168.2.23 -l

upnpc : miniupnpc library test client. (c) 2006-2008 Thomas Bernard

Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/

for more information.

List of UPNP devices found on the network :

desc: http://192.168.2.1/root.sxml

st: urn:schemas-upnp-org:device:InternetGatewayDevice:1


Found valid IGD : http://192.168.2.1:4444/wipconn

Local LAN ip address : 192.168.2.23

Connection Type : IP_Routed

Status : Connected, uptime=634, LastConnectionError : ERROR_NONE

MaxBitRateDown : 10000000 bps MaxBitRateUp 10000000 bps

ExternalIPAddress = 59.115.131.135

0 TCP 88->192.168.2.23:8082 'video' ''

1 TCP 89->192.168.2.23:8081 'video-1' ''

GetGenericPortMappingEntry() returned 713 (SpecifiedArrayIndexInvalid)


upnpc 新開一個port 80 mappingarm9 device 8080

/ # upnpc -a 192.168.2.23 8080 80 tcp

upnpc : miniupnpc library test client. (c) 2006-2008 Thomas Bernard

Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/

for more information.

List of UPNP devices found on the network :

desc: http://192.168.2.1/root.sxml

st: urn:schemas-upnp-org:device:InternetGatewayDevice:1


Found valid IGD : http://192.168.2.1:4444/wipconn

Local LAN ip address : 192.168.2.23

ExternalIPAddress = 59.115.131.135

InternalIP:Port = 192.168.2.23:8080

external 59.115.131.135:80 TCP is redirected to internal 192.168.2.23:8080


檢查一下 開port成功

/ # upnpc -m 192.168.2.23 -l

upnpc : miniupnpc library test client. (c) 2006-2008 Thomas Bernard

Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/

for more information.

List of UPNP devices found on the network :

desc: http://192.168.2.1/root.sxml

st: urn:schemas-upnp-org:device:InternetGatewayDevice:1


Found valid IGD : http://192.168.2.1:4444/wipconn

Local LAN ip address : 192.168.2.23

Connection Type : IP_Routed

Status : Connected, uptime=646, LastConnectionError : ERROR_NONE

MaxBitRateDown : 10000000 bps MaxBitRateUp 10000000 bps

ExternalIPAddress = 59.115.131.135

0 TCP 80->192.168.2.23:8080 'libminiupnpc' ''

1 TCP 88->192.168.2.23:8082 'video' ''

2 TCP 89->192.168.2.23:8081 'video-1' ''

GetGenericPortMappingEntry() returned 713 (SpecifiedArrayIndexInvalid)

/ # Jan 2 00:13:33 MJPG-streamer [936]: serving client: 220.132.160.12:36267

Jan 2 00:13:33 MJPG-streamer [936]: serving client: 220.132.160.12:36268



arm9 device ip = 192.168.2.23)需加上gateway

/ # route add -net 0.0.0.0 gw 192.168.2.1

否則會找不到device


在公司電腦開瀏覽器 打入59.115.131.135 然後enter就可以連上webcam


刪除這個port mapping

upnpc -m 192.168.2.23 -d 80 tcp


加入8080 mapping arm9 8080 port

/ # upnpc -m 192.168.2.23 -a 5050 tcp 8080 tcp

在其他上網電腦開瀏覽器 打入59.115.131.1358080 然後enter就可以連上webcam

(ex. mjpg-streamer-r63)










If we want 11131/11142 ports service to out arm9 board then just type

upnpc -m 192.168.1.23 -r 11131 tcp 11142 udp



upnpc : miniupnpc library test client. (c) 2006-2008 Thomas Bernard

Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/

for more information.

List of UPNP devices found on the network :

desc: http://192.168.1.1:5431/dyndev/uuid:0013d4d1-fe68-0013-d4d1-fe680032a9a2

st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found a (not connected?) IGD : http://192.168.1.1:5431/uuid:0013d4d1-fe68-0013-1

Trying to continue anyway

Local LAN ip address : 192.168.1.23

ExternalIPAddress = 192.168.50.111

InternalIP:Port = 192.168.1.23:11131

external 192.168.50.111:11131 TCP is redirected to internal 192.168.1.23:11131

ExternalIPAddress = 192.168.50.111

InternalIP:Port = 192.168.1.23:11142

external 192.168.50.111:11142 UDP is redirected to internal 192.168.1.23:11142




If we want 8080/8081 service to out arm9 board then just type

upnpc -m 192.168.1.23 -r 8080 tcp 8081 tcp

upnpc : miniupnpc library test client. (c) 2006-2008 Thomas Bernard

Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/

for more information.

List of UPNP devices found on the network :

desc: http://192.168.1.1:5431/dyndev/uuid:0013d4d1-fe68-0013-d4d1-fe680032a9a2

st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found a (not connected?) IGD : http://192.168.1.1:5431/uuid:0013d4d1-fe68-0013-1

Trying to continue anyway

Local LAN ip address : 192.168.1.23

ExternalIPAddress = 192.168.50.111

InternalIP:Port = 192.168.1.23:8080

external 192.168.50.111:8080 TCP is redirected to internal 192.168.1.23:8080

ExternalIPAddress = 192.168.50.111

InternalIP:Port = 192.168.1.23:8081

external 192.168.50.111:8081 TCP is redirected to internal 192.168.1.23:8081



check put route setting ,the port had been successfully added!!