I am using a ConnectOne MiniSocket WiFi module to post a time value to a website, as determined by my embedded microcontroller application. To do this I use the following PBP statement in my code to send a command over a serial interface to the ConnectOne WiFi module to FTP the time value in the variables HH and MM in the HH:MM format to the web site.
The "AT+iFSND:000,5:" parameter in this SEROUT2 statement is a command to the WiFi module to FTP the time value data to the website where it is written to a text file that is read by the server-side PHP code and displayed in the client's browser. I thought that since the time values are BCD format in the microcontroller and normally sent when using PBP to an LCD as HEX2 values in order for them to be displayed properly, that I should use the same convention for FTPing the data to the website. Yet when the time is 00:24 clock time in the embedded microcontroller, what shows up on the website when using this statement is 34:34 as displayed by the web browser.
SEROUT2 TX,84,["AT+iFSND:000,5:",HEX2 hr,":",HEX2 MINs,$d,$a]
Can anyone tell me why this statement is producing these incorrect results at the website? I have unsuccessfully trying to figure this problem out for many days and it is driving me crazy. I tried using DEC2 also and it still produces incorrect results. I know the time is correct in the microcontroller because I am also writing HH and MM values to EEPROM so I can read them ater each run to see what the values are and they are correct in the microcontroller but show up incorrectly on the website.
Bookmarks