alexanderlavrushko / BLE-HUD-navigation-ESP32

Shows navigation instructions received from the phone (e.g. "After 200m turn right")
75 stars 23 forks source link

I want to run a project. #1

Closed korng9757 closed 3 years ago

korng9757 commented 4 years ago

Hello, I wanted to run a project, so I used the 'esp32 TTGO' I have. The display does not work because the data provided is applied. Is esp32 TTGO non-executable?

alexanderlavrushko commented 4 years ago

Hello, I didn't try it on ESP32 TTGO. The project is not designed for it. I think, the project can technically run on TTGO, but will not show anything on the display.

I used ESP32 development board, and a separate display Waveshare WS-14747 (128x128 1.5 inch OLED) which uses SPI interface, protocol SSD1351, https://www.waveshare.com/wiki/1.5inch_RGB_OLED_Module Communication with the display in this project is not universal, it's hardcoded for this exact display.

I'm not sure I'll be able to give an appropriate support. Could you please specify at which exact step you have an issue?

  1. Compile the project with Arduino IDE
  2. Upload the project to the device ESP32 TTGO
  3. Project runs on the device and writes something to Arduino console (Tools -> Serial monitor)

If you have passed all these steps, could you please send the log (content from the console)?

Maybe, using the log I'll be able to say if the Bluetooth LE code works correctly.

But the display will not work, the code which sends visual data to the display needs major changes to support TTGO display.

korng9757 commented 4 years ago

Up to "2. Upload the project to the device ESP32 TTGO." However, the display of ESP32 TTGO does not work.

Sketch uses 1052475 bytes (80%) of program storage space. Maximum is 1310720 bytes. Global variables use 68872 bytes (21%) of dynamic memory, leaving 258808 bytes for local variables. Maximum is 327680 bytes. esptool.py v2.6 Serial port COM8 Connecting........_____. Chip is ESP32D0WDQ6 (revision 1) Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None MAC: 24:0a:c4:a7:8b:4c Uploading stub... Running stub... Stub running... Configuring flash size... Auto-detected Flash size: 16MB Compressed 8192 bytes to 47...

Writing at 0x0000e000... (100 %) Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4096.0 kbit/s)... Hash of data verified. Flash params set to 0x024f Compressed 17392 bytes to 11186...

Writing at 0x00001000... (100 %) Wrote 17392 bytes (11186 compressed) at 0x00001000 in 1.0 seconds (effective 139.3 kbit/s)... Hash of data verified. Compressed 1052592 bytes to 557168...

Writing at 0x00010000... (2 %) Writing at 0x00014000... (5 %) Writing at 0x00018000... (8 %) Writing at 0x0001c000... (11 %) Writing at 0x00020000... (14 %) Writing at 0x00024000... (17 %) Writing at 0x00028000... (20 %) Writing at 0x0002c000... (22 %) Writing at 0x00030000... (25 %) Writing at 0x00034000... (28 %) Writing at 0x00038000... (31 %) Writing at 0x0003c000... (34 %) Writing at 0x00040000... (37 %) Writing at 0x00044000... (40 %) Writing at 0x00048000... (42 %) Writing at 0x0004c000... (45 %) Writing at 0x00050000... (48 %) Writing at 0x00054000... (51 %) Writing at 0x00058000... (54 %) Writing at 0x0005c000... (57 %) Writing at 0x00060000... (60 %) Writing at 0x00064000... (62 %) Writing at 0x00068000... (65 %) Writing at 0x0006c000... (68 %) Writing at 0x00070000... (71 %) Writing at 0x00074000... (74 %) Writing at 0x00078000... (77 %) Writing at 0x0007c000... (80 %) Writing at 0x00080000... (82 %) Writing at 0x00084000... (85 %) Writing at 0x00088000... (88 %) Writing at 0x0008c000... (91 %) Writing at 0x00090000... (94 %) Writing at 0x00094000... (97 %) Writing at 0x00098000... (100 %) Wrote 1052592 bytes (557168 compressed) at 0x00010000 in 49.7 seconds (effective 169.3 kbit/s)... Hash of data verified. Compressed 3072 bytes to 128...

Writing at 0x00008000... (100 %) Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 1068.5 kbit/s)... Hash of data verified.

Leaving... Hard resetting via RTS pin...

When uploading a project, the log appeared as follows:

kriszhn commented 4 years ago

i am able to install it. i am premium user Starting Arduino BLE Client application... BLE Advertised Device found: Name: , Address: 30:54:2a:4c:0b:c5, manufacturer data: 060001092002d66ca66d8e4de215706519de41b6b0a8cf1cd6d975823f AD data: 1E FF 06 00 01 09 20 02 D6 6C A6 6D 8E 4D E2 15 70 65 19 DE 41 B6 B0 A8 CF 1C D6 D9 75 82 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 manufacturer data WRONG BLE Advertised Device found: Name: Amazfit Bip Watch, Address: da:80:3f:7e:e4:a3, manufacturer data: 570100c428bd4396a809f73858842c7e155ed001da803f7ee4a3, serviceUUID: 0000fee0-0000-1000-8000-00805f9b34fb AD data: 02 01 06 1B FF 57 01 00 C4 28 BD 43 96 A8 09 F7 38 58 84 2C 7E 15 5E D0 01 DA 80 3F 7E E4 A3 12 09 41 6D 61 7A 66 69 74 20 42 69 70 20 57 61 74 63 68 03 02 E0 FE 00 00 00 00 00 00 00 00 ServiceUUID() doesnt match setup() finished loop() start loop() start

alexanderlavrushko commented 4 years ago

@korng9757 , your log is a build log. Runtime log appears in another window (Tools -> Serial monitor), speed must be set to 115200 (because BLEMasterNavi1_rgb.ino line 272 sets this speed Serial.begin(115200))

alexanderlavrushko commented 4 years ago

@kriszhn , this log looks good - the project started, scanned devices around, and didn't find a device with wanted BLE service UUID (91bad492-b950-4226-aa2b-4ede9fa42f59). It scans devices only once during start.

That "manufacturer data WRONG" doesn't mean anything bad - that part of code checks, if the device is iPhone with BLE services in background, and if not, it writes "manufacturer data WRONG", it's OK.

kriszhn commented 4 years ago

@alexanderlavrushko thank you sir, do i want to change anything for android or the program only works for ios

alexanderlavrushko commented 4 years ago

@kriszhn the communication protocol is not referenced to any system (iOS, Android etc.). This project acts as BLE Master, and can read data from ANY device, which does such things:

It's not an official protocol, it's not documented anywhere. It can be implemented in an application (iOS or Android), or another ESP32 device for example.

The only app where it's implemented so far, is Sygic iOS navigation, it's a prototype feature for now, so this option is hidden deep in settings.

kriszhn commented 4 years ago

@alexanderlavrushko thank you sir I'll try it today

daveharix commented 4 years ago

@alexanderlavrushko I want to run this Project on my ESP32 and conect it with bluetooth to the Iphone. If i start it, my iphon can not find the ESP32 module. is there something i need to change at the BLE service to get a conection done?

20 ho 0 tail 12 room 4 load:0x40080400,len:6352 entry 0x400806b8 Starting Arduino BLE Client application... BLE Advertised Device found: Name: , Address: 7d:70:3f:a1:c8:4e, manufacturer data: 4c001006481e7d356394, txPower: 12 AD data: 02 01 1A 02 0A 0C 0B FF 4C 00 10 06 48 1E 7D 35 63 94 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Mdata: 10 4C 00 10 06 48 1E 7D 35 63 94 manufacturer data WRONG BLE Advertised Device found: Name: , Address: 28:28:b1:35:be:c1, manufacturer data: 060001092002af0e35a6c5b72fb401ced0c73367550bea660c7b714fd4 AD data: 1E FF 06 00 01 09 20 02 AF 0E 35 A6 C5 B7 2F B4 01 CE D0 C7 33 67 55 0B EA 66 0C 7B 71 4F D4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Mdata: 29 06 00 01 09 20 02 AF 0E 35 A6 C5 B7 2F B4 01 CE D0 C7 33 67 55 0B EA 66 0C 7B 71 4F D4 manufacturer data WRONG BLE Advertised Device found: Name: , Address: 7a:cf:17:51:b5:97, manufacturer data: 4c001006011a1856d90e, txPower: 12 AD data: 02 01 1A 02 0A 0C 0B FF 4C 00 10 06 01 1A 18 56 D9 0E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Mdata: 10 4C 00 10 06 01 1A 18 56 D9 0E manufacturer data WRONG setup() finished

alexanderlavrushko commented 4 years ago

@daveharix this project works as BLE Master, so iPhone doesn't find ESP32, but ESP32 finds iPhone. Some details are described in this comment: https://github.com/alexanderlavrushko/BLE-HUD-navigation-ESP32/issues/1#issuecomment-613968013

On iOS, you can connect this project with Sygic GPS Navigation, but in Sygic you need to activate this feature in Menu / Settings / Info / About - tap 3 times at any item (hidden items appear) - select BLE HUD. After that, ESP32 will be able to connect, while Sygic app is in foreground.