Google Assistant can't register my device - assistant

I register on GA my project, receive and save client_secret.json and create credentials.json
Complete all steps of register device: https://developers.google.com/assistant/sdk/guides/library/python/embed/register-device
and try to test on googlesamples-assistant-hotword:
googlesamples-assistant-hotword --device-model-id 'bridge-xxxxxx-bridge-igzdf5'
device_model_id: bridge-xxxxxx-bridge-igzdf5
device_id: 0CE81A09B69F736CBC03F8C93F659C55
This device is not registered. This means you will not be able to use
Device Actions or see your device in Assistant Settings. In order to
register this device follow instructions at:
https://developers.google.com/assistant/sdk/guides/library/python/embed/register-device
ON_MUTED_CHANGED:
{"is_muted": false}
ON_START_FINISHED
what's may by wrong ?

Related

Cannot get token from Huawei HMS push kit

error message as below
[getToken] Error/Exception: {"nativeStackAndroid":[],"userInfo":null,"message":"907122036: no
right","code":"907122045","line":2568,"column":45,"sourceURL":"http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.huaweipush.letsapp&modulesOnly=false&runModule=true"}
[getToken] Error/Exception: {"nativeStackAndroid":[],"userInfo":null,"message":"907122036: no right","code":"907122045","line":2568,"column":45,"sourceURL":"http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.huaweipush.letsapp&modulesOnly=false&runModule=true"}
The error code indicates that the Push Kit are not enabled. As a result, have no permission to obtain the token. How to enable the Push Kit, pls refer to the this docs.
Sign in to AppGallery Connect and click My projects.
Find and click the desired project in the project list, and click the app for which you need to set Push Kit parameters.
Go to Project settings > Manage APIs and enable Push Kit.
Go to Grow > Push Kit and click Enable now. In the dialog box that is displayed, click OK.
Enable the precise messaging function.
Here below is some checkpoints for the above issue.
First ensure you have enabled the push kit in AppGallery Console
Please check whether you are providing correct app id or not:
String appId = AGConnectServicesConfig.fromContext(MainActivity.this).getString("client/app_id");
pushtoken = HmsInstanceId.getInstance(MainActivity.this).getToken(appId, "HCM");
It is recommended that the getToken method be called in the onCreate method of the first Activity class after app startup. Implement the corresponding listeners for getToken API and observe the logs.
Device: Non-Huawei phones must have HMS Core (APK) installed (which can be downloaded from HUAWEI AppGallery). There is no restriction on Huawei phones.
Network: The phone is connected to the network and the connection is stable.
EMUI version: EMUI 4.0 and EMUI 4.1 (for some devices), and EMUI 5.0 or later It is recommended that you use a device running EMUI 5.0 or later.

Persona U are U 4500 Web API

I am new to biometrics. I bought a new Persona U are U 4500 Device and SDK from a vendor. The SDK has some samples (as expected). All of the samples run smoothly except the WebSample. it do not detects my device in addition it gives an error in the console.
Can anyone please help me how to fix this issue and guide me as why am i facing this problem? is it something related to my wss://localhost?
Update
By further diving into the program i found the specified url https://127.0.0.1:52181/get_connection in websdk.client.bundle.min.js when i opened the link it says
{
"code": -2147024894,
"message": "The system cannot find the file specified."
}
Am i missing some file?
I don't have it in front of me now, because I switched back to the U.are.U 2.2.3 SDK, which does not have this feature.
But it sounds like you possibly have not installed the Digital Persona Lite client component. This runs a separate WebSocket service on port 9001 (IIRC) through which the JavaScript client then communicates.
It is described here: https://hidglobal.github.io/digitalpersona-devices/tutorial.html
After installation, you will need to restart.
The call to https://127.0.0.1:52181/get_connection should then respond with details of the WebSocket service, to which the JavaScript client will connect.
NOTE: The WebSkd library requires DigitalPersona Agent running on a
client machine. This agent provides a secure communication channel
between a browser and a fingerprint or card device driver. The
DigitalPersona Agent is a part of a HID DigitalPersona Workstation. It
can be also installed with a DigitalPersona Lite Client. If you expect
your users do not use HID DigitalPersona Workstation, you may need to
provide your users with a link to the Lite Client download, which you
should show on a reader communication error:
A link is provided there to download the Lite client from here: https://www.crossmatch.com/AltusFiles/AltusLite/digitalPersonaClient.Setup64.exe
you just add a script call of the following code "crossorigin = '' ". "crossorigin=''". It will look like this:
<script src="scripts/websdk.client.bundle.min.js" crossorigin="*"></script>
<script src="scripts/fingerprint.sdk.min.js" crossorigin="*"></script>

Pulling only Registration Contact information on Asterisk

I am not using real-time asterisk , But still astdb.sqlite3 contains entries of online peers with Reg.Contact information in SIP/registry/peer. key . I would like to store contact information of all peers as they come online in a separate persistent database. I need this for sending push notifications by fetching deviceID etc information in registration contact .
I tried to pull this information from astdb.sqlite3 but the entries are clearing off as soon as devices go offline .Though I am able to fetch the information with "sip show peer XXXX" in asterisk CLI , It is overburdened to fetch every time like this . Instead I want to save only Regcontact information for all the devices in a database ( without realtime) as the devices come online. The other way I tried to pull the information is using AMI event listener. But with AMI I don't see complete information like contact information It displays only below information
Event: PeerStatus
Privilege: system,all
SequenceNumber: 75
File: manager.c
Line: 1856
Func: manager_default_msg_cb
ChannelType: SIP
Peer: SIP/2030
PeerStatus: Reachable
Can someone suggest a better way to push Only Regcontact information to a database as the devices come online .
There are no mechanism like that in asterisk.
You can use kamailio or write patch similar to this one https://reviewboard.asterisk.org/r/4490/
It sounds like you have dynamic IPs for your endpoints, and you want a way to update a separate DB as soon as a device registers with an IP/port pair.
If you enable the security log, you will see all auth events, including the "SuccessfulAuth" event, which includes the RemoteAddress of the endpoint (including port and protocol).
Here is an example line:
[Jul 21 19:53:45] SECURITY[1342] res_security_log.c: SecurityEvent="SuccessfulAuth",EventTV="2020-07-21T19:53:45.182+0000",Severity="Informational",Service="SIP",EventVersion="1",AccountID="102",SessionID="0x7f41040132c0",LocalAddress="IPV4/UDP/10.0.0.200/5060",RemoteAddress="IPV4/UDP/10.0.0.75/5062",UsingPassword="1"
If all you're looking for is AccountID="102" and RemoteAddress="IPV4/UDP/10.0.0.75/5062", a very fast/cheap way to get it is to enable the security log, and use a script to tail it and update your DB as soon as the event occurs. I like to keep the security log on anyways for utilities like fail2ban. Just make sure your script is able to reopen the file each time it is rotated.
Edit:
By default the log is in /var/log/asterisk. To enable it, edit /etc/asterisk/logger.conf and un-comment (or create) the line under [logfiles] that says security => security.

iOS 12 and above, fetch Wifi SSID to which iPhone is connected

I have gone through the link which explains getting SSID without private library. This works for devices below iOS 12.0.1. From iOS 12.0.1 onwards, the same library is not beneficial anymore. My code snippet is:
CFArrayRef myArray = CNCopySupportedInterfaces();
CFDictionaryRef myDict = CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(myArray, 0));
NSString *networkName = CFDictionaryGetValue(myDict, kCNNetworkInfoKeySSID);
These lines crash in Xcode 10 and above. myDict is returned nil. Is the library changed? Any other way to achieve this task?
Additional settings are reqiured in iOS12 for getting Wifi SSID.
Summary is that Apple qoutes:
To use this function in iOS 12 and later, enable the Access WiFi Information capability for your app in Xcode. When you enable this capability, Xcode automatically adds the Access WiFi Information entitlement to your entitlements file and App ID.
Thus, Enable Access WiFi Information for the Bundle ID in developer account. Reenable the associated provisional profiles.
In Xcode, under Targets -> Capabilities -> Access WiFi Information -> Enable it to ON.

Create wifi tethering Hotspot in Android Marshmallow, without intervention?

In Android M, I used code in How to create wifi tethering Hotspot in Android Marshmallow? to create hotspot, but it is not working.
I get error.:
java.lang.SecurityException: android.tutorial.hotspotcreation was not granted either of these permissions: android.permission.CHANGE_NETWORK_STATE, android.permission.WRITE_SETTINGS.
If I use that hotspot code.
The recommended way, is to use an intent:
startActivity(new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK));
Is there a way to create hotspot via code, without user-intervention?
As your error message clearly shows, you will have to add two permissions to your Manifest (or ask for them interactively on 6.0+):
CHANGE_NETWORK_STATE
WRITE_SETTINGS

Resources