I'm trying to connect to an unsecured WEP wifi with the following code:
wifi.setmode(1)
tmr.stop(1)
tmr.alarm(1,1000,1,function() print(wifi.sta.status()) end)
SSID = "hide your kids hide your wife"
pass = "11111122222244444455555599"
wifi.sta.config(SSID, pass)
wifi.sta.connect()
It ends with status "2" meaning wrong password. I've tried converting the string password to hex and supplying it in hex as a string.
Has anyone had success connecting to a WEP network with NodeMCU?
It turns out the latest official release (07-04-2015) doesn't seem to work with WEP, you have to build and install the dev branch. This site is nice for that: http://nodemcu-build.com/
Related
I'm building an app utilizing the new Action on Google Java API. As I understand from dealing with account linking in Alexa, the initial flow (when the userId in the JSON request is null) should redirect to a sign in form to elicit user consent:
#ForIntent("RawText")
public ActionResponse launchRequestHandler(ActionRequest request) {
String userId = request.getAppRequest().getUser().getUserId();
String queryText = request.getWebhookRequest().getQueryResult().getQueryText();
String speech = null;
ResponseBuilder responseBuilder = getResponseBuilder(request);
if (isBlank(userId) || GREETING.equalsIgnoreCase(queryText)) {
speech = "I've sent a link to your Google Assistant app that will get you started and set up in just several simple steps.";
responseBuilder.add(
new SignIn()
.setContext(speech));
//...
return responseBuilder.build();
While testing in the AoG Simulator, however, I'm not seeing any redirection being done. I'm seeing the following error:
My account linking setup:
where authorization URL redirects to a local mock auth service which is supposed to display a login form. It's accessible (both via localhost and via ssh tunnel, provided by serveo.net reverse proxy in this case). Why Google doesn't redirect me there?
Can someone please guide me how to do this initial handshake in the account linking flow and where can I see the form which the Sign-In intent sent from the web hook is supposed to trigger?
I'd rather not use my phone, as the error message seems to suggest, as the account under which I'm testing in AoG simulator differs from my user ID on the phone.
What is meant by using Simulator as a Speaker? What is missing in my setup?
Is there another Google app that simulates the physical device better, similar to Alexa's simulator?
Normally, you can simulate the account linking, by selecting the Debug tab, there you will find a url, copy-paste it on another tab and you can link your account.
Once linking is done, go to the simulator and type 'cancel' or 'stop', and then 'Talk to speech bank'.
! Don't press reset or Change Version, or you have to re-link your app
But, recently Google has removed this url from debug tab, and I can't find it anywhere...
Simulator as a Speaker, The Surface Dropdown is set to Phone, you need to select Speaker,
but when you try that one, you will receive this error...
Invocation Error
You cannot use standard Google Assistant features in the Simulator. If you want to try them, use Google Assistant on your phone or other compatible devices.
So for the moment, you can't test an Action that needs account linking, using the simulator. You can do it with your smartphone...
UPDATE 2019-03-05:
Google has added the account linking in the simulator, which is now easier to test.
I am having difficulty setting up my fingerprint Scanner - TTL (GT-511C3). I have bought it from http://www.w11stop.com/manufacturer-sparkfun I'm using the library from https://github.com/sparkfu/Fingerprint_Scanner-TTL/tree/master/FPS_GT511C3 and none of the example sketches work.
I have a message printing to the serial before the fps.open() command and a message printing afterwards, but I only ever see the first message. Does this mean the arduino is stuck trying to open the scanner?
try and get 'Demo software' from this link
and see if the software can access the sensor.
I am using the Twilio API and can successfully make outgoing calls to a phone number, but when I try to enter another username to connect to, nothing happens. I have two emulators running (one with the Android quickstart client, with which I can make outgoing calls to another user. I can make calls from the Android client to the iOS client using usernames and it works fine, but when I try to do the same from the iOS client to the Android client, nothing happens. I don't get a crash or anything, I just get the initial sound that it tries to start, then the disconnect sound. Here is my code:
- (IBAction)dialButtonPressed:(id)sender {
[self.dialField resignFirstResponder];
NSDictionary *params = #{#"To": self.dialField.text};
_connection = [_phone connect:params delegate:nil];
}
I have searched everywhere I can think of online, but every reference seems to talk only about calls with a phone number. The Twilio API for Android handles this easily, but I cannot figure it out for iOS. Any suggestions would be greatly appreciated.
Thanks in advance!!
Much thanks to Zack from Twilio who finally noticed that we just needed to add client: before the username when trying to call a user rather than a phone number (When using the Heroku App for the server setup as instructed in the Quickstart tutorial). Not sure why this is not built into the iOS instructions, but it is to the Android version. I'm just glad to have something that works.
I just have to dial client: then the username right into the dial field and it works. Now I can make any desired programming changes.
Thanks
I'm having some issues with direct update on iOS.
Following scenario describes my problem.
Add the code snippet below to main.js
Enabled worklightSettings in application-descriptor.xml
Run on Worklight Development Server
Open project in Xcode via eclipse
Run
Make a change and re-deploy
Verify Direct Update is received
Uninstall app
Obtain new IP (in my case by restarting my macbook the next day)
Open project in Xcode via eclipse
Run
Open myapp settings via Settings.app and enable Custom Server URL. The URL is pointing to the old IP.
Enable Custom Server URL and enter the correct IP
Open app
Direct Update is not received
Code snippet:
function wlCommonInit(){
WL.Client.connect({
onSuccess: onConnectSuccess,
onFailure: onConnectFailure
});
}
function onConnectSuccess() {
WL.Logger.debug("Connect success.");
}
function onConnectFailure() {
WL.Logger.debug("Connect failed.");
}
EDIT
Try following scenario:
create a new app from scratch and deploy it on your iPad
verify the custom server URL and test direct update: all is working fine (OK)
update the ip on your development machine
remove the app from the device and reinstall it
verify the custom server URL: the old IP is present (NOK)
start the app with the use custom server url unchecked => 'connect success'
start the app with the use custom server url checked (don't change ip) => 'connect success'
try to access the app in your browser with this ip => doesn't work
change the ip and remove the last front slash from the custom server url
start the app with the new correct IP (which works in the browser) => 'connect success'
change the ip back to the incorrect IP, add the slash and retry => NO 'connect success'
The exact same custom server URL which worked before fails now. When I try a random IP address I also don't get the 'connect success'.
EDIT
result of ifconfig:
When you add a project in Worklight Studio, the following warning message is outputted:
FWLPL0010W: The current server configuration is set to "localhost".
Therefore the Worklight build uses the primary IP address of this
computer (192.168.1.100) instead. It is recommended to set the server
configuration to use the fully qualified hostname or IP address of
this computer. To configure the setting, in the "Servers" view
double-click the Worklight Development Server entry and edit the "Host
name" field.
In the comments you say the wrong IP address is used, so try and change the default IP address that Worklight Studio selects by following the above instructions. The address you will set will be used as the server address, as well as be used in the application (the address that you see in the app settings page).
To make sure the settings page is fully 'refreshed':
Delete the app from the device/simulator
When opening the project in Xcode, first select Clean and then Run (because Xcode tends to keep the Settings.bundle file cached)
I'm having a problem with getting the tutorial to work on the device
it works fine in the simulator, but when I try to run it on the device it doesn't work.
I put some logs and it seems to come from the login function
===JASONROGERS292C 2480 supAdmin s3pAdmin
[0.0] TAC:TAI.handleRegRsp : ALREADY_REGISTERED
[0.0] TAC:TAI.handleRegRsp : (ALREADY_REGISTERED), registered entry found:{{APN=,id=2,state=CLOSED,waf=WAF[0.0] _3GPP,keepAlive=300,IP=0.0.0.0,dnsSrv=0.0.0.0}}
[0.0] [TMM.TunnelAllocator]:runNotReadyListeners: registered listeners found
[0.0] TAC:TAI.handleListenerDeRegRsp: not existent tunnel in TAC, tid=2
[0.0] SIM cache not loaded
has anybody got an idea what I forgot to do when running the code on a device?
Cheers
Jason
edit:
a couple of links towards what I'm doing (I can post all the code people want but its the standard generated code form SUP, which mean a lot of code lol)
The tutorial
http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01214.0200/doc/html/title.html
the zip to the already done tutorial :
http://www.sdn.sap.com/irj/bpx/index?rid=/webcontent/uuid/40ea4956-b95c-2e10-11b3-e68c73b2280e
Solution:
I was missing a couple of things:
1) Specify that the app should use Wifi
SUP101DB.getSynchronizationProfile().setString("transport", "WIFI");
2) Check that the DNS: in my case the server was local to my windows (through parallels) so I had to specify the ip and not the namespace
getSynchronizationProfile().setServerName("10.50.30.108");//"JASONSERVER");
I downloaded the SUP 101 - BlackBerry Project and checked the sources.
It does not contain networking code in the form a usual BB app would do.
However I see the SUP101.SUP101DB class has the following method:
private static String getSyncTransportSuffix() {
com.sybase.persistence.ConnectionProfile syncProfile =
getSynchronizationProfile();
return com.sybase.afx.util.NetworkUtil.getTransportUrlSuffix(syncProfile);
}
So the code uses com.sybase.afx.util.NetworkUtil to get url suffix. By appending such suffix to a url we say to the underlaying BB API what network transport to use. Unfortunatelly sources do not contain com.sybase.afx.util.NetworkUtil to look how exactly it works.
I should say that even with native Java BB development detecting a proper network transport may turn to be a very tricky part. OS 5+ provides a new networking API that is much better, but for the older OS it is hard. This SUP project is built with BlackBerry JRE 4.6.1, so it can not use new OS 5+ networking API. Who knows maybe SUP simply fails to detect proper network transport?
Any way, just a few ideas to try:
check for APN settings on the device, sometimes they have to be populated in order to use Direct TCP transport (it depends on wireless provider requirements). APN name/pass are wireless provider specific. Usually googling allows to find proper APN settings for a provider.
if your device has WiFi try enabling it. SUP should be smart enough to prefer WiFi if available. In this case I assume networking should have no issues.