[OpenWrt-Devel] [PATCH] Tiny fix for the comgt 3G button hotplug script

2011-06-18 Thread Linus Nielsen Feltzing
The /etc/hotplug.d/button/05-3g script is unhappy if the chat script 
outputs anything on stdout. I fixed this by redirecting the output from 
ifup/ifdown to /dev/null. Without this fix, the 3G/WAN button won't work 
on my WRT54G3G with an Aircard 880 modem (since it outputs SIM ready 
and PIN set successfully when connecting).


Signed-off-by: Linus Nielsen Feltzing li...@haxx.se

---

Index: package/comgt/files/3g.button
===
--- package/comgt/files/3g.button   (revision 27213)
+++ package/comgt/files/3g.button   (working copy)
@@ -2,12 +2,12 @@
# use led for keeping track of the state
case $(cat /proc/diag/led/3g_green) in
1)
-   ifdown $1
+   ifdown $1  /dev/null
ifup wan
;;
0)
ifdown wan
-   ifup $1
+   ifup $1  /dev/null
;;
esac
 )}
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] RT3052 and Telephone support

2011-06-18 Thread jason duhamell
For my project of adding phone support to the rt3052, I would like to
receive bids.

On Thu, Jun 16, 2011 at 3:55 AM, Jonathan Bennett jbscienc...@gmail.comwrote:

 Try this one:
 http://www.rowetel.com/blog/
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] b44 ssb0:0: eth0: powering down PHY

2011-06-18 Thread Peter Wagner
Am Freitag, 17. Mai 2011, 22:04:07 schrieb Peter Wagner:
 accidently hit the send button...
 
 Hi,
 
 i created a c++ program and while testing it (it sends upd packets) i
 created a few millions packages and sent them to 192.168.1.1:4950 (my
 router running openwrt). its a wl500gP v1. while i was doing this the
 device gets unresponsive and i get lines like this:
 
 b44 ssb0:0: eth0: powering down PHY
 b44 ssb0:0: eth0: powering down PHY
 b44 ssb0:0: eth0: powering down PHY
 
 after doing this for about 2 minutes the device reboots. i think this is
 triggered by the watchdog as it get no enough process time from the
 sheduler.
 
 how can i track down why this powering down PHY happens?
 
 regards
 Peter
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel

i created this little c program (the code flys around somewhere in the inet) 
and modified it a bit it sends 1 udp packets to a host you specify
compile with gcc -o foo talker_foo.c
and run 
./foo $hostname $message_that_gets_sent

i can reproduce the error in ~10sec of running this program against a wl500gp 
kernel 2.6.39.1
after this 10sec i have about 160 lines like this
b44 ssb0:0: eth0: powering down PHY
in the output of dmesg.

i tested it against an unfiltered port.

greets

/*
** talker.c -- a datagram client demo
*/

#include stdio.h
#include stdlib.h
#include unistd.h
#include errno.h
#include string.h
#include sys/types.h
#include sys/socket.h
#include netinet/in.h
#include arpa/inet.h
#include netdb.h

#define SERVERPORT 4950	// the port users will be connecting to

int main(int argc, char *argv[])
{
	int sockfd;
	struct addrinfo hints, *servinfo, *p;
	int rv;
	int numbytes;

	if (argc != 3) {
		fprintf(stderr,usage: talker hostname message\n);
		exit(1);
	}

	memset(hints, 0, sizeof hints);
	hints.ai_family = AF_UNSPEC;
	hints.ai_socktype = SOCK_DGRAM;

	if ((rv = getaddrinfo(argv[1], SERVERPORT, hints, servinfo)) != 0) {
		fprintf(stderr, getaddrinfo: %s\n, gai_strerror(rv));
		return 1;
	}

	// loop through all the results and make a socket
	for(p = servinfo; p != NULL; p = p-ai_next) {
		if ((sockfd = socket(p-ai_family, p-ai_socktype,
p-ai_protocol)) == -1) {
			perror(talker: socket);
			continue;
		}

		break;
	}

	if (p == NULL) {
		fprintf(stderr, talker: failed to bind socket\n);
		return 2;
	}
	int i;
	for (i=0; i1;i++)
	{
		if ((numbytes = sendto(sockfd, argv[2], strlen(argv[2]), 0,
			 p-ai_addr, p-ai_addrlen)) == -1) {
perror(talker: sendto);
exit(1);
		}
	}
	
	freeaddrinfo(servinfo);
	printf(talker: sent %d bytes to %s\n, numbytes, argv[1]);
	close(sockfd);

	return 0;
}
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel