• Witaj na Forum Arduino Polska! Zapraszamy do rejestracji!
  • Znajdziesz tutaj wiele informacji na temat hardware / software.
Witaj! Logowanie Rejestracja


Ocena wątku:
  • 0 głosów - średnia: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Problem z komendami "AT" w programowaniu modułu BT na Ardu IDE
#6
Ja mam chyba inną wersję, u mnie to wygląda tak, że łączy się tylko na komendy AT, transmisja działa, nie umiem z niej wrócić inaczej niż odłączając zasilanie, po rozłączeniu zasilania nic automatycznie się nie łączy z powrotem:
Kod:
19:41:20.223 -> OK
19:41:38.395 -> ********************************************************************
19:41:38.497 -> * Command             Description                       *
19:41:38.599 -> * ---------------------------------------------------------------- *
19:41:38.701 -> * AT                  Check if the command terminal work normally  *
19:41:38.803 -> * AT+RESET            Software reboot                   *
19:41:38.871 -> * AT+VERSION          Get firmware, bluetooth, HCI and LMP version *
19:41:39.007 -> * AT+HELP             List all the commands                   *
19:41:39.109 -> * AT+NAME             Get/Set local device name                    *
19:41:39.177 -> * AT+PIN              Get/Set pin code for pairing                 *
19:41:39.312 -> * AT+PASS             Get/Set pin code for pairing                 *
19:41:39.380 -> * AT+BAUD             Get/Set baud rate                           *
19:41:39.482 -> * AT+LADDR            Get local bluetooth address           *
19:41:39.584 -> * AT+ADDR             Get local bluetooth address           *
19:41:39.686 -> * AT+DEFAULT          Restore factory default               *
19:41:39.788 -> * AT+RENEW            Restore factory default               *
19:41:39.890 -> * AT+STATE            Get current state                   *
19:41:39.991 -> * AT+PWRM             Get/Set power on mode(low power)            *
19:41:40.093 -> * AT+POWE             Get/Set RF transmit power            *
19:41:40.194 -> * AT+SLEEP            Sleep mode                            *
19:41:40.296 -> * AT+ROLE             Get/Set current role.                       *
19:41:40.398 -> * AT+PARI             Get/Set UART parity bit.                     *
19:41:40.500 -> * AT+STOP             Get/Set UART stop bit.                       *
19:41:40.602 -> * AT+START            System start working.               *
19:41:40.670 -> * AT+IMME             System wait for command when power on.       *
19:41:40.806 -> * AT+IBEA             Switch iBeacon mode.                       *
19:41:40.908 -> * AT+IBE0             Set iBeacon UUID 0.                           *
19:41:40.976 -> * AT+IBE1             Set iBeacon UUID 1.                           *
19:41:41.112 -> * AT+IBE2             Set iBeacon UUID 2.                           *
19:41:41.213 -> * AT+IBE3             Set iBeacon UUID 3.                           *
19:41:41.281 -> * AT+MARJ             Set iBeacon MARJ .                           *
19:41:41.383 -> * AT+MINO             Set iBeacon MINO .                           *
19:41:41.485 -> * AT+MEA              Set iBeacon MEA .                           *
19:41:41.587 -> * AT+NOTI             Notify connection event .                    *
19:41:41.689 -> * AT+UUID             Get/Set system SERVER_UUID .                   *
19:41:41.791 -> * AT+CHAR             Get/Set system CHAR_UUID .                   *
19:41:41.893 -> * -----------------------------------------------------------------*
19:41:41.995 -> * Note: (M) = The command support slave mode only.            *
19:41:42.063 -> * For more information, please visit http://www.bolutek.com        *
19:41:42.131 -> * Copyright@2013 www.bolutek.com. All rights reserved.           *
19:41:42.199 -> ********************************************************************
19:42:16.070 -> +BAUD=4
19:43:29.145 -> +ROLE=0
19:43:35.801 -> ERROR=103
19:43:56.516 -> +ROLE=1
19:43:56.516 -> OK
19:45:08.133 -> +RESET
19:45:08.133 -> OK
19:45:15.569 -> OK
19:45:20.022 -> ********************************************************************
19:45:20.124 -> * Command             Description                       *
19:45:20.192 -> * ---------------------------------------------------------------- *
19:45:20.327 -> * AT                  Check if the command terminal work normally  *
19:45:20.428 -> * AT+RESET            Software reboot                   *
19:45:20.496 -> * AT+VERSION          Get firmware, bluetooth, HCI and LMP version *
19:45:20.598 -> * AT+HELP             List all the commands                   *
19:45:20.733 -> * AT+NAME             Get/Set local device name                    *
19:45:20.801 -> * AT+PIN              Get/Set pin code for pairing                 *
19:45:20.903 -> * AT+BAUD             Get/Set baud rate                           *
19:45:21.005 -> * AT+LADDR            Get local bluetooth address           *
19:45:21.107 -> * AT+ADDR             Get local bluetooth address           *
19:45:21.208 -> * AT+DEFAULT          Restore factory default               *
19:45:21.310 -> * AT+RENEW            Restore factory default               *
19:45:21.412 -> * AT+STATE            Get current state                   *
19:45:21.515 -> * AT+PWRM             Get/Set power on mode(low power)            *
19:45:21.617 -> * AT+POWE             Get/Set RF transmit power            *
19:45:21.718 -> * AT+SLEEP            Sleep mode                            *
19:45:21.820 -> * AT+ROLE             Get/Set current role.                       *
19:45:21.922 -> * AT+PARI             Get/Set UART parity bit.                     *
19:45:22.024 -> * AT+STOP             Get/Set UART stop bit.                       *
19:45:22.126 -> * AT+INQ              Search slave model                           *
19:45:22.228 -> * AT+SHOW             Show the searched slave model.               *
19:45:22.296 -> * AT+CONN             Connect the index slave model.               *
19:45:22.398 -> * AT+IMME             System wait for command when power on.       *
19:45:22.534 -> * AT+START            System start working.               *
19:45:22.602 -> * AT+UUID             Get/Set system SERVER_UUID .                   *
19:45:22.704 -> * AT+CHAR             Get/Set system CHAR_UUID .                   *
19:45:22.805 -> * -----------------------------------------------------------------*
19:45:22.906 -> * Note: (M) = The command support master mode only.                *
19:45:23.008 -> * Copyright@2013 www.bolutek.com. All rights reserved.           *
19:45:23.110 -> ********************************************************************
19:45:40.266 -> OK
19:45:40.266 -> +INQS
19:45:40.368 -> +INQ:1 0x00158300A9CA
19:45:44.274 -> +INQE
19:45:44.274 -> Devices Found 1

19:46:38.947 -> Device1

19:46:38.947 -> 0x00158300A9CA
19:46:55.734 -> +Connecting  0x00158300A9CA
19:46:55.904 -> +Connected  0x00158300A9CA
19:48:05.664 -> nadawanie ze slave 115200 na Master 9600
19:48:25.734 ->
Kod:
19:45:44.274 -> Devices Found 1

19:46:38.947 -> Device1

19:46:38.947 -> 0x00158300A9CA
19:46:55.734 -> +Connecting  0x00158300A9CA
19:46:55.904 -> +Connected  0x00158300A9CA
19:48:05.664 -> nadawanie ze slave 115200 na Master 9600
19:48:25.734 ->
Kod:
+VERSION=Firmware V3.0.6,Bluetooth V4.0 LE

Oczywiście wpadłem na to, że pinem EN można wyłaczyć działanie modułu, co go właściwie resetuje, bo stan jest jak po odłączeniu zasilania, nie łączy się, ale w ten sposób już dałoby się dość prosto zasterować go z uC, wyszukać ten czy inny slave, połączyć, pogadać, zresetować stan pinem IO uC i nawiązać inne połączenie.
Miło być decenianym https://buycoffee.to/kaczakat
 
Odpowiedź
  


Wiadomości w tym wątku
RE: Problem z komendami "AT" w programowaniu modułu BT na Ardu IDE - przez kaczakat - 19-11-2023, 21:26

Skocz do:


Przeglądający: 1 gości