Pink UDP questions
JohnR2010
Posts: 431
I’m using the Parallax Internet NetBurner Kit (#30013) PINK with my SPIN processor to send UDP commands to an appliance that monitors our solar system.· The appliance, a SMA Webbox (in case you’re interested) expects UDP commands in JSON format and I’m running into a couple of challenges.· The JSON format requires several characters to be formatted correctly, ·the command I need to send is 72 ASCI characters long too big to fit in the PINK’s 64 byte UDP packet field.· Question: is there a way to increase this field size (UDP data field !NBOwBM)?· The appliance will not allow me to break up the command into two packets from what I can tell.
·
The second obstacle is my appliance is sending the response back to me in UNICODE format instead of ASCII.· SMA is an international company supporting several languages so I understand why they do this but man does it cause the PINK to go crazy.· ·According to my protocol analyzer the Pink is being sent a Unicode responses that appear as a character and then a null byte ($00) for every letter of the response.· So to the PINK it thinks it just received a 0 terminated string of 1 character in size.· Therefore I only receive the first character of the response. ··Since an ASCII “A” Dec 65 Hex $41 appears as $0041 in Unicode format the PINK stops receiving data into its UDP field ·after it receives the first character.·
Question: Is there a way the PINK can be told to receive Unicode text over UDP?· If not is there a way I can tell the PINK to ignore the “00” Null byte and receive all data in the UDP packet?
·
If the answer is I’m just out of luck and the PINK isn’t going to do it for me has anyone flashed the PINK back to its original OS from Net Burner?· I wonder if I could make it work then?
·
Thanks!
·
The second obstacle is my appliance is sending the response back to me in UNICODE format instead of ASCII.· SMA is an international company supporting several languages so I understand why they do this but man does it cause the PINK to go crazy.· ·According to my protocol analyzer the Pink is being sent a Unicode responses that appear as a character and then a null byte ($00) for every letter of the response.· So to the PINK it thinks it just received a 0 terminated string of 1 character in size.· Therefore I only receive the first character of the response. ··Since an ASCII “A” Dec 65 Hex $41 appears as $0041 in Unicode format the PINK stops receiving data into its UDP field ·after it receives the first character.·
Question: Is there a way the PINK can be told to receive Unicode text over UDP?· If not is there a way I can tell the PINK to ignore the “00” Null byte and receive all data in the UDP packet?
·
If the answer is I’m just out of luck and the PINK isn’t going to do it for me has anyone flashed the PINK back to its original OS from Net Burner?· I wonder if I could make it work then?
·
Thanks!
Comments
You might consider using a YBox2 which is a Propeller with an open-source TCP/IP stack and Ethernet interface. It can act as a webserver, but can also upload and download programs, serve up data, etc.
www.ladyada.net/make/ybox2/
www.deepdarc.com/ybox2
A lot of the I/O pins are available and you can make piggy-back boards. I have one and added an SPI 2MByte flash memory and 32K of SPI SRAM. It has a built-in TV interface and I plan to add a PS/2 keyboard as well for a stand-alone package. It only has a 3.3V regulator, no 5V regulator, and PS/2 requires a 5V source, so I'll have to add a small boost regulator for the keyboard.
I’m now looking into a B&B electronics serial server I have here in the shop. It may do the trick, but I can’t tell from the documentation if it is has true RS232 or TTL level singles. Guess its time to get the old scope out.
Any thoughts on flashing the PINK back to the NetBurner OS? Wonder if that is possible.
Thanks again!
·
I need the features of the PINK, the web interface and ability to determine the devices IP address etc.· The PINK gets me 90% their!· I just need to modifications to the firmware:
1)····· Increase the packet size of a UDP packet from 72 bytes to 200 bytes or more.
2)····· Allow me to set the terminating character of the UDP packet data.· The current PINK firmware uses the null byte ($00) to end a string.· I need to send a null between each character since I’m sending UNICODE.· Let me set it to something else.
Here is my question:· Does anyone know who wrote the firmware for the PINK?· The PINK looks a lot like SB70 from NetBurner with some very clever code.· Truly it does everything I need except the above two modifications. ·I would like to know if I could get this code and make my modifications or work with the author to make them for me.
·
Thanks!