Girs client does not work with girs server 1.0.5 #535
Replies: 7 comments 1 reply
-
Problem was baud rate error on atmega328p @8MHz |
Beta Was this translation helpful? Give feedback.
-
Thank you for your contribution. Glad that it is fixed. But, I did not consider atmega328p @8MHz as supported, so I would very much like a detailed description of what you did that worked, and what did not work. |
Beta Was this translation helpful? Give feedback.
-
Alright let me explain everything so its more clear even thought this is more of a discussion for Girs project. I have this board with ATMega328P on it. I modified tv-b-gone firmware for it and it works pretty good. "Recently" (designed 2 years ago) I decided to make(assemble) some expansion boards for it. Project was not planned at all for Girs initially but I made it work. IR Receiver is connected to PB4. Then I found out that non-demodulating receiver must go to PB0 (ICP1). Quick fix was 10k resistor between PB4 and PB0(ICP1). That now works fine but you gotta be careful with command choice depending on module connected. Now actual issue. ATMega328P has different actual baud rate depending on clock frequency. Error is small but sometimes there might be problems with data parsing. Here is table for 16MHz(Microchip document 7810D–AVR–01/15 page 165, Table 19-12): And here is table for 8MHz(Microchip document 7810D–AVR–01/15 page 164, Table 19-11): My board and CP2104 works perfectly at 250k, 500k and 1M baud. CP2104(IrScrutinizer) parses 115.2k from ATMega328P(Girs) perfectly besides [-3.5%, 8.5%] error in baud rate from ATMega328P. Problem is when ATMega328P(Girs) tries to parse 115.2k from CP2104(IrScrutinizer). Girs does not understand what IrScrutinizer sent and returns ERROR which causes IrScrutinizer to freeze and then throw an excepetion. Now with 38.4k baud everything works great because of only 0.2% error. Issue was on Girs hardware as per table and only fix is to change clock or baud rate. IMO 8482845 is perfect improvement for this. I prefer higher baud rates if hardware allows. edit: |
Beta Was this translation helpful? Give feedback.
-
I have one more question, as i understood baud rate selection is limited by native lib on host os used by nrjavaserial(for example termios on windows)? So even if you wanted you couldn't do anything to add more baud rates or textbox for entering your own besides com port hardware support (for example cp210x), is that right? |
Beta Was this translation helpful? Give feedback.
-
I am not sure what answer you expect; you do not appear to be a person who is asking trivial question?! What I did yesterday was to add a number of "possible" values to the text box, not really bothering if the underlying software supported it or not. I looked for a getSupportedBaudRates() in nrjavaserial, but could not find one. But remember that serial communication is an artifact from the IT stone age. (I really hate that Java does not support it officially, only ussing third-party libraries, like nrjavaserial, which is a development of RXTX.) There is already a TCP-sockets interface, fully supported in IrScrutinizer, and I am pretty satisfied with it. A native USB communication would come in naturally. Also MQTT/Zigbee/Tasmota... would be interesting. Do you have any suggestions? |
Beta Was this translation helpful? Give feedback.
-
I understood what you did yesterday, simple and effective. Thanks for that. One more improvement if nrjavaserial supports it would be to implement a way to enter custom baud rate (since most usb-serial converters support non-standard baud rates). And that's it, serial configuration part is practically up-to-date. As for network stuff, it would be best to implement AGirs for 32bit microcontrolers with wifi but in meantime simple 32bit mcu with wifi can act as bridge talking via serial to 8bit avr. New controllers from ESP32-xx series have a lot of features(BLE, ZigBee, Matter, Thread, WiFi), ESPHome/Tasmota support. Individual implementation for MQTT in IrScrutinizer would be good, people could then configure their hardware how they like so that data arrives to Girs. To prevent collisions in case of multiple clients "busy" or "connectionestablsihed" topic would be good for start. Since TCP socket interface exists nothing more is needed, everything can be implemented locally on 32bit mcu with wifi acting as bridge. MQTT could just be a bonus. Girs over mqtt would be fun and useful. There would just be some work defining the mqtt topic tree. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your comments. Just some remarks: Integration with ESPHome and Homeassistent would be quite interesting.
Sorry, I can not imagine a use case when this would be useful. |
Beta Was this translation helpful? Give feedback.
-
Girs client does not work both on windows and linux.
I'm trying it on my own custom board but i cant get it to work. Serial works fine, server responds, just app does not work
GirsLite config
Beta Was this translation helpful? Give feedback.
All reactions