-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UPS NET4+ #2
Comments
It looks like it is not receiving any data from the nobreak. It could be the speed that is wrong or serial configuration that is wrong. Did you build it with make? Which command did you run? Did you run as root? |
Hi, |
how did you run it? Can you check if you used the correct device node(/dev/tty???)? |
I used the following commands: "./nobreakSMS" or "./nobreakSMS -t /dev/ttyUSB0". uncommenting the function "get_result" the result is: |
What does |
ls -la /dev/|grep USB |
It seems to be correct. Maybe the newer models use a faster serial? |
I do not know, but I do not think they would do it. |
Debugging oficial app: Oct 27 03:54:10 [ comunicacao.PortaUSBHID]: [ main - DEBUG] Enviando comando preparar Oct 27 03:54:14 [ comunicacao.PortaUSBHID]: [ main - DEBUG] Enviando comando preparar |
It should work, look: https://github.com/petersenna/nobreakSMS/blob/master/userland/nobreakSMS.c#L356 I have two suggestions, can you try to uncomment line 63 and comment line 64? Second is to uncomment this block of code and try again: https://github.com/petersenna/nobreakSMS/blob/master/userland/nobreakSMS.c#L461 |
did not work. :( |
Can you send me the full log of the official app, after a few minutes of operation? I am looking for serial port configuration information that is likely to be on the top of the log. |
Oct 26 08:04:23 [ servico.SMSysServico]: [ main - DEBUG] Inicializando o Powerview: [V 4.03.00.10] Oct 26 08:04:23 [ comunicacao.PortaUSBHID]: [ main - DEBUG] Enviando comando preparar Oct 26 08:04:33 [ comunicacao.PortaUSBHID]: [ main - DEBUG] Enviando comando preparar Oct 26 08:04:43 [ comunicacao.PortaUSBHID]: [ main - DEBUG] Bytes escritos: [5] bytes lidos: [4] Oct 26 08:04:51 [ comunicacao.AbstGerenteComunicacao]: [ main - DEBUG] resposta: [] Oct 26 08:04:51 [ comunicacao.PortaUSBHID]: [ main - DEBUG] Enviando comando preparar Oct 26 08:05:01 [ comunicacao.PortaUSBHID]: [ main - DEBUG] Enviando comando preparar Oct 26 08:05:04 [ root]: [ main - ERROR] Oct 26, 2018 8:05:04 AM com.sun.jersey.api.core.ScanningResourceConfig logClasses Oct 26 08:05:04 [ root]: [ main - ERROR] Oct 26, 2018 8:05:04 AM com.sun.jersey.api.core.ScanningResourceConfig init Oct 26 08:05:04 [ root]: [ main - ERROR] Oct 26, 2018 8:05:04 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate Oct 26 08:05:05 [ root]: [ main - ERROR] Oct 26, 2018 8:05:05 AM com.sun.jersey.api.core.PackagesResourceConfig init Oct 26 08:05:05 [ root]: [ main - ERROR] Oct 26, 2018 8:05:05 AM com.sun.jersey.api.core.ScanningResourceConfig logClasses Oct 26 08:05:05 [ root]: [ main - ERROR] Oct 26, 2018 8:05:05 AM com.sun.jersey.api.core.ScanningResourceConfig init Oct 26 08:05:05 [ root]: [ main - ERROR] Oct 26, 2018 8:05:05 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate Oct 26 08:05:06 [ init.SMSysInit]: [ main - DEBUG] Policy: [file:////opt/powerview/java.policy] Oct 26 08:05:07 [ comunicacao.PortaUSBHID]: [ Thread-0 - DEBUG] Enviando comando preparar Oct 26 08:05:09 [ comunicacao.PortaUSBHID]: [ Thread-0 - DEBUG] Enviando comando preparar |
Peter,
I have one sms net 4+ and the program stop working and enter in one infinity loop, i make one debug in the code and saw the value of the variable nbytes in get_results2 is 0 . exists one if statement where verifies if nbytes is greater than 0, but is always 0.
I checked and the result of read command is 0 too.
Peter,
I tenho um sms net4+ e o programa está entrando em um loop infinito, eu fiz um debug no código e ví que o valor da variável nbytes dentro de get_results2 é 0. tem um if que verifica se o nbytes é maior que zero, mas neste caso está sempre em zero. Na realidade eu verifiquei o resultado do comando read e o retorno sempre é 0.
nbytes=0
nbytes=0
nbytes=0
nbytes=0
nbytes=0
nbytes=0
nbytes=0
nbytes=0
nbytes=0
...
The text was updated successfully, but these errors were encountered: