Hello, I'm trying to connect to Bittle using the included WiFi adapter but I'm facing some difficulties.
First, of all, I have no previous knowledge about connecting to these kind of devices; I'm making assumptions about how it works.
From what I've seen, the WiFi adapter uses a ESP-WROOM-02D module, that is based on ESP8266.
It seems to be working as a Soft Access Point, so, in order to control Bittle:
· I have to connect to the WiFi Network that appears as ESP-XXXXXX when I turn on Bittle.
· To control Bittle, I have to send the commands to the ESP8266 module, which will comunicate through serial connection with Bittle (am I right?).
Once I connect to "Bittle's network", it starts making some noises periodically. At this point is where I don't know how to proceed.
I have checked that I have connection to Bittle's ip (ok).
I have tried to access to Bittle's ip from a web browser, but it shows ERR_CONNECTION_REFUSED.
FYI: When I try to use the IR remote controller, Bittle beeps several times quickly but doesn't react.
What should I do next in order to send commands (e.g. 'kbalance') and receive Bittle's response? (I'm planning to send the commands using python, but any kind of guidance will be appreciated).
Router FIX!
I had mentioned that for my ASUS router I had to set WIFI mode to legacy in order fo the ESP8266 to connect. The problem was that I like to use the router's "Smart Connect" feature which just shows 1 SSID for both 2.4 and 5Ghz and the router figures out which to connect the device to. Unfortunately, when this is enabled it changes the WIFI mode to auto and there is not an option to change it.
The answer, I found if you downgrade the ESP8266 Community in Boards Manager to 2.5.1 it connects with no problem regardless of the router setting. I guess it's not just the IRremote that needs an older version.
I also noticed that when the WiFi model successfully connects to my router the red light on the board comes on. If the red light does not come on I know the connection has failed and the module reverted back to the defaults the there will be the Bittle-AP showing up in my available wireless network list.
And yes, I am now able to get to the action page with not problems. But I might want to edit that up a little. :)
thanks, I will test it
@Rongzhong Li I can control Bittle from Webclient through WIFI at my IP address 192.168.88.33 using the control panel. How can I run a script in python run in Ubuntu/Windows through WIFI, for example example.py one that you provide in ardSerial package ? I can run it through RPi wire-connected through serial (RPi-NYBoard), but I cannot figure out how to run the same without RPi and with WIFI adapter plugged into NYBoard. Also I would like to test WIFI from RPi instead of using Ubuntu/Windows.
@Rongzhong Li WIFI adapter works after replacement. Thanks for the quick assistance.
@Rongzhong Li thanks, I just sent out my address in Shenzhen .
@Rongzhong Li is there any retailer in China ? Shipping fees and time make it difficult to justify delivery from US. Alternatively I temporarily stop working on wi-fi and develop python script on RPi for the forthcoming fair.
@Rongzhong Li thanks for the quick reply. In fact I paid attention to it and I connected trying both possibilities TX - RX , shifting the pin connecting positing of the wiring to avoid any mismatch. Any other possibility ? Can it be a WiFi board issue ?
@John Winiger thanks for the input: I was missing this point. In fact I am using a FTDI232 instead of programmer which was defect as already verified. FTDI232 works fine when uploading to NYBoard.
After testing I still receive the following error when uploading to WIFI Adapter. I checked pins connection TX to RX and RX to TX but it gives error. I attach also the picture of FTDI-WIFI connection. Any hint ?
Arduino: 1.8.19 (Linux), Board: "Generic ESP8266 Module, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
Executable segment sizes:
ICACHE : 32768 - flash instruction cache
IROM : 341796 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 27385 / 32768 - code in IRAM (IRAM_ATTR, ISRs...)
DATA : 1500 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 2712 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 26056 ) - zeroed variables (global, static) in RAM/HEAP
Sketch uses 373393 bytes (38%) of program storage space. Maximum is 958448 bytes.
Global variables use 30268 bytes (36%) of dynamic memory, leaving 51652 bytes for local variables. Maximum is 81920 bytes.
esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting........_____....._____....._____....._____....._____....._____....._____
Traceback (most recent call last):
File "/home/gabri/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/upload.py", line 66, in <module>
esptool.main(cmdline)
File "/home/gabri/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool/esptool.py", line 3552, in main
esp.connect(args.before, args.connect_attempts)
File "/home/gabri/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool/esptool.py", line 529, in connect
raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
Just saw this picture and can right off say, it doesn't work like that, trust me I tried. Unplug the programmer from Bittle, so you just have USB to programmer and wifi plugged into programmer, then select the wifi adapter as the board you want to program and it should work. After the wifi adapter is programmed just plug it straight into Bittle and it should work.
Your picture shows you are connecting the USB uploader, the keyboard, and the wifi all at one time. It should not be that. Only combine two at one time. Otherwise, there will be three guys taking over the single channel.