Hi all,

I have written some programs (using SDK) for the FX9860. I don't have a Prizm yet, but I've been following the documentation effort on Prizm SDK and feel confident that if I do buy one, I should be able to write programs for the Prizm too.

I have gone through http://www.cemetech.net/news.php?id=476 but should confess my knowledge of hardware is pretty minimal and didn't quite follow what was said there Smile

Now this is what I want to do: have a program running on a Prizm make an HTTP POST.

And this is what I was thinking should the path to that goal be:
(1) Port libcurl to Prizm.
(2) Get a serial-wifi adapter (http://serialio.com/products/mobile/wifi/WiSnapAAA.php?), figure out how to connect that to the Prizm.
(3) Write program to call cURL APIs.

(a) Any of this feasible at all?
(b) If yes, can I do the same in an FX9860 too?

(I write proprietary stuff for the FX, but rest assured, if I do any of the above in any app I write, will release relevant code here.)

Thanks!
Funny thing, I thought about doing all you're trying to do earlier this summer.

I think point 1 will be more difficult or more easy depending on how much libcurl depends on the capabilities of the OS it is running on (i.e., is it very tied to "normal" OS like *nix, Windows, Mac OSX?).

All the serial-wireless adapters I had seen were very bulky and required an huge power source that often needed to connect to AC power - not really appropriate for something small like the Prizm. However, the adapter you posted is much small and works on two AAA batteries, which is nice. But does it allow for making HTTP requests directly (i.e. direct network access), or is it just some sort of a bridge which requires some software on another computer to work through WLAN?

Connecting the Prizm's 3pin port to a RS232 port is easy: I have a cable from an old Casio SF digital diary which works perfectly; it has some special circuitry but since I think the cable was a DIY project, it shouldn't be very hard to build a similar (and smaller/no cable, just adapter) one.

Point 3 shouldn't be any difficult if you manage to complete point 1 and 2 Wink

a) I think it's feasible but the main problem would be to find the appropriate adapter, or to develop one from scratch if nothing exists yet.
Also, don't expect to render HTML web pages; of course, you can implement your own simple markup language (or just plain text) which gets served with a simple HTTP server and is readable on the Prizm with a custom "web" browser.

If the wifi approach is not feasible, you can always go the "ethernet" route and simply connect the Prizm to a computer directly through serial and then develop from there (for example, it'd be awesome to transfer files from one Prizm to another over the Internet, without having to copy files to the PC)

b) Probably yes but note that the serial on it is different from the one in the Prizm, in the sense the fs9860 can communicate at higher BPS. The processor is also slower so anything like libcurl would run slower.
I know we don't really know that much about the USB port yet (although unlike the TI calculators, it is actually documented in Renesas' whitepapers!), but I really think that that would be a better option. A USB wifi adapter would be more straightforward, assuming we could cram the necessary drivers into the space we have. However, I would still love to come up with a tiny microcontroller-based gadget to let the Prizms speak CALCnet. Smile
Thanks gbl, kerm.

Did one quick read of that adapter's user guide, it seems very capable. There is even an option of configuring hitting a URL whenever data comes on the serial port. Pretty neat.

So if that works, I don't need libcurl. Just need to use FX/Prizm SDK+syscalls and write to the serial port. The adapter can be configured to do the rest.

Been trying to write a simple send/receive from one FX to another, can't make it work. Any suggestions?

Syscalls:

Code:
0x411: Serial_GetRxBufferSize(void)
0x412: Serial_GetTxBufferFreeCapacity(void)
0x418: Serial_Open(unsigned char *conf)
0x419: Serial_Close(int mode)
0x425: Serial_IsOpen (void)
0x40C: Serial_ReadByte(unsigned char *dest)
0x40D: Serial_ReadBytes(unsigned char *dest, int max, short *size)
0x40E: Serial_WriteByte(unsigned char byte)
0x40F: Serial_WriteBytes(unsigned char *src, int size)


Serial Open:

Code:
   if (Serial_IsOpen() == 3)
      {
      unsigned char mode[6] = {0, 9, 2, 0, 0, 0};
      Serial_Open((unsigned char*) &mode);
      }


Send:

Code:
   if (Serial_IsOpen() == 1)
      {
      if (Serial_GetTxBufferFreeCapacity())
         {
         char alphanumericsymbols[70] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '.', ',', '|', '(', ')', '{', '}'};
         unsigned char send[STR_BUF_LEN];
         memset(send, '\0', STR_BUF_LEN);
         send[0] = alphanumericsymbols[rand() % 70];
         send[1] = alphanumericsymbols[rand() % 70];
         Serial_WriteBytes(send, 2);
         }
      }


Receive:

Code:
   if (Serial_IsOpen() == 1)
      {
      short int size;
      unsigned char recv[STR_BUF_LEN];
      memset(recv, '\0', STR_BUF_LEN);
      if (Serial_ReadBytes(&recv, Serial_GetRxBufferSize(), &size) == 0)
         {
          //print contents of recv to screen
                        }
      }


(1) I am not able to receive in Calc 2 what I'm sending from Calc 1.
(2) Serial_Open works a whether a cable is connected or not. And Serial_GetTxBufferFreeCapacity() always returns 255. So how do I figure if there is a calculator is attached on the other end. i.e. if a 'connection is established' or not? As an example, if I send the string "ABC" from Calc 1, how do I know if Calc 2 received it or not?
maybe you should look to flourish app/sources:
http://www.cemetech.net/forum/viewtopic.php?t=7124&start=0
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement