I am using developer branch firmware and i am working on deepsleep mode. I use node.dsleep function with option 4. With this option after timer wake up there is no rf functionalty. My project is about temperature control and i want connect wifi only when temperature data pass some limit. So I want use deepsleep mode option 4 with my control on wifi connection. Are there any command for connect wifi after wakeup deespsleep option 4.
Try passing 1 instead of 4 to dsleep().
Or use the same functions you'd usually use to initialize wifi and network.
Related
I can't for the life of me figure out why my ESP8266s create WiFi access points.
I plug it in and send an empty sketch, and it creates an AP called "ESP_28F2F8" and here the ESP is at 192.168.4.1.
I do not want it to create a WiFi network. I just want it to connect to one.
Has anyone else run into this issue? Is this perhaps some weird OS?
That's normal operation of the underlying Espressif's SDK. It remembers some of the settings in flash, like the last created AP and last WiFi network connected.
You need to run
WiFi.softAPdisconnect(true);
so the ESP disconnects all clients currently connected to it, disables AP and remembers it to flash.
If you might also need to disable automatic connection to the last WiFi network, you need to call:
WiFi.setAutoConnect(false);
I have to develop an iOS app which connects to raspberry-pi via bluetooth and configures RPi's wifi to connect to a particular ssid. The ssid and password is provided from the app via bluetooth.
Is this possible to do? I am wondering if its possible to execute commands on RPi received from the app.
Similarly we need to do it using Android.
Can we achieve this using Bleno and Bluez on the pi?
You can configure the Pi via Bluetooth. You need a service running on the Pi and waiting for a device to establish a Bluetooth connection. This can either be a python or any other server-side script.
In your App, you connect to this service using Bluetooth and execute different commands to connect to the wifi.
See this site for more information on how to connect a pi to a wifi network.
I want to send UDP packages in a local network using GCDAsyncUdpSocket.
My fear is that at some point UDP packages will be sent via LTE because of the newly introduced "WiFi assist" from iOS 9.
Is there some way I can pretend iOS 9 from passing my traffic to cellular network, and instead require it to always use WiFi?
Thanks a lot for any ideas!
I think you can use "Reachability" to detect if the phone is connected to a wi-fi or to cellular data and then avoid to send message or manage the that particular condition. You can also ask to the user to disable the wi-fi assistant with a popup just to be sure to avoi the problem.
I know the default connection interval for CoreBluetooth is 30 ms. I've read couple of articles that claim they can reduce it 30 ms > by changing the min and max of the interval. I didn't see any explanation of how they were changing the parameters of it? I am assuming this is all in the iOS end.
Currently I am working on a project where the iOS device is sending packets to the bluetooth le device. When I was writing without response, there were a lot of packets being dropped so I added a handshake so once the bluetooth device receives a packet the iOS sends the next packet. This is currently taking a long time to upload a file since the connection interval is 30 ms which I am trying to reduce.
Any suggestions would be helpful
td;lr How do I change the connection interval on iOS
Solution So after doing research there is no public API that allows iOS devices to request for a connection interval change request. For Android this is possible.
There is no API on iOS for a app as master (using CBCentralManager) to modify the initial Connection Parameters when connecting to a peripheral.
However, the slave can suggest new connection parameters using a L2CAP Connection Parameter Update Request (see Bluetooth 4.0 specification, Volume 3, Part A, Section 4.20), which iOS will accept if they are reasonable (see Bluetooth Accessory Design Guidelines for Apple Products section 3.6 “Connection Parameters”). Peripherals should do this because different operating systems have different default connection parameters that might not be optimal for a particular peripheral. For example, if you rare implementing your peripheral in iOS or OSX, call -[CBPeripheralManager setDesiredConnectionLatency:forCentral:. Or, if you are using the TI BLE stack to program a CC2540 or the like, call the function L2CAP_ConnParamUpdateReq.
I am building an assistive iOS app for a kid that uses a switch to control his computer (a simple button that can send only one massege to the computer).
I am looking for a way to connect my app to a switch that can send click events to my app.
It can through by BT, IR or even through the earphone connection (headset port).
(BTW he can not use the iOS screen as the switch).
Any ideas ?
A BT connection requires you to be a certified MFi developer, and that requires money and a real company.
The headphone port would be a great place to interface with. You could wire a simple switch over the microphone line and ground line which, I think, would create a square wave duty cycle for on and off. I've done something similar where we used the headphone port to communicate to a microcontroller through a sound wave that was then converted to 16 bit packets and used to control additional hardware and also give feedback from that hardware.
Another option is a wifi connection, an arduino with a wifi shield and the button on that.
Edit:
The more I think about it, the more I would say use the headphone port. It will be super cheap, the programming to detect the presses will be really easy, and this will probably be the fastest way to achieve your solution. Provided you can solder.
I'm going to suggest going down a different path. Instead of trying to connect the switch directly to the iPhone, use something like an Arduino board with both physical switch and ethernet I/O ports plugged into the local network, and create what amounts to a physical I/O server.
The Arduino handles the physical interfacing and your iPhone app only has to handle the communications protocol to the Arduino over Wi-Fi.
One inexpensive solution would be to use the mic or mic input on the headset port. Connect the switch up to some sort of tone generator (555 timer or Arduino, plus piezo speaker or headset cable). Have the app run an input Audio Queue, and pass the Audio Queue input buffers to a DSP narrow band filter or an FFT. Monitor the frequency band of the tone generator for any significant energy burst above the background noise level. Potentially use multiple separate tone frequencies for more than one switch.
Added: Another simple alternative might be to use the switch to activate a solenoid or small motor (scavenged from an old motorized toy or similar) to tap a capacitive pen or ball of conductive foam on the iPod Touch display. No MFi, WIFI or audio DSP coding required.