(for TTGO TCALL SIM800L....)
1.USB communication
I have changed from:
[CODE lang="b4x" title="Config USB Port"]Serial0.Initialize(115200)
astreamcom.Initialize(Serial0.Stream, "AstreamCom_NewData", "AstreamCom_Error")[/CODE]
to this code:
[CODE lang="b4x" title="Nueva Configuración Puerto USB"]Serial1.Initialize(115200)
astream.Initialize(Serial1.Stream, "astream_NewData", "astream_Error")[/CODE]
USB communication works correctly
2.SERIAL PORT- MÓDULO SENSORES
I have changed from:
[CODE lang="b4x" title="Configuración Anterior Puerto Serial (2,4)"] RunNative("SerialNative1", Null)
astream1.Initialize(SerialNative1,"AStream1_NewData", "Astream1_Error")[/CODE]
To this code:
[CODE lang="b4x" title="Nueva Configuración Puerto Serial (2,4)-Sensores"]RunNative("SerialNative2", Null)
astream1.Initialize(SerialNative2,"AStream1_NewData", "Astream1_Error")[/CODE]
Code IN C
[CODE lang="b4x" title="Códe In C"]#if C
void SerialNative2(B4R::Object* unused)
{
::Serial2.begin(9600,SERIAL_8N1,2,4);
b4r_main::_serialnative2->wrappedStream = &::Serial2;
}[/CODE]
Serial Communication work correctly
3.SERIAL PORT TO SIM800L (pins 26 and 27 of TTGO TCALL)
Not work!
same error is displayed!
This is the configuration
[CODE lang="b4x" title="Configuración actual Puerto Serial SIM800L(26,27)"]''GESTION MODEM SIM800L
'RX=26,TX=27
RunNative("SerialNative0", Null)
astream0.Initialize(SerialNative0,"Astream0_NewData", "Astream0_Error")[/CODE]
Code IN C
[CODE lang="b4x" title="Code In C-Serial Port-Sim800L"]'PUERTO SERIAL SIM800L
'#IF C
'void SerialNative0(B4R::Object* unused)
'{
'::Serial1.begin(4800,SERIAL_8N1,26,27); //<--You can change the baud rate
'b4r_main::_serialnative0->wrappedStream = &::Serial1;
'}
'#END IF
#IF C
void SerialNative0(B4R::Object* unused) {
::Serial.begin(4800,SERIAL_8N1,26,27); //<--You can change the baud rate
b4r_main::_SerialNative0->wrappedStream = &::Serial;
}
#END IF[/CODE]
I need to configure the serial port on pins 26 and 27,to have communication with the SIM800L modem.
Attached Test Project
thanks for your reply!