Cosmik42 Posted January 16, 2019 Author Posted January 16, 2019 Just now, Toastie said: Instead of scanning for devices I am directly connecting to the unique device address of each BLE server I think this works well for you, but it is also less user friendly and requires a lot more tech knowledge. Quote
Unfinished_Projects Posted January 16, 2019 Posted January 16, 2019 (edited) 12 minutes ago, Cosmik42 said: Bug fix: Better handling of faulty device connection Whatever device affected it before, is not anymore Thanks again for sharing your hard work! Unfinished_Projects Edited January 16, 2019 by Unfinished_Projects Quote
Cosmik42 Posted January 16, 2019 Author Posted January 16, 2019 Just now, Unfinished_Projects said: Whatever device affected it before, is not anymore Sweet! Quote
Toastie Posted January 16, 2019 Posted January 16, 2019 Yes, that is entirely true. But maybe a text file made with Windows Editor in the format: "Friendly train name: BLEaddress" that your program could parse upon startup or request by user could work. For example: CargoTrain1: 90:84:2b:01:80:ac (The latter numbers are what the Windows "devices and printer menu" shows you for a know BLE device) Best Thorsten Quote
Cosmik42 Posted January 16, 2019 Author Posted January 16, 2019 Just now, Toastie said: But maybe a text file made with Windows Editor in the format: "Friendly train name: BLEaddress" that your program could parse upon startup or request by user could work. For example: CargoTrain1: 90:84:2b:01:80:ac (The latter numbers are what the Windows "devices and printer menu" shows you for a know BLE device) But what is the usage scenario? Oh I think I get it. During convention if others are turning on their Hubs and we pick it up? I think I have an idea on how to manage this elegantly. Quote
Toastie Posted January 16, 2019 Posted January 16, 2019 Yes, I believe this is what @Lok24 was worried about. Best Thorsten Quote
Cosmik42 Posted January 17, 2019 Author Posted January 17, 2019 Does anyone has a PF tilt sensor and SBrick Plus? If so, could you tell me if the sensor works and if the output makes sense? (I don't own a tilt sensor). Quote
Lok24 Posted January 17, 2019 Posted January 17, 2019 12 hours ago, Cosmik42 said: But what is the usage scenario? Oh I think I get it. During convention if others are turning on their Hubs and we pick it up? You are completely right, as it works now it is very user-friedley, but might lead to problems during conventions. Perhaps reserve a global variable in the global code, i.e. DEVICELIST="" And in your program : if (DEVICELIST == "") -> behavior like now If user fills DEVICELIST = (adr1;adr2;adr3....) then filter only these Therefore it would be useful to display the adress of a connected device somewhere. Like a "properties" popUp for each device, showing connection, adress, type, firmware, battery-level (in Volt!), connected ports and so on Just a suggestion. Going to try your your new version soon. Thanks for your work! Quote
Cosmik42 Posted January 17, 2019 Author Posted January 17, 2019 9 minutes ago, Lok24 said: Perhaps reserve a global variable in the global code, i.e. DEVICELIST="" And in your program : if (DEVICELIST == "") -> behavior like now If user fills DEVICELIST = (adr1;adr2;adr3....) then filter only these Actually the best approach is the following : - Prepare your project at home in a normal way. Save it. This way the program knows your device id. - At convention, click a button in settings that says 'Attempt to connect only to devices from this project'. This way you don't even need to know what a bluetooth address is and the scenario is covered. Quote
Lok24 Posted January 17, 2019 Posted January 17, 2019 (edited) Sounds good, but at conventions often meet many people to build a huge layout, with many different trains. And what if someone wants to test my shuttle-project with his own loco? Sure this is not the "normal" user and needs no prority , but for advaced users it's no problem to enter a list of adresses, we do that with the python/raspberry/SBrick-environment usually. Edited January 17, 2019 by Lok24 Quote
mawe Posted January 17, 2019 Posted January 17, 2019 5 hours ago, Cosmik42 said: Does anyone has a PF tilt sensor and SBrick Plus? If so, could you tell me if the sensor works and if the output makes sense? (I don't own a tilt sensor). I have a tilt sensor, but i have problems to connect to my sBrickPlus (LTP V0.5) SBrick with newest Firmware, 8878 PF Akku for power: Error opening communication:Unreachable Discarding Bluetooth ...... Quote
Toastie Posted January 17, 2019 Posted January 17, 2019 56 minutes ago, Lok24 said: Sure this is not the "normal" user and needs no prority , but for advaced users it's no problem to enter a list of adresses, we do that with the python/raspberry/SBrick-environment usually. Also, I believe that a brief instruction how to find out the MAC address of a LEGO hub (at least on a Win10 machine - I doubt it is much more complicated on others) is not that advanced: -> Control panel -> Devices and printers -> Add device (progress bar appears, turn on hub) and there it shows. Best, Thorsten Quote
Cosmik42 Posted January 17, 2019 Author Posted January 17, 2019 Just now, mawe said: Error opening communication:Unreachable Discarding Bluetooth ...... Make sure to unpair the device with windows by removing your SBrick from your paired list. Let me know if this fixes your problem! 1 hour ago, Lok24 said: Sure this is not the "normal" user and needs no prority , but for advaced users it's no problem to enter a list of adresses, we do that with the python/raspberry/SBrick-environment usually. @Toastie, @Lok24, noted. Will prepare something. Quote
Lok24 Posted January 17, 2019 Posted January 17, 2019 Just now, Toastie said: Also, I believe that a brief instruction how to find out the MAC address of a LEGO hub (at least on a Win10 machine - I doubt it is much more complicated on others) is not that advanced: -> Control panel -> Devices and printers -> Add device (progress bar appears, turn on hub) and there it shows. .... no? Shows only Name.... Quote
mawe Posted January 17, 2019 Posted January 17, 2019 (edited) 2 hours ago, Cosmik42 said: Make sure to unpair the device with windows by removing your SBrick from your paired list. Let me know if this fixes your problem! yup, much better 7 hours ago, Cosmik42 said: Does anyone has a PF tilt sensor and SBrick Plus? If so, could you tell me if the sensor works and if the output makes sense? i recognised three Values, 255, 3 and 10 for every other position 255: 3: Edited January 17, 2019 by mawe Quote
Lok24 Posted January 17, 2019 Posted January 17, 2019 Hi V0.5 doent work as expected.... 1.) Prog anti-collision-example.ltp is loaded at startup 2.) my prog shuttle-train cannot be loaded Quote
Cosmik42 Posted January 17, 2019 Author Posted January 17, 2019 3 minutes ago, Lok24 said: V0.5 doent work as expected.... 1.) Prog anti-collision-example.ltp is loaded at startup 2.) my prog shuttle-train cannot be loaded Fixed. Please download from the same link. Thanks! Quote
Lok24 Posted January 17, 2019 Posted January 17, 2019 Yes, much better, thanks a lot. But anti collision is still loaded at startup (but can't work, due to lack of sensors) and my "own" project is always shown as "Program #1" in the register (what is just a cosmetic issue ) Quote
Toastie Posted January 17, 2019 Posted January 17, 2019 57 minutes ago, Lok24 said: .... no? Shows only Name.... Click on the symbol for the hub/BLE device. Should says something like: "Hub No.4 Modell: Bluetooth LE Device 90842b0180ac" The last part is the MAC address in hex (0x90 0x84 0x2B 0x01 0x80 0xAC) which is the one of my hub. You can also double click on the symbol and go to "Angeschlossenes Gerät" - here you can copy the address (in two different formats) Best Thorsten Quote
Lok24 Posted January 17, 2019 Posted January 17, 2019 (edited) Hi, no, klicking there doesn't do anything. but I can find the MAC of course in the details of the device, but only with "weitere bluetooth optionen", so no probs with that. Edited January 17, 2019 by Lok24 Quote
Cosmik42 Posted January 17, 2019 Author Posted January 17, 2019 1 hour ago, mawe said: i recognised three Values, 255, 3 and 10 for every other position 255: 3: Thank you so much for trying. I really need to find this hardware. Though I am not sure the usage for a train scenario. Quote
mawe Posted January 17, 2019 Posted January 17, 2019 Just now, Cosmik42 said: Though I am not sure the usage for a train scenario. Haha, maybe to stop all engines in case of derailing :) Quote
Cosmik42 Posted January 17, 2019 Author Posted January 17, 2019 57 minutes ago, Lok24 said: Yes, much better, thanks a lot. But anti collision is still loaded at startup (but can't work, due to lack of sensors) and my "own" project is always shown as "Program #1" in the register (what is just a cosmetic issue ) Anti-Collision => Will make it optional. Your own program => You can rename it if you click on the tab. First field on the left. Just now, mawe said: maybe to stop all engines in case of derailing :) Maybe! Quote
Lok24 Posted January 18, 2019 Posted January 18, 2019 (edited) On 1/16/2019 at 10:26 AM, Bartosz said: Off-topic, so don't shoot, but I like the rolling stock. Any close-up photos? :) @Bartosz Just now, Lok24 said: @Bartosz Hi, unfortunatelly I' cant edit the post nor delete it after insterting the user-tag? Strange. So, here is the only picture I've got: Edited January 18, 2019 by Lok24 Quote
Lok24 Posted January 19, 2019 Posted January 19, 2019 Hello, new parts arrived, testing continues.... LEDs : work brillant and as expected WEDO Distance: connected, shows values in log, but cannot be triggered by prog (i.e. "Distance is below 3")? Waht do the values mean? WEDO Tilt: detected, but not shown in log, cannot be triggered "Port Connected: A of type WEDO2_TILT" Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.