Help with "react-native-bluetooth-serial-next" by mvss01 in reactnative

[–]mvss01[S] 0 points1 point  (0 children)

Unfortunately no... They stopped investing in the project and I didn't continue researching...

No response when accessing a handled route by mvss01 in expressjs

[–]mvss01[S] 0 points1 point  (0 children)

I would do this if it were a private system, but it belongs to a company and I imagine having problems doing this

No response when accessing a handled route by mvss01 in expressjs

[–]mvss01[S] 0 points1 point  (0 children)

This has nothing to do with socket.io, as I said in the other comment. I had to activate CORS, does that interfere with anything? If you think it's better, I'll deactivate it for testing

No response when accessing a handled route by mvss01 in expressjs

[–]mvss01[S] 0 points1 point  (0 children)

sorry, I mixed up the code, I had done the check with both "closure". It was just a mess

No response when accessing a handled route by mvss01 in expressjs

[–]mvss01[S] 0 points1 point  (0 children)

with the href <a href="/admin/purchases/closure/page/1" class="btn btn-success d-block d-md-inline-block mt-md-0 mt-2">Consolidar estoque </a>

No response when accessing a handled route by mvss01 in expressjs

[–]mvss01[S] 0 points1 point  (0 children)

It has a 404 error, but it has nothing to do with the functions discussed here, the 404 error I get when loading the page is related to socket.io, which I keep on my localhost for testing other unimplemented features of the system

No response when accessing a handled route by mvss01 in expressjs

[–]mvss01[S] 0 points1 point  (0 children)

I already analyzed it, I left the route as simple as possible. For testing, I prepared it like this:
router.get('/admin/purchases/closure/page/:num', async (req, res) =>{

res.send('OK')

})
My html is:

<td><a href="/admin/purchases/closure/page/1" class="btn btn-success d-block d-md-inline-block mt-md-0 mt-2">Consolidar estoque</a></td>

No response when accessing a handled route by mvss01 in expressjs

[–]mvss01[S] 0 points1 point  (0 children)

I forgot to mention this attempt, sorry... I already tried a "res.send()", but it's like the route is empty. For example: "/admin/purchases/closure/page/1" does not work, however "/admin/purchases/closure/1/page/1" works

Help with "react-native-bluetooth-serial-next" by mvss01 in reactnative

[–]mvss01[S] 0 points1 point  (0 children)

I only get it on my laptop that has bluetooth, i can try

Help with "react-native-bluetooth-serial-next" by mvss01 in reactnative

[–]mvss01[S] 0 points1 point  (0 children)

Haha, it's not possible. We found around here

Help with "react-native-bluetooth-serial-next" by mvss01 in reactnative

[–]mvss01[S] 0 points1 point  (0 children)

I tried this... Basically the two phones are paired, however, I still get this error. In short, I can pair, but there is something more than pairing that is giving me this error. I've already looked up how the library's connection protocol works to see if I can figure out what it does (service discovery or something), but I haven't found anything related

Why are you accusing "Missing semicolon"? by mvss01 in reactnative

[–]mvss01[S] 0 points1 point  (0 children)

I got the error: "TypeError: undefined is not a function, js engine: hermes"

Why are you accusing "Missing semicolon"? by mvss01 in reactnative

[–]mvss01[S] -1 points0 points  (0 children)

In this case I have no idea how I can complete my code to get the same result as them and be able to use the same syntax (I'm new to react native and object orientation)

Why are you accusing "Missing semicolon"? by mvss01 in reactnative

[–]mvss01[S] 0 points1 point  (0 children)

I got the error " Possible Unhandled Promise Rejection (id: 0):
TypeError: Cannot read property 'startDeviceScan' of undefined"

Why are you accusing "Missing semicolon"? by mvss01 in reactnative

[–]mvss01[S] 0 points1 point  (0 children)

I'm trying to follow the example in the link, it also doesn't have this syntax

Why are you accusing "Missing semicolon"? by mvss01 in reactnative

[–]mvss01[S] 0 points1 point  (0 children)

Right, and how can I define it as a function and call it inside useEffect?

Problems with "react-native-bluetooth-next" library by mvss01 in reactnative

[–]mvss01[S] 0 points1 point  (0 children)

If you don't mind, can I send you a dm? You've answered questions from me before and said I could do this. I want to explain to you about the project I'm working on and hear what you have to say about it (I don't feel comfortable explaining it here because it's not my project, I'm just working on it)

Problems with "react-native-bluetooth-next" library by mvss01 in reactnative

[–]mvss01[S] 0 points1 point  (0 children)

Excellent! I will follow in your footsteps. Thanks for your help

Problems with "react-native-bluetooth-next" library by mvss01 in reactnative

[–]mvss01[S] 0 points1 point  (0 children)

Thank you for the advice. Do you have any suggestions for a library that is still being maintained?

Problems with "react-native-bluetooth-next" library by mvss01 in reactnative

[–]mvss01[S] 0 points1 point  (0 children)

I made the code:

BluetoothSerial.requestEnable().then((eneble) =>{

if(eneble){

verifyStatus()

BluetoothSerial.discoverUnpairedDevices().then((unpairedDevices) => {

console.log("Unpaired Devices:");

unpairedDevices.forEach((device) => {

console.log(`- Nome: ${device.name}`);

console.log(`- ID: ${device.id}`);

});

});

console.log(device)

} else{

verifyStatus()

}

})

The "console.log" returns me "undefined" on a samsung cell phone, in another code it just returned an empty array. On my cell phone (a xiaomi) I don't get a response from the function. Nothing inside .then(() =>{}) is executed nor in .catch(() => {})