Hello @ All,
i'm trying since a few days to figure out how to converte the serial recived Charcaters from my Mobile Phone S35 back to an ASCII string.
I Work with the 28x1 Picaxe.
The Mobile Phones TXD is connected to the HSERIN Pin, RXD to Pin0 (AT commando is send via SEROUT 0, N19200_16 ..etc)
Converting bin to PDU and Sending SMS Works already fine.
When i read back an SMS i dont get the Ascii Characters like in Windows Hyper Terminal to the PicAxe.
*********************
The right data recived from the Mobile Phone in Hyper Terminal looks like this:
- +CMGL: 12,2,,16
- 0791947106004034110000810000FF0931D98C0642C67A30
-
- OK
(62 ascii characters)
*********************
The same data at the PicAxe recived from the Mobile Phone (character Nr. 0 to 62):
*********************
The Programm to Send this log:
*********************
Does anyone knows how to convert the Picaxe recieved data Nr. 0 - 62
back to ASCII Characters?
Like Nr.61( dezi 157) will be $33 (ascii "3")
and Nr.62( dezi 119) $30 (ascii "0")
Greets
Dom
i'm trying since a few days to figure out how to converte the serial recived Charcaters from my Mobile Phone S35 back to an ASCII string.
I Work with the 28x1 Picaxe.
The Mobile Phones TXD is connected to the HSERIN Pin, RXD to Pin0 (AT commando is send via SEROUT 0, N19200_16 ..etc)
Converting bin to PDU and Sending SMS Works already fine.
When i read back an SMS i dont get the Ascii Characters like in Windows Hyper Terminal to the PicAxe.
*********************
The right data recived from the Mobile Phone in Hyper Terminal looks like this:
- +CMGL: 12,2,,16
- 0791947106004034110000810000FF0931D98C0642C67A30
-
- OK
(62 ascii characters)
*********************
The same data at the PicAxe recived from the Mobile Phone (character Nr. 0 to 62):
Code:
NR.0 = 95
NR.1 = 85
NR.2 = 45
NR.3 = 149
NR.4 = 197
NR.5 = 157
NR.6 = 21
NR.7 = 155
NR.8 = 0
NR.9 = 121
NR.10 = 121
NR.11 = 189
NR.12 = 45
NR.13 = 149
NR.14 = 197
NR.15 = 112
NR.16 = 45
NR.17 = 191
NR.18 = 157
NR.19 = 155
NR.20 = 167
NR.21 = 155
NR.22 = 167
NR.23 = 167
NR.24 = 157
NR.25 = 147
NR.26 = 229
NR.27 = 235
NR.28 = 0
NR.29 = 22
NR.30 = 6
NR.31 = 99
NR.32 = 103
NR.33 = 99
NR.34 = 89
NR.35 = 214
NR.36 = 246
NR.37 = 54
NR.38 = 246
NR.39 = 246
NR.40 = 118
NR.41 = 246
NR.42 = 150
NR.43 = 118
NR.44 = 6
NR.45 = 103
NR.46 = 103
NR.47 = 246
NR.48 = 246
NR.49 = 246
NR.50 = 246
NR.51 = 157
NR.52 = 159
NR.53 = 159
NR.54 = 159
NR.55 = 159
NR.56 = 115
NR.57 = 115
NR.58 = 159
NR.59 = 141
NR.60 = 153
NR.61 = 157
NR.62 = 119
The Programm to Send this log:
Code:
hsersetup b19200_16, %00
setfreq em16
main:
if pin5 = 1 then send
goto main
send:
low portc 3 'led
serout 0,n19200_16, ("AT+CMGL=2",13,10) 'send SMS read command
hserin 0,62 'put 63 chars in scratchpad
hsersetup off
for b0 = 0 to 62
get b0,b1
sertxd ("NR.",#b0," = ",#b1,13,10) 'log to terminal
next b0
high portc 3 'led
goto main
Does anyone knows how to convert the Picaxe recieved data Nr. 0 - 62
back to ASCII Characters?
Like Nr.61( dezi 157) will be $33 (ascii "3")
and Nr.62( dezi 119) $30 (ascii "0")
Greets
Dom
Last edited: