We have a Linux device that configures a p2p network (wifi-direct). Everything works fine on Android versions lower than 13 but when scanning wifi-direct devices on an Android 13, it does not appear.
Anyone is experiencing this issue?
I found the following information -> link but I don't know how to procedd or if it is the problem.
My wpa_configuration_p2p.conf is something like:
ctrl_interface=/var/run/wpa_supplicant
update_config=1
device_name=DIRECT-AAAbbb
device_type=1-0050F204-1
config_methods=virtual_push_button
p2p_go_intent=15
country=ES
network={
ssid="DIRECT-AAAbbb"
psk="xxxxxxxx"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
mode=3
disabled=2
}
network={
ssid="DIRECT-AAAbbb"
bssid=xx:xx:xx:xx:xx:xx
psk="xxxxxxxx"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
mode=3
disabled=2
}
Any help would be very appreciated.
Thanks!
Related
I have upgraded my Nexus 5 to Nougat (7.1.2) and had to wipe it.
I tried to restore my WLAN networks by copying the old wpa_supplicant.conf, which crashed the whole wlan module. By comparing the old to the fresh file I noticed that on the new one the networks contain a new field id_str:
Old:
network={
ssid="WLAN2"
key_mgmt=NONE
priority=1
}
New:
network={
ssid="WLAN2"
key_mgmt=NONE
priority=1
id_str="%7B%22creatorUid%22%3A%221000%22%2C%22configKey%22%3A%22%5C%22WLAN2%5C%22NONE%22%7D"
}
Is there any way to generate the id_str, such that dont have to reconfigure all the networks?
Im trying to copy some files to and from a windows share. I am using python 2.7 and the pysmb library. This works fine with win7, but not with android. I build my connection over VPN with SMBConnection. listShares and listPath is working. Under win7 there is no problem using also os.path.isdir or shutil.copyfile. But that does not work with android. This is my code:
server_name = '192.168.168.12'
conn = SMBConnection(username=username, password=password, my_name='waldi2'
remote_name=server_name, domain=domain, use_ntlm_v2=True,
sign_options=SMBConnection.SIGN_WHEN_SUPPORTED, is_direct_tcp=True)
connected = conn.connect(server_name, 445)
# obtain a list of shares:
Response = conn.listShares(timeout=30) # !!!working, shows e.g.(' Share[', 20, '] =', u'JBW_in')
os.path.isdir('//192.168.168.12/JBW_in/') # is False with android, True with win7 !??
shutil.copyfile('/sdcard/waldi2_0/data/stop.txt', '//192.168.168.12/JBW_in/stop.txt')
This is no prob with win7, but with android it throws:
[Errno 2] No such file or directory: '//192.168.168.12/JBW_in/stop.txt'
Any clues? would be very very welcome ....
Or maybe alternative approaches to manage some python-based file-exchange between android and windows-server.
If I understund you correctly you are trying to connect to an android device via SMB. By my knowledge android doesnt have support for SMB server natively, but you could install a third-party app with a SMB server.
I'm porting bluetooth to JB (project code discussed here: https://groups.google.com/forum/#!forum/renesas-emev-osp) and I managed to start it up, both manually (bttest enable) and through the Power Widget button. So code-wise integration seems fine, but a Bluetooth item doesn't appear, even after a full clean rebuild, under the System Settings menu. I have these set of course:
$ grep BLUE *.mk
BoardConfig.mk:BOARD_HAVE_BLUETOOTH := true
BoardConfig.mk:BOARD_HAVE_BLUETOOTH_BCM := true
but looks like it isn't enough, to enable BT settings. What did I miss?
I had the same problem recently when I compiled my own AOSP.
After a lot of trial-and-error it turned out that I was missing one option in one of these files:
/system/etc/permissions/handheld_core_hardware.xml
/system/etc/permissions/tablet_core_hardware.xml
Which file to edit depends on which file you have in the directory /system/etc/permissions.
If you have root access (which I guess) then you can even simply edit the corresponding file on your device without the need of recompiling / flashing (I personally use ES File Explorer to do that).
Just add the following line to either of these files:
<feature name="android.hardware.bluetooth" />
Then start / restart the device and bluetooth option should be enabled in the system settings.
Cheers,
Frank
I'm facing a problem and would really appreciate your help...
Android SDK: 4.0
Phonegap: 1.8.1
Pusher: 1.12
I have created an Android project using Phonegap that needs to receive server notifications through Pusher.
I'm running it in Eclipse and AVD emulator, but the problem is that every time I try to establish a connection to pusher, I get an Unavailable state from the bind to state_change.
I have tested the connection to Internet in the emulator browser and it works fine. I have also tested that the server is responding and that the Pusher key is the right one by testing my code on Firefox.
This are the steps I have followed:
I have included the WebSocket.java and WebSocketFactory.java files in the src folder.
I have included websocket.js file in my js folder and included a reference in the index.html file.
I have included a reference to http://js.pusher.com/1.12/pusher.js in the index file.
I have included the following line in my Android App.java file: this.appView.addJavascriptInterface(new WebSocketFactory(this), "WebSocketFactory");
This is the code I'm using to connect to Pusher:
// Connect
var pusher = new Pusher(CONFIG.PUSHER.APP_KEY);
pusher.connection.bind('state_change', connectionStateChange);
function connectionStateChange(state) {
alert(state.current);
}
Is there something I'm missing? Any ideas on why the connection is not working or about where to check?
Thanks for your help.
Chadid
For version 2.x of pusher-js and above the library will work within PhoneGap without any additional requirements or setup. Simply include the library and use it - no need for WebSocket.java or WebSocketFactory.java.
For version 1.x this blog post and associated code demonstrates how to get Pusher working on PhoneGap:
http://blog.pusher.com/2012/7/5/pusher-on-phonegap-for-android
I am working on the TI OMAP platform with Android as the operating system. For one UseCase, we have to toggle one of the LED's in the device. The LED has number of "Device Attributes" and from the Application Layer [.java], we want to read a "Device Attribute".
When we do run the cat command on the adb prompt:
# cat /sys/devices/device_name/device_attribute
# device_attribute:invalid length
We get the error "invalid length". Hence, I wanted to know is there a way to read a "Device Property" such that it is accessible to the App Layer as well.
I found a similar question on another forum http://android.modaco.com/topic/312770-possible-solution-for-lack-of-notification-light-developers-needed but it was also unanswered.
Thanks for the replies !!!
Solution
The device was only having "set_device_attribute" but since "get_device_attribute" was missing, we were getting "invalid length" issue when "read" command to that device property was issued.
I added a new API named:
static ssize_t get_device_attribute(struct device *dev, struct device_attribute *attr,
char *buf)
{
.........................
.........................
.........................
}
and updated the device attribute
static DEVICE_ATTR(device_property, 0777,get_device_attribute, set_device_attribute);
invalid length often indicates a directory. Try to cd into the last "device_attribute".
Alternativeley you can also search for device info in "/proc".
You probably have the Linux kernel source code,
search the particular sysfs implementation of the device, see how it was programmed.