SKIP and bs2pe
![Tumbler](https://forums.parallax.com/uploads/userpics/111/n0LOW04SJT4VD.png)
Hello,
I have some problems with parsing a response from a gprs modem.
this is the result when i send the command to my·modem:
SEROUT 0,Baud,[noparse][[/noparse]"AT+CPBR=2", 13] means: show·second phonebook entry
result: counter: char (ascii) see table below.
Now i'm trying to get the id (second place), the phonenumber (04 to 15) and the name (23 to 26) with this command:
SERIN 1,Baud,[noparse][[/noparse]WAIT("+CPBR:") , SKIP 1 , id , SKIP 2 , STR response\12, SKIP 7, STR name\4]
·············································· ·· |·············· |······································ ···· |
······································· ·ignore '32'······ ignore'44 and 34'············· ignore 7 bytes
And this seems not to work.
Any ideas why?
00 : ·· (32)·················
01 : 2 (50)
02 : ,· (44)
03 : "· (34)
04 : + (43)
05 : 3 (51)
06 : 2 (50)
07 : 4 (52)
08 : 9 (57)
09 : 8 (56)
10 : *·(number)
.
.
15 : * (number)
16 : " (34)
17 : , (44)
18 : 1 (49)
19 : 4 (52)
20 : 5 (53)
21 : , (44)
22 : " (34)
23 : I (73)
24 : l (108)
25 : s (115)
26 : e (101)
27 : " (34)
28 :· char(13)
29 :· char(10)
30 :· char(13)
31 :· char(10)
32 : O (79)
33 : K (80)
33 :·char(0)
I have some problems with parsing a response from a gprs modem.
this is the result when i send the command to my·modem:
SEROUT 0,Baud,[noparse][[/noparse]"AT+CPBR=2", 13] means: show·second phonebook entry
result: counter: char (ascii) see table below.
Now i'm trying to get the id (second place), the phonenumber (04 to 15) and the name (23 to 26) with this command:
SERIN 1,Baud,[noparse][[/noparse]WAIT("+CPBR:") , SKIP 1 , id , SKIP 2 , STR response\12, SKIP 7, STR name\4]
·············································· ·· |·············· |······································ ···· |
······································· ·ignore '32'······ ignore'44 and 34'············· ignore 7 bytes
And this seems not to work.
Any ideas why?
00 : ·· (32)·················
01 : 2 (50)
02 : ,· (44)
03 : "· (34)
04 : + (43)
05 : 3 (51)
06 : 2 (50)
07 : 4 (52)
08 : 9 (57)
09 : 8 (56)
10 : *·(number)
.
.
15 : * (number)
16 : " (34)
17 : , (44)
18 : 1 (49)
19 : 4 (52)
20 : 5 (53)
21 : , (44)
22 : " (34)
23 : I (73)
24 : l (108)
25 : s (115)
26 : e (101)
27 : " (34)
28 :· char(13)
29 :· char(10)
30 :· char(13)
31 :· char(10)
32 : O (79)
33 : K (80)
33 :·char(0)
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
I wa sworking in auto baud mode.
For some reason, the module switched to sleep mode. (dunno how that happend)
At 2400 baud, the module is working perfect with the stamp.
Here a sample, i'm sure it will help others too.