I wont to send an AT command to the UART. The command layout is:
AT+CWJAP="username",,"password" , AT needs the apostrophe around the username and password!!
Is ther a posibility to writeout this in s" xxxxxx"xxxx","xxxxxxx" so there is an adres and length on the stack
and the string adres contains the ".
Thanks for any help.
Cheers
Jan.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
:S' [CHAR] '\(-- char ) obtiene el separador "PARSE\(char-- c-addr u ) parsea hasta la siguiente comilla>R\(c-addru-- c-addr ) guarda u en return-stackPOSTPONELITERAL\compilaLITERALqueinsertarác-addrR>\recuperauPOSTPONELITERAL\compilaLITERALqueinsertaráu;IMMEDIATE
then you can use:
: test S' AT + CWJAP="SSID","pasword" ';
Last edit: Pere font vilanova 2025-08-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Pere, that does not work. You are storing in flash an adress pointing to data in the terminal input buffer, which is replaced by interpreting the next line.
You would need to also copy the string to flash and some other stuff.
I'll come back with a solution.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Today I have implemented the code you provide.
To test the code I use :
:testcrs'AT+CWJAP="RCN 119","xxxxxxx"'type;
This is the answer of my test.
test
tT+CWJAP="RCN 119","xxxxxxx" ok
Sommething is goinig wromg with the the first char, or I do sommething wrong?
This is the code for s'
:s' [char] '\(-- char ) krijg de scheidingsteken "parse\(char-- c-addr u ) parsen naar het volgende citaat>r\(c-addru-- c-addr )save upostponeliteral\compileerLITERALdiec-addrzalinvoegenr>\restorepostponeliteral\compileLITERALdiezalworderningevoegd;immediate
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After compiling is taken from my screen, I use scamp3 and as monitor program Coolterm on Macbook.
Any idee wy this strange characters apears in the code at compiling?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Peres code was not working.
This is the right way. It works in both interpret and compile mode.
In interpret mode you have to use the string on the same line, the next input line will overwrite it.
Mikael i will try your code, seems good to use in both modes . but to use in compile mode, i'm using my code time ago without any problem. i have used a lot to write LORA modules with AT commands. see the picture in the comment above.
regarding Jan problem i think is a serial terminal problem o a text editor problem. Ihad similar problems in windows and scamp using the words key, accept and key? or with strange characters in screen. I changed the serial monitor to teraterm an the text editor to notepad and all the problems were solved.....
Last edit: Pere font vilanova 2025-08-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Jan if you are trying to use the esp-01 with the scamp to send and receive data, you can check the 3 posts i wrote in the udamonic webpage. i connected the scamp to pc and also one scamp to another scamp using the esp01 as wifi module as plug and play modules using the transparent mode ( serial bridge). in this way you dont need to send AT commands fromscamp, you only send data to uart 1.
make a sight.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Pere, I have seen the articles on the facebook page of John. But I think our goals are different, I only need to make contact with the esp01 to make a connectopn to a time server, and to my electricity monitor system. The basics are working only strugling with connecting WiFi. What I go to try is testing the code with Windows using teleterm ed. We have also seen some trouble with the terminal program in the Mac envoirment. I will youse Paralles Let you know my findings today.
B.t.w. is your code you discribe in your post public?
Cheer,
Jan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
yes of course. you can use freely the code i explain, change it and do anything you need to improve it. also you can use it to use the putty as a terminal. it is faster than the other serial terminals i have.
Last edit: Pere font vilanova 2025-08-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I only adjust in the terminal option, the receiving characters as auto and the semding as cr+ lf.
i choose the option serial, and the port comX where the scamp is at 115200 bauds.
the rest dont touch.
please use better the code from Mikael, it works very well. my code has a bug. see below explanation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi Mikel, you are rigth! my code is working only if you use it immediately after the definition , ( as i usually do). but if you use it in several definitions, then only the last string is printed or sent, or we have en error message. thank you for your information. i will change it in my tools marker.
i didn't think that the s" strings are only temporal.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks both for your helfull help. My code works fine with the code of Mikael. The garbage in my comilation lies in the ", sommetimes I get another character for the " and the compiler has some problems with that.
Cheers
Jan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
in teraterm, is useful to avoid problems with garbage characters to put a delay of 2 ms for haracter and 10 or 100 ms(try) for line. i think in the terminal or port option.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wont to send an AT command to the UART. The command layout is:
AT+CWJAP="username",,"password" , AT needs the apostrophe around the username and password!!
Is ther a posibility to writeout this in s" xxxxxx"xxxx","xxxxxxx" so there is an adres and length on the stack
and the string adres contains the ".
Thanks for any help.
Cheers
Jan.
to solve this i created the word S':
then you can use:
: test S' AT + CWJAP="SSID","pasword" ';
Last edit: Pere font vilanova 2025-08-14
Hi Pere, that does not work. You are storing in flash an adress pointing to data in the terminal input buffer, which is replaced by interpreting the next line.
You would need to also copy the string to flash and some other stuff.
I'll come back with a solution.
Thanks for your great help. I t is working perfect.
Cheers,
Jan
Today I have implemented the code you provide.
To test the code I use :
This is the answer of my test.
test
tT+CWJAP="RCN 119","xxxxxxx" ok
Sommething is goinig wromg with the the first char, or I do sommething wrong?
This is the code for s'
i tested again and it runs on my scamp3. i don't understand what happen. see picfure attached.
the word only works in compile mode......
I have a very strange behavior.
This is my code :
and this is after compiling:
After compiling is taken from my screen, I use scamp3 and as monitor program Coolterm on Macbook.
Any idee wy this strange characters apears in the code at compiling?
Peres code was not working.
This is the right way. It works in both interpret and compile mode.
In interpret mode you have to use the string on the same line, the next input line will overwrite it.
Mikael i will try your code, seems good to use in both modes . but to use in compile mode, i'm using my code time ago without any problem. i have used a lot to write LORA modules with AT commands. see the picture in the comment above.
regarding Jan problem i think is a serial terminal problem o a text editor problem. Ihad similar problems in windows and scamp using the words key, accept and key? or with strange characters in screen. I changed the serial monitor to teraterm an the text editor to notepad and all the problems were solved.....
Last edit: Pere font vilanova 2025-08-16
Jan if you are trying to use the esp-01 with the scamp to send and receive data, you can check the 3 posts i wrote in the udamonic webpage. i connected the scamp to pc and also one scamp to another scamp using the esp01 as wifi module as plug and play modules using the transparent mode ( serial bridge). in this way you dont need to send AT commands fromscamp, you only send data to uart 1.
make a sight.
Pere, I have seen the articles on the facebook page of John. But I think our goals are different, I only need to make contact with the esp01 to make a connectopn to a time server, and to my electricity monitor system. The basics are working only strugling with connecting WiFi. What I go to try is testing the code with Windows using teleterm ed. We have also seen some trouble with the terminal program in the Mac envoirment. I will youse Paralles Let you know my findings today.
B.t.w. is your code you discribe in your post public?
Cheer,
Jan
yes of course. you can use freely the code i explain, change it and do anything you need to improve it. also you can use it to use the putty as a terminal. it is faster than the other serial terminals i have.
Last edit: Pere font vilanova 2025-08-16
Is there a special config for using teraterm under windows to work with the scamp. I have no experiance with teraterm.
I only adjust in the terminal option, the receiving characters as auto and the semding as cr+ lf.
i choose the option serial, and the port comX where the scamp is at 115200 bauds.
the rest dont touch.
please use better the code from Mikael, it works very well. my code has a bug. see below explanation.
hi Mikel, you are rigth! my code is working only if you use it immediately after the definition , ( as i usually do). but if you use it in several definitions, then only the last string is printed or sent, or we have en error message. thank you for your information. i will change it in my tools marker.
i didn't think that the s" strings are only temporal.
Thanks both for your helfull help. My code works fine with the code of Mikael. The garbage in my comilation lies in the ", sommetimes I get another character for the " and the compiler has some problems with that.
Cheers
Jan
in teraterm, is useful to avoid problems with garbage characters to put a delay of 2 ms for haracter and 10 or 100 ms(try) for line. i think in the terminal or port option.