I have a requirement where the background network scan should be disabled when there is data transfer happening between devices as it causes break in data. When I went through internet, I found the fix to this problem by turning on streaming mode for the WLAN card on the windows tablet/computer. It says the below variable should be set:
OID_802_11_MEDIA_STREAM_MODE
But I am not sure, how should I do this ? I am not a networking guy.
I have a 3rd party software(found at: http://www.martin-majowski.de/) that does that. But I dont want to rely on that software. Instead, I want to set it myself or automate it in my WPF application(if possible).
Any leads/answers to this is very much appreciated. Thanks in advance.
After exploring I found the answer to my question. We can set the WlanIntfOpcode.MediaStreamingMode Opcode to true after connecting asynchronously.
Example code:
iface.ConnectSynchronously(Wlan.WlanConnectionMode.Profile, Wlan.Dot11BssType.Infrastructure, name, 5000);
iface.MediaStreaming = true;
where:
public bool MediaStreaming
{
get
{
return GetInterfaceInt(Wlan.WlanIntfOpcode.MediaStreamingMode) != 0;
}
set
{
SetInterfaceInt(Wlan.WlanIntfOpcode.MediaStreamingMode, value ? 1 : 0);
}
}
Hope its helpful to someone.
Related
I'm using the NuGet package Plugin.BluetoothLE v6.3.0.19 and I can scan for nearby devices but mostly the names are blank. A few devices show their names but most do not. I also cannot see the mac address of the device I'm looking for.
The scenario is that I know the device name but need to look up the mac for connecting.
As I check the devices I need to check the device.name to see if it matches the device I'm looking for. If found it will attempt to pair and connect.
I'm thinking this LE (Low Energy) version does not get the names from every device unless it broadcasts it. So maybe I need to request more info? If so I don't know how to do that with this plugin.
var adapter = CrossBleAdapter.Current;
adapter.ScanExtra(new ScanConfig { ScanType = BleScanType.Balanced });
var scanner = CrossBleAdapter.Current.Scan().Subscribe(scanResult =>
{
var x = scanResult.Device;
System.Diagnostics.Debug.Print($"{x.Name} - {x.Status} _ {x.ToString()}");
});
I am not very familiar with the BluetoothLE, but I found a course about the problem. I hope this can help you.
In addition, you can put the issue on this git. People who know the problem may help you.
I've searched high and low for a class that'll allow me to connect to a DDE server. Whilst I'm aware that DDE is dated and better methods exist, they don't for what I want to connect to.
I found this which apparently works in QT 3, and unfortunately I lack the knowledge of differences to update it to QT 4.
Does anybody have an updated version, the time to update or another solution?
I know this ancient but to whoever gets here you need to make a small change to that code:
void DDEComm::ddeDisconnect()
{
DdeDisconnect(hConv);
DdeUninitialize(pidInst);
connStatus = false;
}
should become
void DDEComm::ddeDisconnect()
{
DdeDisconnect(hConv);
DdeUninitialize(pidInst);
connStatus = false;
pidInst = 0;
}
I am in a need to send data thru serial port in vxworks. I am using the following code. But
it is not working.can anyone point out what went wrong?
int f;
if(f=open("/tyCo/1",O_RDWR,0)<0)
{
printf("Error opening serial port.");
return 1;
}
write(f,"hello",5);
after running this code, no data is comming thru serial port but instead it comes thru
terminal(Tornado shell). The system has two serial devices /tyCo/1 and /tyCo/0. I tried them both, but the problem persists.
Thanks in adavnce
Likhin.
Have you set the baud rate?
if (iocl(m_fd, FIOBAUDRATE, rate )) == ERROR )
{
//throw error
}
It is possible that you are using the wrong name for the device, and that Tornado Shell is set to your default device. From vxdev.com:
If a matching device name cannot be found, then the I/O function is directed
at a default device. You can set this default device to be any device in the
system, including no device at all, in which case failure to match a device
name returns an error. You can obtain the current default path by using
ioDefPathGet( ). You can set the default path by using ioDefPathSet( ).
The 3rd parameter of "open" command is, if I am not wrong, the mode. I do not really understand what it is needed for in vxworks, except for code comparability with UNIX. In short -try to give some value like 0644 or 0666. I think this will help.
I'm writing a flex app, which must record an audio and then playback. It records just fine, I can hear the flv on the server, but when it comes to the playback it cuts the end a little bit, and each time I ask to reproduce again it cuts a little bit more. What can it be? I guess it's something related to buffer management, but I don't know exactly. Any thoughts?
EDIT: Here's the code I'm using to playback. It is called from a mediator:
var streamPlayClient:Object = new Object();
this.stream.client = streamPlayClient;
streamPlayClient.onPlayStatus = function(infoObject:Object):void {
if (infoObject.code == "NetStream.Buffer.Flush") {
stopPlayback();
}
}
this.stream.play("flv:" + this.streamName);
As it turns out, I have to handle the NetStream.Buffer.Empty event, instead of the NetStream.Play.Complete or the NetStream.Buffer.Flush.
The adobe documentation says that when listening for a keypress event from a phone you should listen for Key.Down, however when I trace the Key.getCode() of keypresses I see a number not the string "Key.Down". I am tesing this locally in device central and do not have a phone to test this with at present. Here is my code -
keyListener = new Object();
keyListener.onKeyDown = function() {
switch (Key.getCode()) {
trace(Key.getCode()) // outputs 40
case (Key.DOWN) : // according to the docs
pressDown();
break;
}
}
My question is - is this simply because Im testing in device central and when I run it on the phone I will need to be listening for Key.Down? or is the documentation wrong? Also is the numeric code (40) consistent across all devices? What gives adobe?
thanks all
Key.Down is equal to 40 so it will recognize it as the same. So you can use whichever one you prefer, however, I would recommend using Key.Down because it will be easily recognizeable for those who dont have Key Codes memorized (most of us).
These are the Key Code Values for Javascript. However, I think they are pretty much universal