-
Notifications
You must be signed in to change notification settings - Fork 48
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
Linux_C for WT931, s_ucWitDataBuff (from ucData) always not 0x55 [ubuntu 22.04] #6
Comments
Dear,
First of all, thank you very much for contacting us with your questions. We received your email and sympathize with the issue you are experiencing.
Can you send me a link to the sample program you used? Let me check if the example you used is correct.
Have you ever used our software for communication? Is everything working fine with the data, but the sample communication isn't working?
In the meantime, if you have any further questions or need further assistance, please feel free to contact us. We are committed to providing you with the highest quality service and will do our best to meet your needs.
Finally, thank you again for your trust and support. We look forward to maintaining a good business relationship with you.
Best Regards
Ai Luo(Ms.)
Tech Engineer Team
WitMotion Shenzhen Co.,Ltd
***@***.***
From: Maximilius
Date: 2024-03-21 19:23
To: WITMOTION/WitStandardProtocol_JY901
CC: Subscribed
Subject: [WITMOTION/WitStandardProtocol_JY901] Linux_C for WT931, s_ucWitDataBuff (from ucData) always not 0x55 [ubuntu 22.04] (Issue #6)
Hi! Sorry for the disturbance, but it's been one week that I'm on that issue.
First, the source as cloned didn't assign p_WitSerialWriteFunc callback function at all.
Comparing to the NORMAL_C++ version, I added a static void SensorUartSend(uint8_t *ucData, uint32_t uiSize) function and used it with WitSerialWriteRegister(SensorUartSend); implemented it after WitInit().
This callback calls serial_write_data() from serial.c.
Even with this, AutoScanSensor() is never getting `s_cDataUpdate different of 0, because s_ucWitDataBuff is never 0x55.
I monitored the data at all points, and the integrity is kept all the way in writing data for WitReadReg(). But reading the data is frequently only over 249(0xF9), and only sometimes lower values under 0x7F, but never 0x55....
I also tweak with Delayms() and waiting shorter time in AutoScanSensor() thinking data is skipped, but no change. Also tried with longer waiting just to see but the same.
To make work the NORMAL_C++ WIN version, I had to change the last value of c_uiBaud[] to 921600 for the WT931 sensor.
I made the same to Linux_C and even only 921600, but still no 0x55 in the readings.
And of course, I checked all the rules.d for serial opening, but never had error opening the port returning 3 at fd=open(dev, O_RDWR|O_NOCTTY)
Please, I hope it can be solved.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Hi! Thank you for your quick answer. Yes, I already used your software for the WT61P module, but I was passing through an Arduino. All went fine. I use the source from here for the Linux version. The WIN version worked after adding 921600 in So implemented But still no 0x55 found. Shouldn't be related to the fact that the serial port is read 1 by 1 length ? Best regards |
Hello,
Thank you for your feedback!
If you have any questions or need help, please contact me.
Have a nice day!
Best Regards
Ai Luo(Ms.)
Tech Engineer Team
WitMotion Shenzhen Co.,Ltd
***@***.***
From: Maximilius
Date: 2024-03-23 01:13
To: WITMOTION/WitStandardProtocol_JY901
CC: WITMOTION; Comment
Subject: Re: [WITMOTION/WitStandardProtocol_JY901] Linux_C for WT931, s_ucWitDataBuff (from ucData) always not 0x55 [ubuntu 22.04] (Issue #6)
Hi! Thank you for your quick answer.
Yes, I already used your software for the WT61P module, but I was passing through an Arduino. All went fine.
I use the source from here for the Linux version.
I compared it with the WIN version from here here.
The WIN version worked after adding 921600 in c_uiBaud[]
So implemented AutoScanSensor() and added 921600 rate to the Linux version.
But still no 0x55 found. Shouldn't be related to the fact that the serial port is read 1 by 1 length ?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
The problem is solved! I should have continued the baud rate modification to the serial.h file too. The serial_open() function didn't have had implemented the 921600 baud value. Should I pull the modifications? Even if no writing permissions ? |
Hi! Sorry for the disturbance, but it's been one week that I'm on that issue.
First, the source as cloned didn't assign
p_WitSerialWriteFunc
callback function at all.Comparing to the NORMAL_C++ version, I added a
static void SensorUartSend(uint8_t *ucData, uint32_t uiSize)
function and used it withWitSerialWriteRegister(SensorUartSend);
implemented it afterWitInit()
.This callback calls
serial_write_data()
from serial.c.Even with this,
AutoScanSensor()
is never getting `s_cDataUpdate different of 0, because s_ucWitDataBuff is never 0x55.I monitored the data at all points, and the integrity is kept all the way in writing data for WitReadReg(). But reading the data is frequently only over 249(0xF9), and only sometimes lower values under 0x7F, but never 0x55....
I also tweak with Delayms() and waiting shorter time in AutoScanSensor() thinking data is skipped, but no change. Also tried with longer waiting just to see but the same.
To make work the NORMAL_C++ WIN version, I had to change the last value of c_uiBaud[] to 921600 for the WT931 sensor, and all worked.
I made the same to Linux_C and even only 921600, but still no 0x55 in the readings.
And of course, I checked all the rules.d for serial opening, but never had error opening the port returning 3 at
fd=open(dev, O_RDWR|O_NOCTTY)
Please, I hope it can be solved.
The text was updated successfully, but these errors were encountered: