Change barcode scan beep volume for motorola devices - c#

I am developing some .net applications with c# for various Motorola devices running Windows Mobile and Windows CE. These include the MC9190 and the WT41N0. On these two models, it beeps very loudly when a barcode is scanned. Is there anyway using the Motorola emdk or by changing a registry setting to make the beep quieter without turning the beep off altogether.

I don't know if this works for all Motorola devices, but you could try including Symbol.Audio and:
using Symbol.Audio;
...
using (StandardAudio audio = new StandardAudio(Device.AvailableDevices[0]))
{
audio.BeeperVolume = 1;
}
You can inspect the audio.BeeperVolumeLevels property to see what the maximum volume level is.

In Symbol scanner terminology this is called "feedback", and by default it's the local feedback setting that gets in the way of properly managing the audio.
In your application, after you create the reader, the following settings control it:
_BarcodeReader.Parameters.Feedback.Success.BeepFrequency = 2000
_BarcodeReader.Parameters.Feedback.Success.BeepTime = 20
_BarcodeReader being the reader object. I set it to lower frequency for a shorter time above.
If you need to eliminate the beeping altogether:
_BarcodeReader.Parameters.Feedback.Success.BeepTime = 0
You may want to add your own wave file:
_BarcodeReader.Parameters.Feedback.Success.WaveFile = "decode.wav"
This is also the case with the DataWedge software that ships with MC9xxx and MC3xxx series. If you're using DataWedge, look for "local feedback" under the feedback menu, from Scanner, under Basic configuration.
The scan audio can only be managed from the feedback settings, volume control and other methods have no effect. It seems Zebra (previously Motorola) used high-volume default for loud industrial settings, wish they had considered a better way to configure though.

I put a piece of Scotch tape over the speaker on mine.
The tape dampens most of the noise while I am testing here at my desk, but it is simple to remove so they can hear it out on the floor.
Outside or on our production floor, they need the loud noise.
If that doesn't work for you, in the Settings on our Datalogic Falcons, there is a Decoding application. One of the inputs there is called Audio and enables someone to turn down the volume.
Since I don't have the SDK for the Datalogic Falcon, I can only post a low resolution cell phone clip. Hope this helps.

There is a configuration utility for motorola devices. It is a single exe file you can put on your device and then you can adjust several settings and also the beeper volume. I had a look on support.symbol.com but I didn't found it. I think you can get it from your vendor-support.

In our situation with a Motorola MC9590 device using telnet sessions, the volume control on the left-side of the device needs to be adjusted down prior to signing into the telnet session. The volume level remains at the established setting once the user signs into their telnet session.

The volume can be controlled by pressing the blue function key and then the H or M key. The display brightness can be controlled by pressing the blue function key and then the D or I key.

the way I made it silence was : go to control panel -> All control panel items -> Devices and Printers. find the Symbol bar code and right click and select Keyboard settings, on the speed box you will see a Repeat delay icon just drag that all the way to the left and the sound should go away.

Related

How to mute or adjust volume on windows systems sounds?

I am working on an audio application, and it is vital that we can mute Windows systems sounds (warnings, notifications etc) at critical times
I can set the system volume and access a number of sound related things, but not the Windows systems sounds
I can access microphones, loudspeakers (waveOut) and the mixer. However while in older versions of Windows, the mixer would contain "Systems sounds", but later do not. Opening "Sound Settings" one will find "Systems sounds" under apps.
If I could get that list, and control it, then I can mute the system.
How do I access that ?
Thanks to the link from Anders, I found the CoreAudio function, which lead me to IsSystemSoundsSession which then lead me to:
How can i control the volume of a specific software in the windows Volume Mixer?
Here is a similar thing done, which can be easily used for muting the system sounds

C# Barcode scanner

I am currently writing a program where I wish to use a barcode scanner to scan a bar code into a system, then use this information to make certain decisions.
How can I get C# to react when I use the bar code scanner? Do I need certain DLLs or APIs to use a bar code reader? I can create bar codes but need a way for C# to read them externally and import them into the program.
Richard,
It is important to know that typically barcode scanners support multiple interfaces that fall into two categories. Many have an option that makes the barcode scanner appear as a keyboard and whenever you scan data the text is entered into your application at the insertion point. The manufacturer of the scanner may refer to this as Keyboard, Keyboard Wedge, HID Keyboard or simply HID mode, however the last one in this list is technically not accurate as there are other HID interfaces besides keyboard.
The second category is often referred to as application mode. There are several different interfaces that support application mode, such as IBM Scanner, HID POS Scanner, etc. Each of these interfaces represent follow a specific hardware specification. You must make sure that the mode that your scanner is in matches the SDK that you are using to interact with the scanner.
If you are using .NET Framework, you may find POS for .NET useful as it abstracts the barcodes scanner away from the software in a way that allows you to use scanners from multiple manufacturers without changes in your application. In this case, you will need to acquire an OPOS Service Object from the scanner manufacturer to use with POS for .NET. See POS for .NET 1.14.1 Download page for more information: https://www.microsoft.com/en-us/download/details.aspx?id=55758
Terry Warwick
Microsoft
As far as it is connected to your device correctly , it will automatically pass data to your Focused itembox in your program.so if you run your program.exe which has a textbox, when you scan a barcode , it will be parsed into that textbox (it has to be focused).
Use the class SerialPort. It can listen your ports and then when you will use your scan the program will read it.
while (spPort.BytesToRead > 0)
{
carac = (char)spPort.ReadByte();
if (carac != 08)
m_mystring += carac;
}
Here is an example of how you can read it. And this is the link to the class : https://msdn.microsoft.com/en-us/library/system.io.ports.serialport(v=vs.110).aspx
It also depends on what form your application takes. If you have the option of uploading a picture or accessing the camera, you can pull an image into your code and then use one of many SDK's to read the barcode out of the image.
I have just implemented this using a web application, and I used the ZXing SDK, which is a free port to .Net and is available via NuGet.
https://github.com/micjahn/ZXing.Net
If you're just starting out, samples within SDKs are the best place to get started.
UWP apps to handle barcode are best explained in the universal samples at --> https://github.com/microsoft/Windows-universal-samples/tree/master/Samples/BarcodeScanner
A Win32 C# .net sample can be found in the Pos For .Net 1.14 SDK mentioned earlier.
Most barcode scanners are "HID" devices, which means that they write the data of the barcode (the small numbers) like you would do manually with your keyboard, they're also recognized as a keyboard by most operating systems.
So the easiest way is just having a textbox. Make sure the focus is automatically on the textbox before the scan, and if you want it to automatically do something, make sure to have an event listening for an enter keydown. (Most HID scanners press an enter right after the scan is complete.)
Barcode scanner has are sending keys when they detects Barcode same goes with QR Scanners.
All you need is just put the focus in a textbox and use some events like text change or keypress/keydown since most of the scanners has an option for you to add/remove newline at the end of each set of keys it returns.
Using a physical barcode scanner is one option, but you're limited to scanning one barcode at a time.
An alternative option would be passing multiple documents, either as images or PDFs, to your application to process in bulk.
IronBarcode is a c# barcode scanner that also allows you to read barcodes quickly and accurately in this way.
// The BarcodeResult.ReadBarcodesMultiThreaded method allows for faster barcode scanning of multiple images or PDFs.
// All threads are automatically managed by IronBarCode.
var ListOfDocuments = new[] { "Image1.PNG", "image2.JPG", "image3.PDF" };
PagedBarcodeResult[] BatchResults =
BarcodeReader.ReadBarcodesMultiThreaded(ListOfDocuments);
Disclaimer: I work for Iron Software.

Windows 10 access keyboard light on laptop

I recently purchased a lenovo t420 laptop. I upgraded it with an SSD and did the update from 7 to 10. I then installed a clean image of windows 10, without all the bloatware. I would like to have access to the keyboard light without installing the Lenovo software. It isnt a backlight but is a single white LED next to the camera above the display. I see it come on for a split second when I cold boot the machine, I'm assuming this is part of the POST test or similar boot process and as such I would think there would be some way for me to connect to it.
I have tried using the new Lamp class in the windows 10 UWP API, and that doesnt work. I also tried using the device enumeration method and that doesnt show anything that looks like the LED.
Here is the code I tried so far, condensed a bit.
Lamp lamp = await Lamp.GetDefaultAsync();
this reults in lamp = null
string selectorString = Lamp.GetDeviceSelector();
DeviceInformationCollection devices = await DeviceInformation.FindAllAsync(selectorString);
this also results in null
this is the device enumeration code:
DeviceInformationCollection devices = devices = await light.EnumerateDevices();
This gives me about 291 different devices in the collection, none of which seem to match. I have held back on posting here as the list is long but can if requested.
Is there any way for me to access the LED through C#, if not C# than perhaps another language?
EDIT: I just found the keyboard key, I had bad info before, its Fn + Pgup. That works so i guess I dont need to write something myself but I am still curious as to why I cant find a hook to it.
As a learning exercise I would still like to know how to access the LED.
Ok, so I think this is as close as I am going to get to an answer and I would like to put it here for any future curious minds.
Here is a link to a page with a bunch of info on how to get at the ThinkLight from Linux and Windows.
http://www.thinkwiki.org/wiki/ThinkLight
And here is the important stuff in case the link breaks.
Controlling the ThinkLight with the keyboard works on all systems since it relies on the BIOS exclusively. Just press Fn+PageUp to toggle its state between on and off.
Starting with the ##30 series models (T430, T530, W530, etc), the keystroke was changed to Fn+Space in order to better accommodate the new 6-row keyboard layout. On models with backlit keyboards, there are 4 states: off, dim backlit, full backlit, and full backlit w/ ThinkLight. Models without backlit keyboards only have ThinkLight on and ThinkLight off, which can be obtained by disabling the backlit keyboard in the BIOS of models with backlit keyboards installed.
Software Control via thinkpad-acp
Software Control via thinkpad-acpi
Support for controlling the light with ACPI is provided by thinkpad-acpi. After installing it, a simple
# echo 255 > /sys/class/leds/tpacpi\:\:thinklight/brightness
switches it on and a
# echo 0 > /sys/class/leds/tpacpi\:\:thinklight/brightness
switches it off again.
This allows one to control the light in scripts. Unfortunately, no known ThinkPad comes with a light sensor (yet). ;)
To use these controls in scripts without root permissions, you should run
# chmod 666 /sys/class/leds/tpacpi\:\:thinklight/brightness, which is probably best done using udev.
Applications
led-notification: Pidgin plugin to use any LED to indicate new
messages. I've forked led-notification to support the ThinkLight via
thinkpad-acpi. The plugins below either weren't compatible with the
latest pidgin or didn't compile for me. The original author of
led-notification seems MIA. Another fork pidgin-led-notification to
write user defined strings (added to Gentoo/Linux)
gaim-thinklight: If you are using GAIM, the gaim-thinklight plugin
will enable you to use the ThinkLight as an indicator for new
messages. This depends on thinkpad-acpi.
gaim-lighthink: gaim-lightthink is an alternative to gaim-thinklight.
pidgin-blinklight:pidgin-blinklight is a replacement for
gaim-lighthink intended for use with Pidgin.
rocklight: rocklight is a xmms visualization plugin that makes the
ThinkLight flash to the beat of your music. The package also includes
a standalone stroboscope mode program.
thinkblinkd:[1] Thinkblinkd is a python daemon to control the
thinklight (and possibly other lights on your Thinkpad) it comes with
the daemon and a control script.
The script for theft alarm using HDAPS optionally flashes the
ThinkLight when the alarm is armed (disabled by default, to enable
set $use_light=1).
kopete-thinklight:[2] This plugin for kopete will enable the usage of
the thinklight as notifiaction for new messages. stupid little hack
to blink the ThinkLight: [3] A little C program that may be set SUID
so that you can use it from non-privileged programs that needs to do
a little notification.
thinkalert: [4] Another C program that may be set SUID to allow
non-privileged programs to manipulate the ThinkLight. Adds some
features over the "stupid little hack to blink the ThinkLight"
program.
thinklight-notification: This Evolution plugin notifies the user with
a blinking light whenever a new message has arrived.
ThinkBlink: blink.sh is an universal bash script making ThinkLight
blink. It can be used with any application.
Windows support
Likewise, controlling the ThinkLight with the keyboard works without any additional software. The Hotkey Features software from IBM/Lenovo adds OSD icons that appear when the light is turned on/off.
Software control via Hotkey Features
The Hotkey Features software exposes an interface that allows (among other things) to control the ThinkLight. See Python script for Windows to control ThinkPad features for more information

Change system volume in Windows Phone 8

Up until now I thought that changing the system volume from your app is impossible, until recently a new app called Quite Hours (http://www.windowsphone.com/en-us/store/app/quiet-hours/f347a36b-80c0-430f-8631-e55046ee5a2a) actually did just that in a very neat way.
Does anyone please know how to do that programmatically? I tried using the MediaElement or the xna MediaPlayer and the backgroundAudioPlayer and nothing worked. Any help would be appreciated!
Thank you!
The developers of the apps mentioned in the OP were able to change system volume under WP8.0. Apparently whatever method they used has now been disabled under WP8.1. The following apps now display disclaimers that they no longer work on Windows Phone 8.1: Quiet Hours and Volume Manager
They direct to the following page to vote to allow this functionality: Windows Phone Dev User Voice
Additionally please read the following thread on the MSDN forum: MSDN change system volume Windows Phone 8. This functionality was likely achieved using WASAPI (which I have personally tried, and failed, it does not work, comment if you want my code to try it.), or the developers of the volume apps might have had access to AudioClientRestricted.h. If one had that h file, one would have access to system volume under WP8.1, so I somehow doubt the developers used the h file designated for OEMs because it would work un 8.1.
Talking with James Dailey (who works # MSFT) indicates it is technically possible using WASAPI ISimpleAudioVolume If you read # the bottom of that page there is a comment indicating you must use IAudioEndpointVolume
Added note from James Dailey # MSFT:
AFAIK there is no good way to manipulate the global audio level on
Windows Phone 8.1 (WP8.1). Theoretically you can change the audio
volume of any app that uses the default audio session “zero”. However,
if the app chooses to initialize it’s audio session with a custom
GUID you will not have access to the session volume for its custom
audio session. Again this is theoretical based on my knowledge of the
inner workings of WASAPI. I’ve never actually tried it on the phone.
To manipulate the audio volume of apps using audio session “zero” you
simply initialize your IAudioClient with an AudioSessionGuid parameter
of “{00000000-0000-0000-0000-000000000000}”. You can then use
ISimpleAudioVolume::SetMasterVolume to set the volume for this audio
session. You will need to use C++ / Cx since we do not support
calling WASAPI from managed code.
There currently is no API available for controlling the system volume. You can however control the volume in the elements of your application (via the classes MediaElement, BackgroundAudioAgent).
You can also control the volume on sound effects of your application using XNA API.
See http://msdn.microsoft.com/en-us/library/bb195052%28v=xnagamestudio.30%29.aspx

Mute specific audio inputs with Win MMDevice API

I have a very specific requirement where I need to mute the "Auxiliary" input. I am already using the Windows Core Audio APIs like EndpointVolume & MMDevice.
Scenario
I need to mute the auxiliary output volume here in order to achieve the desired effect.
Pictured below is the audio device and it's properties.
Issues
Using MMDeviceEnumerator it doesn't appear that the endpoint depicted above includes any of the "output volume levels" displayed in the second half of that screenshot.
Muting the actual recording device (Auxiliary) does not actually mute what is heard.
This must be as simple as possible with as little human interaction as possible. The environment will be controlled entirely via the application as it is a kiosk. The screenshots below indicates what I am referring to when I say "auxiliary recording device which when muted, does nothing":
Is there a hidden place that the Levels tab's individual "input output levels" exist? I cannot find it anywhere within MMDevice which means I am currently unable to mute this device through code. Thanks for reading.
If you have installed (most likely) the windows SDK. You can have a look at this example:
C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\multimedia\audio\EndpointVolume
Does that enumerate your device that plays the auxiliary input?

Categories