[mythtv-users] problem parsing cid info with cidbcast

cythraul cythrault at gmail.com
Thu Sep 9 23:28:32 EDT 2004


Hi,

I'm trying to get the mythnotify module working.

If I load minicom and paste the exact same init string that I give to
cidbcast, the cid works fine:

---
AT S7=45 S0=0 L0 V1 X4 &c1 E0 Q0 #cid=1 S41=1
OK

RING A

DATE = 0909
TIME = 1415
NAME = O
NMBR = 2291566
---

I kill minicom and load cidbcast:

---
#./cidbcast -v --device=/dev/ttyS2 --file cidbcast.xml
--bcast=127.0.0.1 --udpport=6947 --init="AT S7=45 S0=0 L0 V1 X4 &c1 E0
Q0 #cid=1 S41=1"
Verbose mode enabled
raw_message (460):
<telephone-event type="callerID" TTY="%cid_port%">
<time stamp="%cid_time_stamp%" zone="%cid_time_zone%"
daylight-savings="%cid_daylight_saving%" second="%cid_time_second%"
minute="%cid_time_minute%" hour="%cid_time_hour%" day="%cid_time_day%"
month="%cid_time_month%"
year="%cid_time_year%">%cid_time_string%</time>
<ring-type>%cid_ring_type%</ring-type>
<from>
  <name>%cid_name%</name>
  <number>%cid_number%</number>
</from>
</telephone-event>
Send AT
Send AT
Send AT S7=45 S0=0 L0 V1 X4 &c1 E0 Q0 #cid=1 S41=1
Modem /dev/ttyS2 initialized OK - waiting for RING
NAME =  not Found (extract_cid_field)
NAME not found
Found ONE RINGS
NAME =  not Found (extract_cid_field)
NAME not found
Found TWO RINGS
Error getting CID_info, dont send anything
---

I don't understand why cidbcast is reporting that a field cannot be found.

Now, I'm not coder but I can read code a bit; I've isolated the
"problem" within the extract_cid_field routine:

if ((c = (char *) strstr(buffer, field_name)) == NULL)
{
  if (verbose)
  {
    printf("%s not Found (extract_cid_field)\n", field_name);
  }
  return 0;
}

(I've inserted "(extract_cid_field)" for debug purposes)

So, the only way that the routine would output the "not found" error,
is because it received nothing. Right?

So, it could be that the CID function of the modem is not working. Bit
it is since I can see the info with minicom.

I've tried hacking the code to remove Zytel'S references since I use a
USR 33.6 (tried a 56K too.

The only lead that I have, and I guess it's not a good one, is the
blank line the modem outputs after the "RING A". Could the routine be
getting this blank line and aborting?

Thanks!
cythraul


More information about the mythtv-users mailing list