I was working on a simple GUI program to send short messages to a remote device.. The title of the messages are saved on a list after the messages are sent such that the user can select to view previously sent messages.
I have got the first part working perfectly but my program doesn't remember anything after each run. The list will be empty after running the program each time. Here is my code. I used Netbeans IDE to design the interface but I did the event handling part. Adding items to the list starts from line no. 96.
I have a created a TCPClient class to handle the socket programming on the client side. The server is a device that I intend to send messages to execute various commands. Under this class I have constructed a client socket with the server's host name and port no. Running the program throws UnknownHostException. I have verified I am using the correct device name. i knew this after I checked on my router's configuration page where a list of connected devices were displayed.
But when I use an InetAddress object containing the server's IP address, I get no errors and the connection is successful. This however brings a huge limitation in that, I have to enter the IP address every time since the device's (server) DHCP is enabled. What could be the problem?
I am on the middle of a project requiring sending of data from computer (created a GUI using java) to a microcontroller (to be displayed on an LCD) wirelessly using Wi-Fi. I have been successful in sending textual data but want to move one step ahead by sending images (this time I will b using a graphical lcd 48 by 84 display). The problem is that the graphic lcd displays the image when it is in the form of an array (hexadecimal values). So I thought of converting the image before sending it to the microcontroller.
I want to update the same GUI i used to send the textual data to be able to accept the image file then convert before sending. Since the maximum display size is 48 by 64 and can only display black and white images therefore i have to place a restriction where the accepted file should be a bmp file format before loading it to the GUI. My knowledge on image processing is very limited and I was hoping to get some ideas over here on how to solve this problem.
The host name is ok as I got this from my router's configuration page before I switched to adhoc mode. I tried to change the port number but same result. could this be something to do with the adhoc mode as I am not familiar with it?....
I recently embarked on a project involving controlling a microcontroller remotely using wifi. Commands are sent from a windows app to a wifly shield which passes them to the mcu. The wifly shield and the computer are on the same adhoc network and i was able to ping and telnet between them successfully. The problem arises when the app throws an unknownHostException after sending the commands. I checked the ports and host name clearly and everything is ok. The app is the client while the wifly shield is the server and at the time of sending the commands the shield is up and running. Here is the TCPClient class that the app uses.
Here is the event handling part that uses the TCPClient class