Closed echavet closed 1 year ago
Precision: ConfigurableFirmata V 2.10.1 works well. So the pb is only with 3.0.0 version of ConfigurableFirmata
Interesting, I'm not aware of a protocol change that would affect the initialization sequence. And other client libraries seem to be unaffected. I have never worked with js, so I'm not even able to find the code that does the actual communication. The board class seems to just wait for an event which isn't comming.
I'm trying to find out a solution to make them speak together. However it's difficult to debug I found that with the help of chatGPT! Envoyé par johnny-five : 249 Reçu par ConfigurableFirmata : 134
Débogage avec ConfigurableFirmata.
Model: GPT-4
Famille Chavet en regardant les poids forts et faible et en imaginant les erreurs de swap possibles est-ce que tu vois un lien entre 249 et 134 ?
ChatGPT:
Oui, il y a un lien entre 249 et 134 si l'on considère les représentations binaires de ces deux nombres. Les voici en binaire sur 8 bits :
249 : 11111001 134 : 10000110 On peut observer que les 4 bits de poids fort de 249 (1111) sont inversés pour donner les 4 bits de poids faible de 134 (0110), et les 4 bits de poids faible de 249 (1001) sont inversés pour donner les 4 bits de poids fort de 134 (1000).
Si l'on considère que les bits sont inversés (swap), on obtient :
249 : 11111001 -> 10000110 134 : 10000110 -> 11111001 Il semble donc que les bits soient inversés lors de la transmission des données. Cela pourrait être dû à une mauvaise configuration de la communication série (parité, bits de données, bits d'arrêt) ou à un problème matériel.
Vérifiez les configurations de communication série côté Arduino et Node.js pour vous assurer qu'elles correspondent. Normalement, les paramètres par défaut pour la communication série sont :
Parité : aucune Bits de données : 8 Bits d'arrêt : 1 Si les configurations correspondent déjà, essayez de changer de câble USB ou de port USB sur votre ordinateur, car cela pourrait être dû à un problème matériel.
Le dim. 2 avr. 2023, 08:51, Patrick Grawehr @.***> a écrit :
Interesting, I'm not aware of a protocol change that would affect the initialization sequence. And other client libraries seem to be unaffected.
— Reply to this email directly, view it on GitHub https://github.com/rwaldron/johnny-five/issues/1817#issuecomment-1493247632, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYTHBDHNXW5SDMQ7IMHCIDW7EOWHANCNFSM6AAAAAAVK3TOHI . You are receiving this because you authored the thread.Message ID: @.***>
Hmmm... I don't quite understand how that could help. The bit order certainly hasn't changed.
I don't know how the reason yet. But I know for sure that one command is sent and that it is not understood because bits are upside down !!
Le dim. 2 avr. 2023, 12:53, Patrick Grawehr @.***> a écrit :
Hmmm... I don't quite understand how that could help. The bit order certainly hasn't changed.
— Reply to this email directly, view it on GitHub https://github.com/rwaldron/johnny-five/issues/1817#issuecomment-1493297517, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYTHBCBGFEKC2G27TLW553W7FLENANCNFSM6AAAAAAVK3TOHI . You are receiving this because you authored the thread.Message ID: @.***>
Ok. I should have double checked that the bauds rates were matching both side. Thanks for help, sorry for the waste of time...
@echavet Oh, yea. That's what did change. The default baudrate has changed from 57600 to 115200.
@echavet I think it is init problem on ConfigurableFirmata.ino. Can you follow this pr, and test it? https://github.com/firmata/ConfigurableFirmata/pull/144
I can manage to init johnny-five with the blink (helloWorld.js) example if I use the StandardFirmataPlus firmware on an arduino UNO but I can't manage to get it work with ConfigurableFirmata which is supposed to be supported in the doc.
I get an exception :
Of course I've read the trouble-shooting section which indicate to use a StandardFirmata firmware. But if I do so, I cannot use the OneWire Thermometer feature of Johnny-five (which indicates me to use ConfigurableFirmata when I'm using StandardFirmata).
There is no log to help me to trouble shoot this issue!!