We can now make a connection, and close it again. Error handling doesn't seem
quite right but not sure of the root cause yet.
case 0: /* Discard */
return;
case 1:
- if (ch == 'O')
+ if (ch == 'C')
at_state = 2;
else {
netat_hangup();
}
break;
case 2:
- if (ch == 'K')
+ if (ch == 'O')
at_state = 3;
else {
netat_hangup();
if (ch != '\n')
break;
at_state = 4; /* Don't process */
+ sockets[0].s_state = SS_CONNECTED;
+ wakeup(&sockets[0]);
break;
}
}
uint32_t n = s->s_addr[SADDR_DST].addr;
uint16_t p = s->s_addr[SADDR_DST].port;
+ netat_wake();
/* Pity drivewire won't talk addresses and ports as a hex block ! */
netat_write("ATD ", 4);
netat_write_u8ch(n >> 24, '.');