标签: tethering

Applescript单击Mac菜单栏中的特定图标

有时我使用PdaNet使用我的iPhone系绳.OSX的桌面客户端不像Windows的桌面客户端那么丰富.其中一个主要区别是OSX不允许在插入后立即自动连接到iPhone.

您是否知道使用Applescript单击菜单栏上的PdaNet图标然后选择并单击其上的"连接"选项?

以下是'PdaNetMac'应用程序的菜单栏图标:

在此输入图像描述

我看了下面的问题,但我是一个苹果新手,不知道如何在菜单栏上搜索PdaNet的图标:

  1. 使用AppleScript单击Mac OSX Lion上的菜单项
  2. Applescript:通过gui脚本单击菜单栏项
  3. 使用AppleScript访问停靠栏图标右键菜单项

我已确认已启用"为辅助设备启用访问".

根据上面的第二个问题,这是我目前的尝试:

ignoring application responses
    tell application "System Events" to tell process "PdaNet"
        click menu bar item 1 of menu bar 2
    end tell
end ignoring
do shell script "killall System\\ Events"
delay 0.1
tell application "System Events" to tell process "PdaNet"
    tell menu bar item 1 of menu bar 2
        click menu item "Connect" of menu 1
    end tell
end tell
Run Code Online (Sandbox Code Playgroud)

有趣的是,当我改变时,上面的脚本对我很有PdaNetFlux.

谢谢!!

macos applescript tethering

6
推荐指数
1
解决办法
4007
查看次数

Android:以编程方式启用WiFi热点

我试图打开便携式Wifi热点ON,通过参考此链接:
如何设置android wifihotspot的高级设置

这在三星Galaxy S3 Android v4.4.2上运行良好.(没有问题)
但是在具有相同或更低Android版本的其他设备上,应用程序崩溃并重新启动设备.

代码如下:

package com.android.startwifi;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import android.app.Activity;
import android.content.Context;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiManager;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;


public class Main extends Activity {

public WifiManager wifiManager;
public Context context;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    Log.i("hi1","hi");
    createWifiAccessPoint();
}
private void createWifiAccessPoint() {
    WifiManager wifiManager = (WifiManager)getBaseContext().getSystemService(Context.WIFI_SERVICE);
    if(wifiManager.isWifiEnabled())
    {
        wifiManager.setWifiEnabled(false);          
    }       
    Method[] wmMethods = wifiManager.getClass().getDeclaredMethods();  
    boolean methodFound=false;
    for(Method method: wmMethods){
        if(method.getName().equals("setWifiApEnabled")){
            methodFound=true;
            WifiConfiguration …
Run Code Online (Sandbox Code Playgroud)

java android android-wifi tethering

6
推荐指数
1
解决办法
2万
查看次数

Wi-Fi网络共享 - 如何获取已连接客户端的列表

当我的手机处于Wi-Fi网络共享模式时,有没有办法获得连接的MAC地址列表?

android wifi tethering

5
推荐指数
2
解决办法
2万
查看次数

如何阻止/断开连接/连接到开放的wifi热点(android)的客户端?

我能够以编程方式在Android 2.2中创建一个开放的wifi热点,并使用ARP-File读取连接客户端的ip和mac:这里的代码 现在我想找到一种限制使用wifi热点的方法.我想使用开放式网络而不是设置任何密钥.应该可以阻止某些客户端(可能是mac过滤)或断开已连接但未经授权的客户端.我们的想法是通过wifi连接向热点发送消息.应该允许一些客户端访问其他热点.我该如何开发类似的东西?非常感谢您的帮助或建议.

android wifi tethering

5
推荐指数
1
解决办法
6691
查看次数

java.net.ConnectException

当我通过USB连接并尝试连接运行在笔记本电脑上的网络服务来通过Google Nexus运行我的应用程序时,我遇到错误,但可以连接到Webservie。请指教。

     java.net.ConnectException: failed to connect to /192.168.1.122 (port 8080):       
           connect failed: ENETUNREACH (Network is unreachable)

            at libcore.io.IoBridge.connect(IoBridge.java:114)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
            at java.net.Socket.startupSocket(Socket.java:566)
            at java.net.Socket.tryAllAddresses(Socket.java:127)
            at java.net.Socket.<init>(Socket.java:177)
            at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
            at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
            at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
            at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
            at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
            at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
            at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
Run Code Online (Sandbox Code Playgroud)

java android httpwebrequest tethering google-nexus

5
推荐指数
1
解决办法
1万
查看次数

当设备连接到你的android wifi网络共享AP时如何获得通知?

我通过Android设备中的应用程序启用了Wi-Fi网络共享.当有人连接到我的应用程序所连接的Wi-Fi网络时,如何在我的应用程序中收到通知?我需要注册一些特定的广播接收器吗?

我已粘贴在应用程序源代码下面

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
((ToggleButton)   findViewById(R.id.toggle_tethering)).setOnCheckedChangeListener(this);
}

@Override

public void onCheckedChanged(CompoundButton button, boolean isChecked) {

   WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
   Boolean result = false;
   WifiConfiguration config = new WifiConfiguration();
   config.SSID = "Tab3OpenWifi";
   config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
   String setWifiApConfigurationMethodName = "setWifiApConfiguration";
   Method setWifiApConfigurationMethod = wifiManager.getClass().getMethod(setWifiApConfigurationMethodName, WifiConfiguration.class);
   result = (Boolean) setWifiApConfigurationMethod.invoke(wifiManager, config);

   if (result) {
      String setWifiApEnableMethodName = "setWifiApEnabled";
      Method setWifiApEnableMethod = wifiManager.getClass().getMethod(setWifiApEnableMethodName, WifiConfiguration.class, boolean.class);
      String message;
      if (isChecked) {
         result = (Boolean) setWifiApEnableMethod.invoke(wifiManager, null, true);
         if (result) { …
Run Code Online (Sandbox Code Playgroud)

android wifi tethering

5
推荐指数
1
解决办法
3357
查看次数

usb互联网选项不可用kitkat - 反向网络共享

我有Kitmax 4.4.4股票Android操作系统的Micromax Canvas A1(android one).

我是一个无根设备,我想在我的Android设备上使用PC上网下载/上网.

通过互联网帖子和视频,他们说应该在无线和网络菜单中提供"USB互联网"选项.但我无法在手机上找到它.

这个"USB互联网"功能是否已在kitkat中取出?

我还不想根植我的设备.你能告诉我如何用USB反转系绳吗?

任何帮助,将不胜感激.谢谢 :)

android-internet tethering android-4.4-kitkat

5
推荐指数
1
解决办法
8157
查看次数

如何在Android KitKat设备上启用wifi数据网络共享?

我正在使用带有android kitkat 4.4.4版本的Moto e.在谷歌搜索后,我发现tehering已禁用,以支持移动运营商的数据计划.

我可以通过usb网络共享和蓝牙网络共享来使用移动数据.

wifi tethering android-4.4-kitkat

5
推荐指数
1
解决办法
7550
查看次数

通过USB反向绑定多个Android设备

我正在尝试为我的Android应用程序设置测试环境,其中单独的设备需要Internet连接,但没有无线功能.

所以我决定使用usb反向网络共享.我的主机正在运行Ubuntu.我已设法为一台设备设置反向网络共享,连接正常,我可以通过此设备的adb shell ping google.com.

当我连接第二个设备时,第一个绑定停止工作.两个设备在其内部usb0接口上配置了相同的IP地址.

这是我到目前为止所拥有的:

  1. 主机上的端口转发已激活

    echo 1 > /proc/sys/net/ipv4/ip_forward
    
    Run Code Online (Sandbox Code Playgroud)
  2. Iptables规定主机路由流量:

    iptables -t nat -A POSTROUTING -s 169.254.255.2/24 -j MASQUERADE
    
    Run Code Online (Sandbox Code Playgroud)
  3. 插件第一个设备:

    ifconfig shows the device on usb0 @ ip 169.254.255.2/30
    
    Run Code Online (Sandbox Code Playgroud)
  4. 在第一台设备上(带adb shell)

    > route add default gw 169.254.255.2 dev usb0
    > setprop net.dns1 8.8.8.8
    > ping google.com --> is giving results
    
    Run Code Online (Sandbox Code Playgroud)
  5. 插件第二个设备

    ifconfig shows this device on usb1 @ ip 169.254.255.2/30 
    
    Run Code Online (Sandbox Code Playgroud)
  6. 在第二台设备上

    Add gw, set DNS like above
    
    Run Code Online (Sandbox Code Playgroud)

现在第二个设备可以ping google.com,但第一个没有.

当我更改内部IP或分配给主机usb0的IP时,usb1接口我无法通过adb连接到设备.

我怀疑这是一个网络问题,而不是亚行的问题?有任何想法吗?

linux usb android adb tethering

5
推荐指数
1
解决办法
1万
查看次数

移动电话公司如何检测您是否共享 3G/4G 互联网连接?

我刚刚与丹麦的一家电话公司进行了交谈,该公司在电话上提供“免费 3G/4G”,但是如果您创建热点并共享连接,他们会受到限制,此限制为 50GB。

他们如何检测您的移动设备是否正在共享连接?他们是否拦截了计算机/其他电话通过连接发送的一些特殊标头?

mobile cellular-network 3g tethering hotspot

5
推荐指数
1
解决办法
547
查看次数