3g

Sending SMS AT commands to 3G modem using PHP

怎甘沉沦 提交于 2019-12-04 13:35:16
问题 I'm having trouble sending commands to a 3G modem connected on COM5. The modem is accepting the connection and receiving the commands. But there is something wrong (I think it is in my syntax/AT commands). In hyperterminal the commands are returning errors. If anyone can help I would gladly appreciate it. -------CODE BELOW------- <? exec("mode COM5 BAUD=9600 PARITY=N data=8 stop=1 xon=off"); $fp = fopen ("\\.\COM5:", "r+"); //$fp = dio_open('COM5:', O_RDWR | O_NOCTTY | O_NONBLOCK); if (!$fp)

charles 设置弱网测试

人盡茶涼 提交于 2019-12-04 13:33:32
charles 设置弱网测试 一款APP针对不同网络情况下都需要保证不会Crash,同时尽可能做到在弱网情况下也能达到功能正常使用,或者使用体验达到最佳。 我们借助Charles工具做弱网的测试,或者模拟2G、3G的网络情况。 Charles的使用方法如下: 首先,打开Charles,在Throttle Settings中设置网络状况,比如: 1、点击Proxy->Throttling Settings 2、☑️勾选[Enable Throttling]使的限制网速可用,相当于开启了限制网速的功能 3、关于网速的选择 概念介绍:Bandwidth(带宽)、Utilistation(利用百分比)、Round-trip(往返延迟)、MTU(最大传输单元) 3G:300k-2Mbps左右 2.5G(GPRS)一般在100kbps 2G(GSM)一般在5-9kbps 如果不习惯自定义设置带宽等,可直接在Throttle Preset下拉列表中选择,按照顺序,网速逐渐提升 3.3如果只想对某地址的请求进行弱网测试,☑️[Only for selected hosts] 然后,打开Sequence查看每个请求的执行情况,比如: 上图中可以看到每个请求的大小(size),以及请求的状况(status)。 PS:弱网、2G、3G建议的上下行速率如下,同时还可以控制丢包率的数据 网络 上行 下行

How can I communicate with a 3G modem via pySerial while it is connected?

白昼怎懂夜的黑 提交于 2019-12-04 12:55:59
I'm running Ubuntu 11.04 and a ZTE 3G modem. The modem is dialed with WvDial When the modem is not in use by WvDial I can send AT commands to the modem, and get information like signal strength: AT+ZCSQ +ZCSQ: 1, -87 OK But when WvDial is using the modem, /dev/ttyUSB0 is locked and I can't query it. Am I missing something obvious? Is there any way I can configure the modem, WvDial , or pyserial so I can send AT commands to the modem while it's connected? Ah. Apparently this modem exposes a couple of ttys to work with. I was able to use /dev/ttyUSB1 to sent AT commands while WvDial was

How to measure data usage of my app

拥有回忆 提交于 2019-12-04 10:27:58
I'm developing an Android app which needs to download a lot of data. To improve the usability, I'd like to measure the data traffic my app produces and give the users a hint if the app downloaded a specific amount of data. My current idea: Sum all downloaded bytes together and react on a specified limit. However, as I downloaded things in many different situations and in many different positions in the code, is there any other possibility to measure the data usage per app? AFAIK, sys/net/NETINTERFACE/statistics/rx_bytes reports the total amount of the whole system, so this is not a solution.

Is it possible to detect LTE connection using iOS SDK?

孤人 提交于 2019-12-04 08:54:24
问题 I'm using the reachability API to detect my current connection, but I can only distinguish between WIFI and 3G. I get the following flags: LTE: kSCNetworkReachabilityFlagsIsLocalAddress|kSCNetworkReachabilityFlagsIsWWAN|kSCNetworkReachabilityFlagsTransientConnection|kSCNetworkReachabilityFlagsReachable WIFI: kSCNetworkReachabilityFlagsIsDirect|kSCNetworkReachabilityFlagsReachable The problem is that LTE returns the same flags as a 3G connection. Is there any way to determine whether the user

How to access data usage settings of specific app programmatically?

不想你离开。 提交于 2019-12-04 06:53:13
问题 I'm developing an Android app which needs to download a lot of data. I'd like to measure the data traffic of my app for specific period of time (like month). This option is available on System Settings -> Data Usage. Is there any way to access this setting programmatically? Can I use some of android libs to get traffic? I know about TrafficStats class but I can not get traffic for specific period of time and when i boot device this data is lost. 回答1: Is there any way to access this setting

Is there a way to detect what kind of connection I'm using ? WiFi, 3G or Ethernet?

点点圈 提交于 2019-12-04 05:56:36
I'm trying to detect what kind of network connection I'm connected to. is it WiFi or 3G? is there a way to do that using c# win forms .net 2.0 or 4.0 ? foreach (NetworkInterface adapter in adapters) { if (adapter.OperationalStatus == OperationalStatus.Up) { if (adapter.NetworkInterfaceType == NetworkInterfaceType.Wireless80211) { lblNetworkType.Text = "you are using WiFi"; break; } else if (adapter.NetworkInterfaceType == NetworkInterfaceType.Ppp) { lblNetworkType.Text = "you are using 3G or ADSL or Dialup"; break; } else if (adapter.NetworkInterfaceType == NetworkInterfaceType.Ethernet) {

Giving PHP permission to access COM port

心已入冬 提交于 2019-12-04 03:26:17
问题 I'm creating a php script that connects to a 3G modem connected via serial connection on COM5. I'm getting the following error and I believe it is because php does not have r/w access to COM5: Warning: fopen(COM5:) [function.fopen]: failed to open stream: No such file or directory in C:\xampp\htdocs\SMStest\test2.php on line 9 // mode com1: BAUD=9600 PARITY=N data=8 stop=1 xon=off $fp = fopen ("COM5:", "w+"); if (!$fp) { echo "Uh-oh. Port not opened."; } else { $e = chr(27); $string = $e . "A

Get device signal strength

本秂侑毒 提交于 2019-12-03 21:13:04
I am trying to get the signal strength in dBm for the carrier, wifi, 3g, and 4g. I am currently using this code to get the carrier's and wifi from the status bar and I would like to know if there is another way or a better way? Also how could I get it for 3g and 4g? UIApplication *app = [UIApplication sharedApplication]; NSArray *subviews = [[[app valueForKey:@"statusBar"] valueForKey:@"foregroundView"] subviews]; NSString *dataNetworkItemView = nil; NSString *wifiNetworkItemView = nil; for (id subview in subviews) { if([subview isKindOfClass:[NSClassFromString(@

How to check iOS app size before upload

耗尽温柔 提交于 2019-12-03 14:22:42
问题 I would like to be able to check the size of my app before submitting to the app store. More specifically I need to know whether it will be below the magic 20 MB, to allow cellular downloads, since the app is created for a festival. 回答1: The install file downloaded from the App Store will vary based on the device and what thinning is done to your app. An ad hoc distribution .ipa file will give an estimate of how big the install file from the App Store will be. Archive your app in Xcode, then